-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💥 feat!: add tag filtering for projects #431
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for tabi-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
welpo
changed the title
✨ feat: add tag filtering for projects
💥 feat: add tag filtering for projects
Nov 16, 2024
welpo
changed the title
💥 feat: add tag filtering for projects
💥 feat!: add tag filtering for projects
Nov 16, 2024
welpo
added a commit
that referenced
this pull request
Nov 16, 2024
- Card (project) images no longer require manual top/bottom margin adjustments for proper spacing. Action needed: Review existing card images as previous manual margin adjustments may now be unnecessary/excessive. - Sites using `cards.html` with tags will now load JavaScript by default when tags are present. To maintain no-JS behaviour, explicitly set `enable_cards_tag_filtering = false` in either `config.toml` or the `_index.md` file where `cards.html` is used.
welpo
added a commit
that referenced
this pull request
Nov 16, 2024
- Card (project) images no longer require manual top/bottom margin adjustments for proper spacing. Action needed: Review existing card images as previous manual margin adjustments may now be unnecessary/excessive. - Sites using `cards.html` with tags will now load JavaScript by default when tags are present. To maintain no-JS behaviour, explicitly set `enable_cards_tag_filtering = false` in either `config.toml` or the `_index.md` file where `cards.html` is used.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
💥 BREAKING CHANGE
cards.html
with tags will now load JavaScript by default when tags are present. To maintain no-JS behavior, explicitly setenable_cards_tag_filtering = false
in eitherconfig.toml
or the_index.md
file wherecards.html
is used.Summary
Adds interactive tag filtering for card grid layouts (e.g., projects/). Visitors can filter displayed items by clicking tags, with the current filter reflected in the URL (e.g.,
/projects#javascript
).Related issue
Resolves #422.
Details
Some neat features:
Progressive enhancement:
/tags/tag-name
)URL integration:
/projects#javascript
)Smart UX touches:
Full keyboard support:
Changes
local_image
orremote_image
), below the metadata (if present)enable_cards_tag_filtering
setting (defaults to true)filter_card_tags.html
for tag filter buttonsfilterCards.min.js
for interactive filtering behaviorAccessibility
role="button"
,aria-pressed
)Screenshots
With JS
Filtering projects with
automation
tag:Without JS
Links to a tag page. No "All projects" button, as it'd do nothing.
Post listing with project image
BEFORE: with square images
To add some spacing, you'd need to modify the image and add blank space.
AFTER: with square images
Feels more balanced, no?
Type of change
Checklist
theme.toml
with a sane default for the featureconfig.toml
commentstheme.toml
comments