Skip to content

string match mode, group items, allow disabling URL control for certain filters - #2

Open
saitho wants to merge 5 commits into
zachleat:mainfrom
saitho:feature/string-match-mode
Open

string match mode, group items, allow disabling URL control for certain filters#2
saitho wants to merge 5 commits into
zachleat:mainfrom
saitho:feature/string-match-mode

Conversation

@saitho

@saitho saitho commented Apr 14, 2024

Copy link
Copy Markdown

Add new setting filter-match-mode to control how strings should be matched.
Per default it matches strictly (string completely equals the input).
But it allows matching substrings:

<filter-container oninit delimiter="," filter-mode="any" filter-match-mode="contains">

or restrict it to input named "title":

<filter-container oninit delimiter="," filter-mode="any" filter-match-mode-title="contains">


Additional features included:

  • Allow disabling URL control by filter name
  • Filter groups: filter items can be added to a group. Labels for that group are hidden when no items from that group is visible

@saitho
saitho marked this pull request as draft January 4, 2025 01:24
@saitho saitho changed the title Feature/string match mode string match mode, group items, allow disabling URL control for certain filters Jan 7, 2025
@saitho
saitho marked this pull request as ready for review January 7, 2025 14:00
@saitho

saitho commented Jan 7, 2025

Copy link
Copy Markdown
Author

I added two new features (disable URL control for certain filters and filter groups)
Both features are used here: https://www.synchronevents.de/veranstaltungen

match-mode can be tested here: https://conan-tcg.net/cards/
"Name" matches by contains (search for "Edo"), while "Card ID" matches exactly (search for "P001")

saitho and others added 5 commits January 18, 2025 12:04
filter-match-mode allows to define how strings should match.
Options: strict (default) or contains
"substr" is deprecated and replaced by "substring"
@saitho
saitho force-pushed the feature/string-match-mode branch from ce3d894 to 8fd358a Compare January 18, 2025 11:10
@saitho

saitho commented Jan 18, 2025

Copy link
Copy Markdown
Author

New attribute filter-input-delimiter-[filter name] on filter container allows splitting the input (mainly useful for text input fields) into multiple strings that are matched as single values.
Can be tested on https://conan-tcg.net/cards/ in Card ID searching for "P002,P003". URL update also takes that into account by combining the values with the set delimiter, which is why this is a filter container setting, not an input setting.

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.

1 participant