Commentaire de pull request · PR #1016 feat: filter the list of posts by post type and text · @paulrobertlloyd
Nice! Couple of things…
- Let’s put the filters inside a details component so that they are hidden/collapsed by default. That way they don’t take up too much screen space when not in use. The
open attribute should be added if a post type or search filter is being used.
- Thinking about the accessibility of showing a subset of filtered items:
- There should be a
h2 above the items indicating what’s being shown
- The page title should be updated to play back this same information
- Adding localisations is a bit more involved than updating the JSON files (at least for them to be managed via Localazy). New keys are added thus:
- Add/update
en.json
localazy upload (adds any new keys to locale dictionary)
- Add localisations in the Localazy UI
localazy download (downloads updated localisation files)
I can add you as a contributor to Localazy if you’d like? Otherwise I can do the above once we’ve agreed on the localisations needed and their respective keys.
Here’s an initial suggestion for the heading/page title. I realise this is possibly a bit much (would also need to think how this would need to adapt should further filters be added). Open to suggestions!
- No posts
- 1 post
- 2 posts
- 41 posts (showing posts 1 to 40)
- No [TYPE] posts
- 1 [TYPE] post
- 2 [TYPE] posts
- 41 [TYPE] posts (showing posts 1 to 40)
- No posts found matching ‘[QUERY]’
- 1 post found matching ‘[QUERY]’
- 2 posts found matching ‘[QUERY]’
- 41 posts found matching ‘[QUERY]’ (showing posts 1 to 40)
- No [TYPE] posts found matching ‘[QUERY]’
- 1 [TYPE] post found matching ‘[QUERY]’
- 2 [TYPE] posts found matching ‘[QUERY]’
- 41 [TYPE] posts found matching ‘[QUERY]’ (showing posts 1 to 40)
The page title should use this same text, prefixed with ‘Published posts: ’
Ouvrir sur GitHub →