We have a very basic prototype for a potential "share highlight" feature here: https://gitlab.wikimedia.org/egardner/wiki-social-dialog/
This codebase is a Vue 3 / Codex single-page application that should be fairly compatible with the existing ReaderExperiments codebase.
Acceptance Criteria
- Set up a new shareHighlight module in the ReaderExperiments extension. Add Vue and Codex as dependencies.
- Port over the relevant files (the code in src/ mainly)
- Add any necessary 3rd-party NPM packages (the prototype code uses https://www.npmjs.com/package/html-to-image to generate images) as extension-specific foreign resource modules
- Add some logic in the Hooks PHP file to enable activation via MPO override (similar to how we handle other experiments)
- Like most of our other features, this one can probably be mobile-only for now
- Replace hard-coded strings with i18n messages
When this work is complete, it should be possible to enable experiment override via the appropriate URL params and trigger this feature (on mobile view, on article pages) by selecting some text in the browser.