Skip to content

Allow and style file block#176

Merged
snim2 merged 4 commits intomainfrom
feature/allow-file-block
Apr 16, 2026
Merged

Allow and style file block#176
snim2 merged 4 commits intomainfrom
feature/allow-file-block

Conversation

@snim2
Copy link
Copy Markdown
Contributor

@snim2 snim2 commented Apr 15, 2026

Corse Parish Council use this theme and have a page which lists their minutes:

https://www.corse-pc.gov.uk/parish-council/minutes/

There are two issues with this:

  1. The "file" block has been removed from this theme so every update requires a manual change to the theme code
  2. The file block is not styled per the design system and as a result is not accessible and also not consistent with the rest of the site

This PR fixes these two issues, and also styles the core "buttons" block which had a similar issue.

Design system reference: https://design-system.service.gov.uk/components/button/

Testing

  1. Spin up the local env with this theme on this branch (saluki-test-site has this theme installed)
  2. You may need to add this to your functions.php if you want to upload a PDF:
    function allow_pdf_uploads($mimes) {
        $mimes['pdf'] = 'application/pdf';
        return $mimes;
    }
    add_filter('upload_mimes', 'allow_pdf_uploads');
  3. Visit http://localhost/wp-login.php and log in
  4. Visit http://localhost/wp-admin/edit.php and add a new post
  5. Add a button block
  6. Add a file block
  7. Check that they are (roughly) styled as per the system in the block editor
  8. Check the page in the front end and check the styling is correct

Screenshots

Before

Editor:

before-editor

Front-end:

before-frontend

After

Editor:

after-editor

Front-end:

after-frontend

snim2 added 4 commits April 15, 2026 19:15
The download button should now look like a GovUK button
and be accessible. The text on the left of the button
should be similar to paragraph text.
Copy link
Copy Markdown
Contributor

@matthewpassmore matthewpassmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good locally 👍

@snim2 snim2 merged commit 27049eb into main Apr 16, 2026
3 checks passed
@snim2 snim2 deleted the feature/allow-file-block branch April 16, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants