Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adds version information to storybook #1999

Merged
merged 4 commits into from
Jan 24, 2023
Merged

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Jan 23, 2023

Closes #1413

PR Type

  • Documentation content changes

Description of the changes

Adds version info into the storybook site.
This uses 'storybook-version' to pull the version info into the header bar on a per-story basis. This is driven by the existing version.ts file in mgt-element which is now explicitly exported for use.
The overview mdx based story exposes the version information in the npm install step and in the opening section.
The injected footer now also contains version information. This PR also resolves an unreported issue where the canvas and sidebar buttons were obscured at mobile breakpoints.
This is achieved by having the setVersion script be able to update the root package.json version number as well as all package.json files not in the samples directory.
With the root version set version.ts is updated with gulp
The storybook-pr workflow will set the version of the built packages based on either the branch name if the branch starts with next and would be published to npm as a preview version or by pr number.

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

@ghost
Copy link

ghost commented Jan 23, 2023

Thank you for creating a Pull Request @gavinbarron.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

1 similar comment
@github-actions
Copy link

The updated storybook is available here

@sebastienlevert
Copy link
Contributor

This is amazing! Glad to see it completed! Works great for me!

@gavinbarron gavinbarron merged commit 5b32c5f into main Jan 24, 2023
@gavinbarron gavinbarron deleted the docs/add-version-info branch January 24, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook should highlight the current version of MGT
2 participants