== Background ==
In T397532 We'll be introducing a new interface element for logged-in readers on the main article namespace: a bookmark icon in the main toolbar for adding articles to a reading list.
We would like to draw people attention to this icon the first time they encounter it, in order to explain what it's for.
=== User story ===
//As a logged-in reader, I'd like to know what this bookmark icon does before I click it.//
=== Design ===
=====First time the user is shown the Save icon
| {F65961631 width=550} |{F65961634 width = 300}
| When the Save icon is in the action bar, the onboarding dialog points to it | When the Save icon is in the tools menu, the onboarding dialog points to the tools menu
=====First time the user saves an article
| {F65961637 width=550} | {F65961639 width=300} |We would like to draw people attention to this icon the first time they encounter it, in order to explain what it's for.
| When the Saved list is in the header, the onboarding dialog points to the icon in the header | When Saved list is under the user menu, the onboarding dialog points to the user menu |Part 2 and 3 of this work is captured in T406923 and T406922
=====[[ https://www.figma.com/design/Q3pYKI7RRMdRRgkQp2RiTf/Web--Reading-List-Collections?node-id=493-44273&t=u6SWIY403irIahPz-4 | Link to Figma ]] User story ===
---As a logged-in reader, I'd like to be notified about the new Reading List feature only once
=== Acceptance criteria ===
[] The onboarding dialog informing users about the Save feature appears when the user is shown the Saved icon for the first time
[] The dialog points to where the Save feature is available depending on the width of the screen
[] The onboarding dialog informing users about Saved list appears when thes should only ever be showed once for user savess in their first page experiment
[] The dialog points to where the Save feature is available depending on the width of the screen
=== Requirements ===onboarding dialog follow the technical notes
[] Ensure we do not add a performance burden for all users (e.g. load the entirety of Codex on page load)
=== Open questions ===
[x] Persistence: Under what circumstances does it show? Is it only supposed to show once ? Does it show until they have a reading list that exists?
- The onboarding dialogs should only ever be showed once.ther notes ===
[x] Can GuidedTour be used here?
- Given that we only want to trigger one of the onboarding modals after a user interaction, and without the dark background, it seems simpler to use a custom Codex Popover component instead.
[x] How does this impact the add/remove toast notifications? Does onboarding show in addition to that or instead of?
- The onboarding modal should show instead of the add/remove toast.
[x] How should the onboarding dialog be exited?
- The onboarding dialog should be exited by clicking the 'x' button or clicking anywhere on the screens.
[x] Are there any accessibility considerations?
- No accessibility concerns have been raised so far.
=== Technical Notes ===
- The onboarding dialogs should be created as a custom Vue.js app that loads the Codex Popover component.
- The initial dialog should be shown if the user is bucketed in the experiment, has **zero** saved items, and has not seen the dialog previously. That item could will be available on the client as a data attribute on the bookmark icon.
- The shown state of the dialog should be stored in local storage.
- The dialog and it's dependencies (Vue, Codex) should be loaded dynamically on the client via mw.load() //after// checking the user is in the experiment, has zero saved lists, and hasn't seen the dialog before.
- The dialog should be loaded after a small timeout after pageload to minimize performance concerns, and to draw user attention to the dialog. 500ms or 1s after pageload.
- The second dialog, after user saves an item, can be overridden in [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ReadingLists/+/refs/heads/master/resources/ext.readingLists.bookmark/bookmark.js#96 | bookmark.js ]]
- The second dialog does not have to appear on the sticky header, only in the user overflow menu or user menu at smaller resolutions.
//This task was created by Version 1.0.0 of the Reader Experience team task template using [[ https://phabulous.toolforge.org/ | phabulous ]].//