Page MenuHomePhabricator

Develop a component epic task template for Codex components
Closed, ResolvedPublic

Description

The first wave of Codex components were mostly represented in Phabricator by a single task that was passed from design to development, then back to design for review, then back to development for further work, and so on. This often led to:

  • Confusion over the status of a component task
  • Difficulty finding design/implementation details
  • Long comment threads
  • Lack of clarity as far as who should be assigned to a task at a given time

Additionally, components were fully designed then fully implemented. This led to:

  • Additional design work or design decisions identified during component development or code review
  • General lack of alignment between design and development until deep in the process
  • Large, complex patches that took many days to finalize and merge

Finally, we'd like for people outside of the Design Systems Team to be able to propose components by adding a task with enough information to kick off the decision-making process. We'd also like smaller tasks for people outside the team to be able to pick up.

To resolve these issues, we'd like to:

  • Create a process for iteratively designing and developing a component. This will mean more collaboration between design and development earlier in the process, smaller tasks and patches, the ability to distribute the work among more people, and a clearer Phab workflow.
  • Develop a template for component epic tasks that gathers necessary information and walks us through this iterative process

Below is a draft of a template (I don't have permission to create a form in Phab) that we could eventually use to build component epic tasks.


Background

NOTE: When creating a component task, please try to fill out the entire Background section. The rest of the task description can be populated later.
  • Description: add a brief description of this component
  • History: describe or link to prior discussions related to this component
  • Known use case(s): describe known use cases for this component, including the project, team, and timeline
  • Considerations: list any known challenges or blockers, or any other important information

User stories

  • add at least one user story

Previous implementations

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


Codex implementation

Component task owners

  • Designer: add the main designer's name
  • Developer: add the main developer's name

Design spec

Once a component spec sheet has been created in Figma, remove the note stating that the spec is missing and link to the spec below.

A component spec sheet has not been created yet.

Component spec sheet

Stage 1: Minimum viable product (MVP)

MVP includes basic layout, default states, and most important functionality.

Acceptance criteria

  • Determine what MVP includes for this component and document this in a subtask. Assign task to designer.
  • Design MVP. Once complete, assign task to developer.
  • Implement MVP

Stage 2: Additional states, features, and variants

This might include a disabled state, framed/frameless designs, transitions, supporting different use cases, etc., which will be captured in separate subtasks.

Acceptance criteria

  • Document design and implementation of additional states and features in individual subtasks
  • Complete each additional state/feature subtask

Stage 3: Refinement

This stage includes any final touches or bug fixes needed before the component can be deemed complete, which will be captured in separate subtasks.

Acceptance criteria

  • Finalize docs: open and complete a subtask for any additional demos that need to be added or documentation that needs work
  • Meet accessibility standards: open and complete a subtask for any necessary accessibility improvements
  • Meet internationalization standards: open and complete a subtask to fix any i18n bugs
  • Complete testing: open and complete a subtask for any additional unit or functional tests that are needed

Event Timeline

Some notes:

  • Testing: I debated how to include things like demo development, unit testing, and functional testing in the process. I ended up deciding that these things should probably come standard in the development of MVP and all subsequent tasks, rather than separating them out. I think it's more valuable to develop a demo and tests for each feature that you're building while you're building it; otherwise you may have to go back and refactor code if, say, unit tests later show a major flaw in your logic. I would also imagine that the MVP task and each subtask would go through QA individually, rather than all QA happening at the end. That said, I'm interested to hear what @EUdoh-WMF and others think about this.
  • Defining MVP and subsequent features: To avoid duplicate information that could get out of sync, we should try to define all of this in subtasks: an MVP subtask describing the acceptance criteria for MVP determined by the designer and developer, then more subtasks for each additional state or feature. Then, in the epic task, we can just use the list of subtasks to determine when each stage is complete. @Sarai-WMDE I'd love to talk more about iteratively designing/developing a component together. Maybe we could even pick one as a pilot test?

Feedback is very welcome!

I filled out the proposed template for T309239, a moderately complex component, just to see how it felt. Instead of actually creating subtasks for MVP and other features, I just added lists of what those things could entail.

I think this is a great idea that will dramatically improve our process for developing new components!

One thing that I think we should keep in mind is that, after stage 1, we'll have a component implementation in the repository that isn't yet ready for external use. I think we should decide how we handle that from a release perspective. We could wait to do a release until all in-progress components are complete (and there are no new in-progress ones), but I don't think that's always going to be realistic. Instead, I suggest that we leave in-progress components out of src/lib.ts, so that they're not exported as part of the library. In our current setup, that would break the demos for that component, but we could address that by pointing the docs site's alias for @wikimedia/codex to a new lib-demo.ts file (or lib-experimental.ts or some other name) that exports everything from lib.ts plus unfinished components.

ldelench_wmf subscribed.

Discussed: we will prioritize for this sprint as our one "meta" task we want to tackle.
Triaging as "high" for now; feel free to adjust!

Change 801816 had a related patch set uploaded (by Catrope; author: Catrope):

[design/codex@main] build: Add separate entry point for experimental components

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

I really like the idea.
Just for understanding though, the Codex demo site is our public facing site pointing at lib-experimental then, how would we make it clear to consumers what is experimental and what not only by looking at the demo site and not into the entry points code?

I think this is a great idea that will dramatically improve our process for developing new components!

One thing that I think we should keep in mind is that, after stage 1, we'll have a component implementation in the repository that isn't yet ready for external use. I think we should decide how we handle that from a release perspective. We could wait to do a release until all in-progress components are complete (and there are no new in-progress ones), but I don't think that's always going to be realistic. Instead, I suggest that we leave in-progress components out of src/lib.ts, so that they're not exported as part of the library. In our current setup, that would break the demos for that component, but we could address that by pointing the docs site's alias for @wikimedia/codex to a new lib-demo.ts file (or lib-experimental.ts or some other name) that exports everything from lib.ts plus unfinished components.

+1 to @Volker_E's comment—as we've discussed before, at some point we will likely want the public-facing site to display what's in the latest release, not what's on the main branch or experimental. Now might be as good a time as any to make these changes.

A local site should certainly include the experimental components and will obviously be based on the current local branch. Do we need another instance of the site to use internally (e.g. for design review) that shows all components on the main branch? Then the public site can display only non-experimental components based on the current release.

Edit: oof, one complicating factor in not showing experimental components on the docs site is the sidebar. You'd have to either avoid adding a component to the sidebar until it's in lib.ts, or have separate config for each build.

I really appreciate the iterative approach introduced by this new structure. I'm eager to try it! Just leaving here a couple notes/thoughts:

  • Variants: Should component variants be worked on in separate epics or documented/ implemented as subtasks of Stage 2? If the latter, maybe should we update the title to "Additional states, features and variants"?
  • Background: In the 'Previous implementations' section, would it make sense to add a note explaining that these implementations will only be used as a reference during the component specification process? Maybe we could also mention that the source of truth will be the Figma spec sheet provided in the Codex section.
  • Design spec: In a similar note, in some circumstances we might want to create an epic for a component that hasn't been specified yet. Even if in that case the task won't be ready to pick up, it might be worth indicating by default (in the template) that the specs are missing in order to avoid any misunderstandings. Pinging @bmartinezcalvo for her thoughts.
  • Refinement: I interpret that this stage is about re-testing the new component to detect any pending fixes (the ones that were overlooked during Stage 2). In that case, would this phase need to also be broken down into different subtasks too?

@Sarai-WMDE thanks so much for this feedback!

  • Variants: Should component variants be worked on in separate epics or documented/ implemented as subtasks of Stage 2? If the latter, maybe should we update the title to "Additional states, features and variants"?

Thanks for bringing this up! I think known variants should be included as subtasks, so I've updated the title of stage 2 as you suggested.

  • Background: In the 'Previous implementations' section, would it make sense to add a note explaining that these implementations will only be used as a reference during the component specification process? Maybe we could also mention that the source of truth will be the Figma spec sheet provided in the Codex section.

Yes! I've added a note to the "Previous implementations" section; let me know if you have any further suggestions.

  • Design spec: In a similar note, in some circumstances we might want to create an epic for a component that hasn't been specified yet. Even if in that case the task won't be ready to pick up, it might be worth indicating by default (in the template) that the specs are missing in order to avoid any misunderstandings. Pinging @bmartinezcalvo for her thoughts.

I've attempted to make this clear in the template, but please do let me know if you have any other suggestions for how to communicate this! I wish we could have comments in Phab markdown...anyway, I totally agree that we should be able to create an epic task before the figma sheet exists.

  • Refinement: I interpret that this stage is about re-testing the new component to detect any pending fixes (the ones that were overlooked during Stage 2). In that case, would this phase need to also be broken down into different subtasks too?

Yes, that's what I was envisioning—I've updated the template to make that clearer.


Additional feedback is very welcome!

@Sarai-WMDE thanks so much for this feedback!

  • Design spec: In a similar note, in some circumstances we might want to create an epic for a component that hasn't been specified yet. Even if in that case the task won't be ready to pick up, it might be worth indicating by default (in the template) that the specs are missing in order to avoid any misunderstandings. Pinging @bmartinezcalvo for her thoughts.

I've attempted to make this clear in the template, but please do let me know if you have any other suggestions for how to communicate this! I wish we could have comments in Phab markdown...anyway, I totally agree that we should be able to create an epic task before the figma sheet exists.

@AnneT @Sarai-WMDE I agree with indicating by default in the task/epic description the Design Spec/Figma link section. Although we don't have created the Figma spec sheet yet when we create the epic, we can create the section in the description with an empty test, something simple like "The spec sheet link will be added here once the designer has finished it". Also, I would add a message there explaining that we won't start with the development step if the Figma link was not added yet.

We discussed at sprint planning that we're pretty much ready to get this template into a custom form - any additional reviews/discussion needed before we move this into Product Sign-off for Desiree's next steps in T310627 ?

I think we're good to resolve this since the form creation is covered in a separate task T310627 - feel free to reopen if I'm missing anything.
So thankful we have this template now, nice work @AnneT !