www.fgks.org   »   [go: up one dir, main page]

Page MenuHomePhabricator

OnboardingDialog: Add OnboardingDialog component pattern to Codex
Open, HighPublic

Description

Background

There should be a unified, standard way to present "Onboarding" to a feature to users, and teams shouldn't be required to reinvent this wheel themselves, nor should users be presented with a different onboarding design for each feature they interact with.

The following subcomponents will need to be implemented as part of OnboardingDialog:

Description

A dialog that presents informational content about a feature or any matter in small steps. The dialog should allow the user to navigate steps back and forward. It should provide a clear call to action on the last step. It should also provide a way out for users who don't want to read the content at that particular moment. It should also provide a way for users to indicate they don't want to see that information again.

The specification of which information content could be shown is yet to decide and could be quite open. It's quite common to back information with images to make the overall reading experience more appealing. The text content could be quite arbitrary (see examples in Know use cases — "Add link on-boarding dialog").

User stories

  • As a user I want to see on-boarding information to MediaWiki features in an unified way
  • As a user I want to be able to navigate back and foward on-boarding information steps of a feature
  • As a user I want to be able to indicate that I don't want to see again the on-boarding information of a feature
  • As a user I want to be able to skip the on-boarding information of a feature at any time in the steps navigation
  • As a user I want to be able to see in which step of the on-boarding process I am (Step counter 1 of 3)

History

Codex dialog provides a starting point to build the described component. Also some of the work in T324708: Dialog: support header and footer customization could be used or extended to allow the needed customization. Some of the challenges in the current design are:

  • The dialog height should be the same across all steps, at the moment the Codex's dialog height can grow or shrink based on its content
  • There's a bleeding image which is difficult to implement due to the Codex's dialogs content body padding. Also the header background color is matching the image background.
  • The main action buttons (and Don't show me again checkbox) are placed in a footer fixed at the dialog's vertical end

Known use cases

  • Growth team — GrowthExtensions — Add image on-boarding dialog T329038
  • Growth team — GrowthExtensions — Add link on-boarding dialog T329037
Step 1Step 2Step 3
Screenshot 2023-02-07 at 12.39.01.png (1×1 px, 132 KB)
Screenshot 2023-02-07 at 12.39.11.png (1×1 px, 107 KB)
Screenshot 2023-02-07 at 12.39.19.png (1×1 px, 94 KB)
  • VisualEditor
    image.png (984×2 px, 306 KB)
  • Section Translation
    image.png (714×928 px, 422 KB)

Existing implementations

These artifacts are listed for historical context. The figma spec, linked below, is the source of truth for the new component.

Wikimedia community:

  • Design style guide:
  • OOUI:
  • Vue:

External libraries:

  • Add links to any examples from external libraries

Codex implementation

Component task owners

Open questions

  • Image/Illustration: We will implement an image component’s property and the designer will create an illustration with this format/size and they will export the illustration as an asset so developers can use it as image.
  • Scroll behavior for both desktop and mobile (portrait and landscape)
  • Stepper placement: it will be placed below the dialog's title (in the same place of the dialog's subtitle)
  • Buttons and “Don’t show again” position: Next/Previous buttons will be grouped on the right (as we have in Dialog component) and “Don’t show again" will be always placed on the left. We will do the opposite when RTL.
  • "Don't show again" maximum example: as we defined in Dialog's component, "Don't show again" will move above buttons when its text is so long. The footer height will increase.
  • Next/Previous icon: they will use cdxIconNext and cdxIconPrevious
  • Number of steps: the minimum will be 1 step and the maximum will be free. The close button will vary depending on the number of the steps, and the steppers will be displayed just when more than 1 step.
  • Dividers (header and footer): as we defined in Dialog's component, dividers will be visible just when scrolling (this scrolling behavior will be implemented in T332124)
  • How to build this pattern in Figma: for now, we will implement the main component as a separate Figma component (not using Dialog component to build the OnboardingDialog pattern) since we want to display just the Onboarding Dialog properties in this Figma component. Also, for designers will be easier to have a separate OnboardingDialog Figma component instead.

Design spec

