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

Kds 1755/spot illustration migration #4208

Merged
merged 9 commits into from
Oct 25, 2023

Conversation

mcwinter07
Copy link
Contributor

Why

Part of the Great Migration

What

  • Adds Spot Illustrations to KAIO
  • removes deprecated PositiveMale and PositiveFemale Spot illustations
  • The non-genered Positive has existed for a while now an is a suitable alternative for either
  • Moves Base to subcomponents folder and Spot to a feature folder in preparation for Scene illustrations
    • I've opted for a similar folder structure to Notification

Notes

  • Since the illustration will be able to be destructured from the root @kaizen/component package, we may want to create a ticket update naming conventions to be more explicity for our users, ie:
import { Cautionary} from "@kaizen/components"
// alt?
import { CautionarySpotIllustration} from "@kaizen/components"
  • Currently no tests since the differences are largely visually and can be best assessed by chromatic. We'll probably need more tests later with Scene given it uses Lotti player

@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: f4ab31a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kaizen/components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


When not enabled, the `img` tag will attempt to fill a width of 100%.

## All Spot illustrations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've included the stickersheet that has a list of the illustrations since our consumers would not be able to see the hidden stories on prod.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think just to reiterate, put an example of the import statement before the canvas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I'll make a quick update to include that example

const SPOT_ILLUSTRATION_BASE_PATH = "illustrations/heart/spot/"
const createSpotIllustration =
(fileName: string) =>
// eslint-disable-next-line react/display-name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like there might be a better way here to give these display names instead of just JSX elements, but I decided not to fall down the refactor rabbit hole - best this could be looked at when we revisit the names of these

const engagementSpots = [
{
Component: BenefitsSurvey,
name: "BenefitsSurvey",
Copy link
Contributor Author

@mcwinter07 mcwinter07 Oct 25, 2023

Choose a reason for hiding this comment

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

Originally these had more human readable names, but that doesn't help our consumer know what they will actually be exported as. I was thinking we wouldn't need this and could just use the displayName but that's not actually set for these components so I just went with the more verbose approach of remove the spaces and making sure they're in pascal case / align with the component name

@mcwinter07 mcwinter07 marked this pull request as ready for review October 25, 2023 06:06
@mcwinter07 mcwinter07 requested a review from a team as a code owner October 25, 2023 06:06
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

✨ Here is your branch preview! ✨

Last updated for commit f4ab31a: * update docs example import statement

gyfchong
gyfchong previously approved these changes Oct 25, 2023
Copy link
Contributor

@gyfchong gyfchong left a comment

Choose a reason for hiding this comment

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

Just check your chromatic snapshots

@mcwinter07 mcwinter07 merged commit 55b4b6c into main Oct 25, 2023
15 checks passed
@mcwinter07 mcwinter07 deleted the KDS-1755/Spot-illustration-migration branch October 25, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants