thefrontside / thefrontside/interactors
Support passing matcher to filter definition
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 2
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
For some filters, we may want to provide a different matching experience by default. So that e.g. a className filter by default would match if one of the classes matches the given value. It would be cool if we could provide a matcher to use for this.
Note that with the current implementation, a Matcher is an already constructed value with a given value, so what we'd need is something like this:
type MatcherConstructor<T> = (value: T) => Matcher<T>;
Then:
createInteractor('element')
.filters({
className: {
apply: (element) => elemnent.className,
matcher: (value) => containsWord(value)
}
})
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the createInteractor filter-definition entry point and read the existing Matcher behavior. Trace how filter values are matched, then support a matcher constructor such as the proposed MatcherConstructor and verify that a className filter can use containsWord-style matching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100