Anatomy
  • Header:
    • Onboarding Title
    • Close button. "Skip all" when more than 2 steps and icon-only close button when just 1 step. Close button is a customizable property so the user will be able to hide/display the button.
    • Stepper: it will be implemented below the dialog's title (in the dialog's subtitle place).
  • Image: this image will use a background-color-progressive-subtle so the user will use a PNG illustration where the background will be always the same color. We will implement a max-height for the image:
    • Desktop: max-height size-1600 (256px)
    • Mobile: max-height size-800 (128px)
  • Body content:
    • Step title
    • Body text
    • Complementary text (optional)
  • Footer:
    • Permanent action ("Don't show again") on the right: it will be implemented as a customizable component's property so it can be displayed in any step, or none.
    • Previous/Next buttons: they will be grouped on the right (as we have in the dialog's component) and they will use an icon-only button, except the last step where the "Next" button will be a text button.
Style
NOTE: Onboarding Dialog pattern will be build with the Dialog component, so styles and component's behavior will match.
Interaction
  • States: Onboarding Dialog is just informative so it only uses default state.
  • Scroll: It will affect the entire body content including the image (as in Dialog's component) and the header and footer will be fixed displaying a divider when scrolling.
  • Swipe: On mobile and tablet, the user will use the gesture swipe to navigate within steps.
Documentation
  1. Configurable demo with the following properties:
    • Title
    • Stepper: show/hide the stepper
    • Skip button: customizable text
    • Step title: customizable text
    • Body text: customizable text
    • Complementary text: customizable text
    • "Don't show again": show/hide it or place it on any of the steps

Acceptance criteria

Minimum viable product

This task covers the minimum viable product (MVP) version of this component. MVP includes basic layout, default states, and most important functionality.

MVP scope

  • List all parts of the MVP scope for this component

Design

  • Design the Figma spec sheet and add a link to it in this task
  • Create the main component in the Figma library. This step will be done by a DST member.

Code

  • Implement the component in Codex
Future work
  • If applicable, list future work that should be done for this component after the MVP is implemented as part of this task. You should open new, standalone tasks for all future work.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Sgs updated the task description. (Show Details)

FWIW, there is an onboarding dialog on the SuggestedTags page on Commons that is not a process dialog.

image.png (1×640 px, 71 KB)

See T233233.

Would the UploadWizard onboarding screen be covered here?

Would the UploadWizard onboarding screen be covered here?

@Cparle Do you have a screenshot or link to where one could see that?

I'm hoping to make this easier as part of T324708: Dialog: support header and footer customization, if you all can afford to wait a week or two on this. My current patch introduces header and footer slots which would allow you to provide your own markup to this component without having to either 1) re-implement everything or 2) write a bunch of hacky CSS to hide or override things that are not intended to be overridden.

Here's an example: https://900456--wikimedia-codex.netlify.app/components/demos/dialog.html#with-custom-header-and-footer

The visual editor has a couple of onboarding/informational bits:

Screen Shot 2023-03-22 at 3.53.57 PM.png (830×1 px, 162 KB)

Screen Shot 2023-03-22 at 3.54.19 PM.png (262×1 px, 25 KB)

Screen Shot 2023-03-22 at 3.55.42 PM.png (1×894 px, 205 KB)

Screen Shot 2023-03-22 at 3.55.51 PM.png (1×916 px, 194 KB)

There are also some messages like https://www.mediawiki.org/wiki/MediaWiki:Anoneditwarning that I think are more "warning" than "onboarding", but new editors might be particularly likely to see them.

Until this week (when it was deleted), WikiEditor had an onboarding popup for Realtime Preview that looked like this:

Screenshot 2023-03-23 at 09-03-55 Editing Phonos2 - Dev wiki1.png (404×366 px, 21 KB)

The Wikisource extension has one for the OCR button (part of Wikimedia OCR):

Screenshot 2023-03-23 at 09-07-45 Editing Page Gissing - Workers in the Dawn vol. I 1880.djvu_10 - Dev wiki1.png (421×373 px, 25 KB)

RHo renamed this task from OnboardingDialog: Add OnboardingDialog component to Codex to OnboardingDialog: Add OnboardingDialog component pattern to Codex.Mar 30 2023, 12:52 PM
RHo updated the task description. (Show Details)

DST has decided to move forward with treating the onboarding dialog use case as the first Codex pattern. Part of creating the pattern will be defining it's intended use case. Thank you to everyone who has provided examples. Some of the examples provided in this ticket are related to feature onboarding, but outside the scope of this specific pattern. This pattern focuses on a single or multi-step dialog, as opposed to something more akin to a tooltip that directs the users attention to a specific part of the interface.

As part of this work, we plan to update the Figma library and the Codex docsite with the pattern's definition and example usage.

bmartinezcalvo added a project: Design.

As we decided during our last DST planning, I'm moving this task to the sprint so I can work on the design specs.

Restricted Application triaged this task as High priority. · View Herald TranscriptApr 11 2023, 2:41 PM

hi @Sgs - one thing that came up during design review today was that the current Growth onboarding dialogs have gesture support to move forward/back in the steps via swipe, so my expectation would be that this should be in the new version and should be documented in this pattern too. Is that correct?

bmartinezcalvo added a subscriber: KieranMcCann.

I've defined the OnboardingDialog pattern spec sheet with the following:

Illustration (or image)

We will implement an image component’s property and the designer will create an illustration with this format/size and they will export the illustration as an asset so developers can use it as image.

Next/Previous buttons and "Don't show again" position

They will be grouped on the right (as we have in the Dialog component) and “Don’t show again will be always placed on the left. We will do the opposite when RTL.

"Don't show again" maximum example

As we defined in Dialog's component, "Don't show again" will move above buttons when its text is so long. The footer height will increase.

Steps number in the onboarding

The minimum will be 1 step and the maximum will be free (close button will be different and steppers will be displayed just when more than 1 step).

Dividers (header and footer)

As we defined in Dialog's component, dividers will be visible just when scrolling. This will be implemented in T332124.


@KieranMcCann assigning this task to you so you can provide feedback about some pending visual decisions:

  • Next/Previous buttons:
    • Icons: iconNext or iconArrowNext?
      Captura de pantalla 2023-04-18 a las 16.30.48.png (1×1 px, 571 KB)
    • Padding between buttons. Although the padding defined between buttons on Dialog's component was 8px, do you think we should increase it to 12px so buttons are visually more separated when using icon-only buttons?
      Captura de pantalla 2023-04-18 a las 16.31.44.png (1×1 px, 1 MB)
  • Apart form this, feel free to provide feedback about any other elements in the Figma spec.

Regarding stepper placement, I will have a meeting with @RHo (since she was the Growth's onboarding dialog designer) to decide the best solution and also to prepare the spec sheet for Growth's team handoff.

hi @Sgs - one thing that came up during design review today was that the current Growth onboarding dialogs have gesture support to move forward/back in the steps via swipe, so my expectation would be that this should be in the new version and should be documented in this pattern too. Is that correct?

I don't know where should mobile gestures specifications be documented, do we have an example of a Codex component which provides support for them?

afaik Vue provides touch low level events, eg touchstart, touchend and there are libraries (vue3-touch-events) that implement higher level events, eg: tap, swipe, hold, drag, etc. which is the kind of interaction you are requesting. It would be interesting to know the Design-System-Team view on this. Will Codex support mobile gestures as first class interactions? Or do we have a recommended way of tying together Codex with mobile gestures, a plugin maybe?

I've defined the OnboardingDialog pattern spec sheet with the following:

Illustration (or image)

We will implement an image component’s property and the designer will create an illustration with this format/size and they will export the illustration as an asset so developers can use it as image.

Next/Previous buttons and "Don't show again" position

They will be grouped on the right (as we have in the Dialog component) and “Don’t show again will be always placed on the left. We will do the opposite when RTL.

"Don't show again" maximum example

As we defined in Dialog's component, "Don't show again" will move above buttons when its text is so long. The footer height will increase.

Steps number in the onboarding

The minimum will be 1 step and the maximum will be free (close button will be different and steppers will be displayed just when more than 1 step).

Dividers (header and footer)

As we defined in Dialog's component, dividers will be visible just when scrolling. This will be implemented in T332124.


@KieranMcCann assigning this task to you so you can provide feedback about some pending visual decisions:

  • Next/Previous buttons:
    • Icons: iconNext or iconArrowNext?
      Captura de pantalla 2023-04-18 a las 16.30.48.png (1×1 px, 571 KB)
    • Padding between buttons. Although the padding defined between buttons on Dialog's component was 8px, do you think we should increase it to 12px so buttons are visually more separated when using icon-only buttons?
      Captura de pantalla 2023-04-18 a las 16.31.44.png (1×1 px, 1 MB)
  • Apart form this, feel free to provide feedback about any other elements in the Figma spec.

Regarding stepper placement, I will have a meeting with @RHo (since she was the Growth's onboarding dialog designer) to decide the best solution and also to prepare the spec sheet for Growth's team handoff.

After design details are resolved, we will present the "Pattern" spec with Growth eng working on this, @Sgs and @VYanez-WMF.

hi @Sgs - one thing that came up during design review today was that the current Growth onboarding dialogs have gesture support to move forward/back in the steps via swipe, so my expectation would be that this should be in the new version and should be documented in this pattern too. Is that correct?

I don't know where should mobile gestures specifications be documented, do we have an example of a Codex component which provides support for them?

afaik Vue provides touch low level events, eg touchstart, touchend and there are libraries (vue3-touch-events) that implement higher level events, eg: tap, swipe, hold, drag, etc. which is the kind of interaction you are requesting. It would be interesting to know the Design-System-Team view on this. Will Codex support mobile gestures as first class interactions? Or do we have a recommended way of tying together Codex with mobile gestures, a plugin maybe?

Maybe @AnneT has some more info on this? I think even if Codex doesn't yet have this, it would make sense for Growth to not lose this existing functionality in moving to Vue though, so I wonder if this is something that is contributed by Growth in v1?
If so, would it make sense for @bmartinezcalvo to add to the Pattern documentation for Onboarding dialogs (and/or the stepper?)?

Maybe @AnneT has some more info on this? I think even if Codex doesn't yet have this, it would make sense for Growth to not lose this existing functionality in moving to Vue though, so I wonder if this is something that is contributed by Growth in v1?
If so, would it make sense for @bmartinezcalvo to add to the Pattern documentation for Onboarding dialogs (and/or the stepper?)?

@Sgs @RHo I've documented the gestures for both mobile and tablet in the Figma spec, and I included a text next to the image, but not sure if this is enough for devs. Should I include something more?

Captura de pantalla 2023-04-19 a las 16.49.09.png (1×2 px, 963 KB)

Maybe @AnneT has some more info on this? I think even if Codex doesn't yet have this, it would make sense for Growth to not lose this existing functionality in moving to Vue though, so I wonder if this is something that is contributed by Growth in v1?

Yes, that makes total sense, we would't want to loose support for mobile gestures in the Growth dialogs. The existing swipe implementation is indeed implemented in the GrowthExperiments code, I've filed T335044: Add support for swiping between steps on mobile for this. I think it would be nice to think about Codex defaults for mobile experiences in general not just the scope of the Dialog component. This is somehow related to T321893: Evaluate fullscreen mobile Dialog in Codex which is another blocker for the new on-boarding dialog to mimic the behavior of the old one.

If so, would it make sense for @bmartinezcalvo to add to the Pattern documentation for Onboarding dialogs (and/or the stepper?)?

Sure, better to document all relevant specifications in Figma. Two questions that are still unclear to me are:

  • How many components are we planning to build?
  • Are any of these "planned" components still candidates to an eventual Codex upstream? If not, how could this pattern be replicated in a different extension than GrowthExperiments?

afaik Vue provides touch low level events, eg touchstart, touchend and there are libraries (vue3-touch-events) that implement higher level events, eg: tap, swipe, hold, drag, etc. which is the kind of interaction you are requesting. It would be interesting to know the Design-System-Team view on this. Will Codex support mobile gestures as first class interactions? Or do we have a recommended way of tying together Codex with mobile gestures, a plugin maybe?

This is a good question. So far this hasn't come up yet, but if you are already supporting these gestures in the OOUI implementation and don't want to lose them then perhaps we need to consider how we want to approach this.

This is potentially a bigger issue that goes beyond the scope of just the OnboardingDialog, so I went ahead and filed a task for it: T335047: Better support for mobile touch events in Codex. Feel free to weigh in there if you have ideas.

@Sgs do you consider work on OnboardingDialog to be blocked until the question of mobile touch event support is resolved?

@Sgs do you consider work on OnboardingDialog to be blocked until the question of mobile touch event support is resolved?

No, I think we can come up with a custom implementation using touchstart, touchend events as we did with OOUI. I've filed T335044 for the Growth team to work on it.

This is potentially a bigger issue that goes beyond the scope of just the OnboardingDialog, so I went ahead and filed a task for it: T335047: Better support for mobile touch events in Codex. Feel free to weigh in there if you have ideas.

Right, thank you! We'll share our learning from T335044 there as it might be useful feedback.

Thanks @bmartinezcalvo. Comments below:

  • Next/Previous buttons:
    • Icons: iconNext or iconArrowNext?
      Captura de pantalla 2023-04-18 a las 16.30.48.png (1×1 px, 571 KB)

Personally I have a preference for Op.1 (current arrows). This might be partially due to familiarity but I also feel that the new arrows indicate movement i.e. that they would be used when indicating you were moving a component to a new space on the page or collapsing it.

  • Padding between buttons. Although the padding defined between buttons on Dialog's component was 8px, do you think we should increase it to 12px so buttons are visually more separated when using icon-only buttons?
    Captura de pantalla 2023-04-18 a las 16.31.44.png (1×1 px, 1 MB)

Preference for Op.2 (12px padding). 8px feels a bit tight to my eyes.

Thanks @bmartinezcalvo. Comments below:

  • Next/Previous buttons:
    • Icons: iconNext or iconArrowNext?
      Captura de pantalla 2023-04-18 a las 16.30.48.png (1×1 px, 571 KB)

Personally I have a preference for Op.1 (current arrows). This might be partially due to familiarity but I also feel that the new arrows indicate movement i.e. that they would be used when indicating you were moving a component to a new space on the page or collapsing it.

@KieranMcCann in makes sense. The current arrow (Op.1) is being used in other Back/Next patterns so let's use it in this Onboarding Dialog.

  • Padding between buttons. Although the padding defined between buttons on Dialog's component was 8px, do you think we should increase it to 12px so buttons are visually more separated when using icon-only buttons?
    Captura de pantalla 2023-04-18 a las 16.31.44.png (1×1 px, 1 MB)

Preference for Op.2 (12px padding). 8px feels a bit tight to my eyes.

@KieranMcCann at the moment, we are using 8px padding between buttons in both desktop and mobile dialog. Since the Onboarding Dialog pattern is created with the Dialog component, we should use the same padding in both. This means we should increase the padding between buttons in the Dialog component first. Would you increase the padding between buttons on both desktop and mobile or just on mobile?

The Figma spec has been completed and the Onboarding Dialog pattern is Ready for development. I've included in both the Figma spec and the task description the most relevant information about this pattern.

{F36966601}

The stepper will be finally placed below the dialog's title (in the same place where the dialog's subtitle was). Regarding the Image, we've defined a max height for both desktop and mobile images, so the image doesn't take up too much space in the dialog.

Regarding the button's padding, we will go with 8px for now (as we have in the Dialog component) and we will increase the padding to 12px in the Dialog component if needed in the future. Since the Onboarding Dialog pattern uses the same styles as the Dialog component, the padding should be increased in the Dialog first (so it's not a priority for this task).

Sure, better to document all relevant specifications in Figma. Two questions that are still unclear to me are:

  • How many components (composables, mixins, etc) are we planning to build?
  • Are any of these "planned" components still candidates to an eventual Codex upstream? If not, how could this pattern be replicated in a different extension than GrowthExperiments?

I believe this questions remain unanswered, I think this is relevant to make the investment on developing the spec worth.

Per meeting on Tuesday 9th of May there might be room for several reusable artifacts (components, composables, mixins, tokens) for building and making the work reusable for others. Anticipating all of them is challenging. Growth team will document the outcome of a first iteration of the Figma specification for this pattern in T336270.

Moving this to "Following" for now since DST isn't actively working on this ticket, even though we were working on some of the related tasks. We may put this on another board in the future (potentially a "DST Roadmap" or "Collaborations" board).