hypothesis / hypothesis/product-backlog
Adjust initial width of sidebar to try to avoid covering content
- Dominant language
- No language data
- Stars
- 122
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request Form
### Problem you are trying to address with this feature
See https://github.com/hypothesis/product-backlog/issues/94 . Whereas #94 is a very general description of the problem, this issue is a description of a specific solution which may be relatively simple to implement and automated (that is, no work required from the publisher and no configuration for the user) but would only address certain cases of the problem.
In particular it is focused on news & academic articles in HTML format where there is a typically a single column containing the main content on the page, which has a margin to the left/right. There is often enough space in this margin on desktops to fit the sidebar without needing to squash the content in any way, though the sidebar would need to be adjusted from its default width of 428px.
The idea, implemented in the prototype, is to adjust the initial width of the sidebar, subject to min/max width constraints, so that it does not cover the primary content on the page. The "primary content" of the page is determined by analysing the paragraph elements that appear in the page.
### Your solution
Prototype & explanation: https://github.com/hypothesis/client/pull/394
Work required:
- Implement ability to feature-flag changes to code that runs in the context of the host page, so that we can test this out with a limited audience.
- Add a feature flag for this change
- Flesh out the prototype & write tests.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the prototype and explanation in pull request #394, then locate the host-page code responsible for the sidebar's initial width and existing feature-flag mechanism. Flesh out the paragraph-based content analysis, add a feature flag, and write tests covering the constrained width behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100