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

Add support to Storybook for VA Mobile components #1499

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jamigibbs
Copy link
Contributor

@jamigibbs jamigibbs commented Feb 18, 2025

Chromatic

https://3716-mobile-storybook--65a6e2ed2314f7b8f98609d8.chromatic.com

Description

Complete discovery document here: https://vfs.atlassian.net/wiki/spaces/DST/pages/3872882700/Discovery+Integrating+mobile+components+into+VADS+Storybook

related department-of-veterans-affairs/vets-design-system-documentation#3716

QA Checklist

  • Component maintains 1:1 parity with design mocks
  • Text is consistent with what's been provided in the mocks
  • Component behaves as expected across breakpoints
  • Accessibility expert has signed off on code changes (if applicable. If not applicable provide reason why)
  • Designer has signed off on changes (if applicable. If not applicable provide reason why)
  • Tab order and focus state work as expected
  • Changes have been tested against screen readers (if applicable. If not applicable provide reason why)
  • New components are covered by e2e tests; updates to existing components are covered by existing test suite
  • Changes have been tested in vets-website using Verdaccio (if applicable. If not applicable provide reason why)

Screenshots

Screenshot 2025-02-19 at 9 24 31 AM

Acceptance criteria

  • QA checklist has been completed
  • Screenshots have been attached that cover desktop and mobile screens

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue

@jamigibbs jamigibbs added the ignore-for-release Used if you want to ignore the PR in the generated release notes label Feb 18, 2025
});

export const Button = ({ text, onPress, color, textColor }: ButtonProps) => (
<View style={styles.buttonContainer}>
Copy link
Contributor Author

@jamigibbs jamigibbs Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a simple react-native button to demonstrate that it renders in Storybook. We can remove this file after the discovery work is complete.

Screenshot 2025-02-17 at 4 35 36 PM

@@ -0,0 +1,96 @@
import { StorybookConfig } from "@storybook/react-webpack5";
Copy link
Contributor Author

@jamigibbs jamigibbs Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this file (essentially the Storybook webpack build) to .ts so that we could use this StorybookConfig type which has helped to ferret out a few incorrect settings.

(Story) => (
<View
style={{
flex: 1,
Copy link
Contributor Author

@jamigibbs jamigibbs Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Storybook file was moved from va-mobile-library repo so it's a 1:1 of that file except that we are importing the button from the NPM package.

import './style.scss';
import '@department-of-veterans-affairs/formation/dist/formation';
// import '@department-of-veterans-affairs/formation/dist/formation';
Copy link
Contributor Author

@jamigibbs jamigibbs Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mobile components aren't like web components with a shadow dom so we will have to deal with how global styles may bleed into elements.

For example, when these Formation imports are active, the border disappears from the secondary mobile components.

Screenshot 2025-02-18 at 4 59 30 PM

Screenshot 2025-02-19 at 1 53 24 PM

@jamigibbs jamigibbs changed the title Discovery: add a VA Mobile component to Storybook Add support to Storybook for VA Mobile components Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release Used if you want to ignore the PR in the generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant