Skip to content

Conversation

@pinion05
Copy link

@pinion05 pinion05 commented Apr 23, 2025

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

close #2686

Overview of changes:
Add a button to improve UX by allowing readers to choose and/or filtering when multiple tags are selected

Anything you'd like to highlight/discuss:

Testing instructions:
Check if filtering works well when "match all selected" is set to true/false with multiple tags checked
Screencast from 2025년 04월 23일 23시 25분 18초.webm

Proposed commit message: (wrap lines at 72 characters)

Feat: Add multi-tag filtering options

Adds a button or toggle to allow users to switch between
"match all selected tags" and "match any selected tags" when
filtering content. This improves the user experience for readers
navigating items with multiple tags applied.

The filtering logic is updated to support both modes based on
the user's selection. Documentation is updated accordingly.

close #2686



Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.88%. Comparing base (9c33eb4) to head (68df516).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2713      +/-   ##
==========================================
+ Coverage   52.84%   52.88%   +0.03%     
==========================================
  Files         130      130              
  Lines        7162     7169       +7     
  Branches     1503     1503              
==========================================
+ Hits         3785     3791       +6     
- Misses       3072     3223     +151     
+ Partials      305      155     -150     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Incogdino Incogdino left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This feature defitnitely gives users greater flexibility when choosing between the different search options.

Left some comments mainly targetting documentation and naming.

</span>
</span>
<span class="toggle-badge" @click="toggleFilterMode">
match all selected
Copy link
Contributor

Choose a reason for hiding this comment

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

Match all selected - Could you capitalize the start of the word?

},
methods: {
toggleFilterMode() {
this.filterMode = this.filterMode === 'AND' ? 'OR' : 'AND';
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps using a Boolean to represent this would be better? Changing the naming of filterMode to isAndFilter and toggling between them with the Logical NOT operator !

- a `card` can be given a `header` attribute (optional).
- tags can be added to cards using the `tag` attribute, which can then be used to filter cards.
- the `searchable` attribute can be used to make the Card Stack searchable based on tags and headers.
- The `match all selected` toggle filters cards based on an AND condition across the selected tags.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a minor casing issue
"The Match all selected toggle filters cards based on an AND condition across the selected tags."

Copy link
Contributor

Choose a reason for hiding this comment

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

Also can maybe add a short sentence behind talking about the default OR behaviour if not selected.

:class="['btn', 'btn-sm', `tag-badge`]"
>
<span class="badge bg-light text-dark tag-indicator">
<span v-if="filterMode === 'AND'">✓</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. Can use Boolean naming?

@pinion05 pinion05 closed this Apr 27, 2025
@pinion05 pinion05 deleted the feature/tag-filtering-options branch April 27, 2025 11:58
@pinion05 pinion05 restored the feature/tag-filtering-options branch May 15, 2025 06:23
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.

Add AND/OR tag search to card stack component

2 participants