Page MenuHomePhabricator

Refactor OnboardingStep component to named slots
Closed, ResolvedPublic

Description

We can eliminate OnboardingStep component and pass content to each step using named slots. This seems more conventional in Vue - MW code like Codex than pairing/coupling components, eg: <List> and <ListItem>.

Acceptance criteria

  • OnboardingStep component is removed
  • OnboardingDialog can be used as it was with OnboardingStep but with an arbitrary number of steps: step1, step2... stepN
  • AddLinkDialog does not need to know about currentIndex or step navigation handling
  • OnboardingDialog emits events when there are navigation interactions and/or the currentIndex value changes so AddLinkDialog can subscribe to those events and instrument them
  • AddLinkDialog can read the value of currentIndex or step navigation interactions through events

Nice to have

  • OnboardingDialog can be used without any step and use the default slot to render some content on its body

Event Timeline

Sgs changed the task status from Open to In Progress.Apr 12 2023, 10:18 AM
Sgs moved this task from Incoming to In Progress on the Growth-Team (Sprint 0 (Growth Team)) board.

Change 908475 had a related patch set uploaded (by Viviana Yanez; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Frontend documentation: refactor OnboardingStep to named slots

https://gerrit.wikimedia.org/r/908475

This is an internal refactor to remove the need of the component <OnboardingStep>, the visual aspect and behavior of the demos should remain intact. Moving to test in production since we don't have an staging area yet for the frontend documentation. Documentation on the usage of the slots will be added within T333346.

Change 908475 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Frontend documentation: refactor OnboardingStep to named slots

https://gerrit.wikimedia.org/r/908475