Closed Bug 1803676 Opened 1 year ago Closed 1 year ago

Expand documentation to include information on how to create and use new components

Categories

(Toolkit :: UI Widgets, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: hjones, Assigned: hjones)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp])

Attachments

(2 files)

It's possible to create mdx only files for documentation in storybook: https://storybook.js.org/docs/react/writing-docs/mdx#documentation-only-mdx

It might be nice to have our Storybook landing page be documentation for/about the project. It could include this README content on installing and running storybook (which will provide a helpful starting point once we have a deployed version of the site). It may be possible to just pull in and render the contents of that markdown file directly in a .mdx file - see this Github thread for relevant discussion.

The landing page should probably include some tips on how to create a new reusable component so that we have the ./mach addwidget command documented. We can also create a running list of troubleshooting tips and pitfalls we've encountered, such as:

  • needing to specify type="module" in a script tag when importing these components
  • needing to specify the html: namespace when using these components in an xhtml file
  • not putting the script tags in inc.xhtml files as we've run into issues with that
  • anything else that has come up so far

The Bugbug bot thinks this bug should belong to the 'Toolkit::XUL Widgets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → XUL Widgets
Product: Firefox → Toolkit
Depends on: 1805573
Assignee: nobody → hjones

Took a stab at revamping and adding to the Storybook README. The stuff on reusable components should probably be in a separate document, but I wasn't sure where to put it just yet. Eventually some part of this doc will become our Storybook landing page.

See Also: → 1809967
Pushed by hjones@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/68061dd2f45d
expanding storybook/reusable components documentation r=tgiles,mstriemer
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Pushed by hjones@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e841ca81c1a0
fix small typo in npm command r=mstriemer,tgiles

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Whiteboard: [fidefe-reusable-components-ms1] → [fidefe-reusable-components-ms2]
Whiteboard: [fidefe-reusable-components-ms2] → [recomp]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: