• 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
..
test Loading commit data...
activity.ts Loading commit data...
annotations.ts Loading commit data...
defaults.ts Loading commit data...
direct-linked.ts Loading commit data...
drafts.ts Loading commit data...
filters.ts Loading commit data...
frames.ts Loading commit data...
groups.ts Loading commit data...
links.ts Loading commit data...
real-time-updates.ts Loading commit data...
route.ts Loading commit data...
selection.ts Loading commit data...
session.ts Loading commit data...
sidebar-panels.ts Loading commit data...
toast-messages.ts Loading commit data...
viewer.ts Loading commit data...