Problem/Motivation
Molecules/Share ships share.twig and share.stories.json but no .mdx.
The theme has 85 components and 75 .mdx files. Of the ten without one, seven are Foundation pages and two are Getting Started pages, which are themselves narrative documentation. Share is the only real component missing its docs page.
Steps to reproduce
- On 1.0.x (verified at commit 566661c), list
components/molecules/share/. There is noshare.mdx. - Open Storybook. Molecules / Share has stories but no Docs page, unlike every other component.
Proposed resolution
Add components/molecules/share/share.mdx in the theme's house style, documenting the component's props (placement, orientation, alignment, mobile_visibility, native_share, display_title, heading_level, url, share_title, share_text) with a Canvas, Controls and Stories block and a Twig usage example.
One thing to get right, because it caught two files: an .mdx references a story by the export name the loader generates, which is the story name with each run of non-identifier characters collapsed to a single underscore. Default (rail-end, vertical) becomes Default_rail_end_vertical_. Getting that wrong fails the whole Storybook preview build, not just that page. components/molecules/figure/figure.mdx already has this shape and is correct, so it is the one to copy.
A merge request will follow.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ❌ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Added a Storybook docs page for the Share component, so every component in the theme now has one.
Issue fork vartheme_bs5_rightup-3627182
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajab natshahComment #5
rajab natshah