-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add customizable side-by-side mode to HTMLIntegration #5604
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5604 +/- ##
==========================================
+ Coverage 99.42% 99.43% +0.01%
==========================================
Files 239 239
Lines 9421 9427 +6
Branches 2229 2236 +7
==========================================
+ Hits 9367 9374 +7
+ Misses 54 53 -1
... and 16 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
efbdad7
to
8be0d0e
Compare
2aabbbe
to
456ecce
Compare
3accd6f
to
8e28fb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration interface looks good. I think the logic around merging the feature flag and configuration states can potentially be simplified. See my notes.
8e28fb4
to
e19900e
Compare
I think the answer here can be that we just don't support this flag if other integrations are used. In both cases we are effectively the maintainer of the app that is hosting Hypothesis (or at least, the integration of that app with Hypothesis). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the feature flag is off when HTMLIntegration
is instantiated, the feature remains disabled if the user logs in to a profile where the feature flag is enabled.
e19900e
to
4b999a0
Compare
4b999a0
to
021834e
Compare
This PR introduces options in
HTMLIntegration
, designed for host applications to have more control overside-by-side
mode.Currently, the only supported option is
mode
, which can take these values:auto
: It's the client's default value. It will apply some heuristics to determine how the content is affected.manual
: expresses the intention of the host app to take control of side-by-side, disabling the logic in the client.This PR does not cover
How these options apply to other integrations (PDF and VitalSource).We won't support this for nowThese will come in follow-up PRs and discussions.