• Robert Knight's avatar
    Enable embedder frame to override feature flags · 010ac9a5
    Robert Knight authored
    Allow the embedder frame to specify a list of feature flags that should be
    overridden in addition to those enabled in the H user profile. This will be used
    in the Hypothesis LMS app to enable feature flags to be turned on at the level
    of an LMS app installation, rather than for individual users.
    
    The ability to override flags has been limited to embedders (in practice, our
    LMS app) to try and avoid a situation where arbitrary web pages enable, and
    become dependent upon, feature flags that we later remove.
    
    The flags coming from the embedder add to, rather than replacing, the profile
    flags. This has been done to avoid a confusing situation where a feature flag
    that is enabled for "everyone" in H actually ends up not being enabled for all
    users due to eg. the LMS app disabling it for certain installations.
    
    Part of https://github.com/hypothesis/client/issues/5803
    
     - Change `ConfigFromHost` type to only include settings that can come from
       either the host frame or embedder frame. Settings that can only come from
       a specific context have been moved into the `ConfigFromAnnotator` or
       `ConfigFromEmbedder` types respectively.
    
     - Add `features` config to `ConfigFromEmbedder`
    
     - Add `features` store method which combines feature flags from profile and
       global settings
    
     - Replace some references to `Config*` types in `build-settings-test.js`. The
       type references were wrong because RPC calls return the `ConfigFromEmbedder`
       type, not `ConfigFromHost`.
    010ac9a5
Name
Last commit
Last update
.github Loading commit data...
.yarn 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...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.prettierignore Loading commit data...
.python-version Loading commit data...
.readthedocs.yaml Loading commit data...
.yarnrc.yml Loading commit data...
HACKING.md 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...
rollup-boot.config.mjs Loading commit data...
rollup-tests.config.mjs Loading commit data...
rollup.config.mjs Loading commit data...
tailwind-annotator.config.mjs Loading commit data...
tailwind-sidebar.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...