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

  1. On 1.0.x (verified at commit 566661c), list components/molecules/share/. There is no share.mdx.
  2. 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.
Command icon 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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Status: Active » Needs review

rajab natshah’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.