Remove the support for multiple impress root elements on a page
- Dominant language
- JavaScript
- Stars
- 38.2k
- Forks
- 6.6k
- PR merge metrics
- No merged PRs in 30d
Description
impress.js has an interesting feature where *in theory* you can have multiple impress root elements on the same page, and init() and navigate each of them independently via their own api object. In practice however, several plugins, as well as the use of `#/step-id` in the url, will only work for a single presentation. For example, if you press the right key, all presentations would move to the next step.
While removing the support for multiple root elements, it must still remain possible to use any id for the root element, not just the default and common `id="impress"`.
Related code:
https://github.com/impress/impress.js/blob/e52866d1c46228049d7ac6e8860bf8e9145b1467/src/impress.js#L205-L210
https://github.com/impress/impress.js/blob/e52866d1c46228049d7ac6e8860bf8e9145b1467/src/impress.js#L804-L812
And also src/lib/gc.js
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the referenced sections of src/impress.js around lines 205-210 and 804-812, then inspect src/lib/gc.js and the related plugin behavior. Trace how root elements are selected and how initialization and navigation are shared. Done means multiple root elements are no longer supported while a single presentation can still use any root element id, not only "impress".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100