• Robert Knight's avatar
    Refactor annotation filtering to improve typing and documentation · d4d8c0bf
    Robert Knight authored
    Replace the loosely typed `Checker` interface in `view-filter.js`, which
    used `any` for field values, with a `Matcher` interface which is
    parametrized by the type of parsed query terms/field values. In order to
    do this it was necessary to make normalization of query terms/field
    values part of the `Matcher` interface.
    
    In the process, some additional simplifications/clean-up has been done:
    
     - Remove the `autofalse` check. This was a very minor optimization and many of
       these functions were broken in the sense that they could never return false,
       in order to short-circuit filtering, given the current types of `Annotation`
       object fields.
    
     - Fix a very minor bug where user query terms that contained a suffix
       of the username followed by a prefix of the display name could match.
       The query term should be tested against the username and display name
       separately.
    
     - Eliminate unused `field` argument to TermFilter constructor
    d4d8c0bf
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev-server Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
requirements Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.dockerignore Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.prettierignore Loading commit data...
.python-version Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Dockerfile Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
codecov.yml Loading commit data...
gulpfile.mjs Loading commit data...
package.json Loading commit data...
pyproject.toml Loading commit data...
requirements-dev.in Loading commit data...
rollup-boot.config.mjs Loading commit data...
rollup-tests.config.mjs Loading commit data...
rollup.config.mjs Loading commit data...
tailwind.config.mjs Loading commit data...
tox.ini Loading commit data...
tsconfig.json Loading commit data...
yarn.lock Loading commit data...