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(textfield,textarea): migrating docs to storybook #3204

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

aramos-adobe
Copy link
Collaborator

@aramos-adobe aramos-adobe commented Oct 3, 2024

Description

Migrating docs for Textfield and Textarea.

  • Textarea Storybook coverage has been added
  • Helptext component is now a part of the Textfield Template

Validation steps

Textarea/Textfield docs:

  • Textarea docs and test are added in textfield stories folder
  • Disabled, Side Label, Character Count, Help Text, Validation and Error stories are available
  • Help text text control is available / inValid state example is included
  • Textarea testing preview mode is available

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

Copy link

changeset-bot bot commented Oct 3, 2024

⚠️ No Changeset found

Latest commit: eba71c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

github-actions bot commented Oct 3, 2024

File metrics

Summary

Total size: 4.30 MB*

🎉 No changes detected in any packages

* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@castastrophe castastrophe force-pushed the aramos-adobe/css942-textfield-migration-docs branch from 020c296 to cbdaf93 Compare October 4, 2024 16:59
Copy link
Contributor

github-actions bot commented Oct 4, 2024

🚀 Deployed on https://pr-3204--spectrum-css.netlify.app

Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this big docs migration. Could you provide some more details in the PR description and validation instructions for this PR?

components/textfield/index.css Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textarea/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textarea/package.json Outdated Show resolved Hide resolved
@castastrophe castastrophe added the skip_vrt Add to a PR to skip running VRT (but still pass the action) label Oct 8, 2024
jawinn
jawinn previously requested changes Oct 11, 2024
Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

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

Nice work on this. 👍 This addressed my previous feedback. My code comments are for some small things that aren't really blockers.

For CSS-729, about increasing Chromatic coverage, I did see two things that are important to add to the .test.js files for both components:

  • Help text: since help text is nested within the text field component, and has unique styles in the CSS, we should cover this in VRTs. This also should make sure to include help text with side label, which has some grid alignment styles.
  • Quiet: I saw the Jira issue said "can probably skip the 'quiet' variants for now, since those are going away in s2", but things have changed since that was written. We need to make sure these S1 things such as quiet are covered, especially with the foundations work where we're checking for any regressions.

components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

This is coming along nicely! This is my first pass, and I mainly focused on comparing text field/text area in this branch to the S2 branch.

I did notice that we could probably trim down the repetition for the new textarea files, especially if we structure it like meter, which is why I am requesting changes right now. I'll go through tomorrow morning and do a better review on the docs page content 😄

Also- I do apologize for some of the comments that seem similar. There's a lot of the same stuff going on, and now text field and text area are separate and I didn't want to forget to put a comment in one of those files!

components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

I focused more on the content of the docs page, and I know I have a lot. If you want to pair on any of it, let me know!

  • I left a couple comments about using the Template instead of TextFieldGroup. Personally, since most of these stories (as they are currently) are only using a single text field component anyways, let's just use the Template.

  • There's quite a few states missing from the docs page: focused, keyboard-focused were the main culprits. But then there's all of the invalid-disabled, invalid-focus, quiet-disabled, etc. I left a comment about maybe using something like Stepper as a model to showcase all of those states in a single story.

  • Does any of the migration guide need to be moved into the CHANGELOG? That migration guide is pretty extensive, so we should be sure we've captured all of it somewhere. If you already combed through that- fabulous!

  • I vote to structure this textfield directory more like the fieldlabel (that houses form) and progressbar (that houses meter). I think we could separate out any of the textarea markup into a textarea.template.js file. That would just keep things nice and organized.

components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.test.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

You are amazing for going through all of the feedback! This is looking so stinkin' good!

I think the biggest things that are causing me to pause before approving is the character count in both test files, and then maybe showcasing the default focus and keyboard focus on the docs page (we have those states in the test preview, and they're in the controls, but they aren't on the docs page).

WAY TO GO! 👏👏👏👏👏👏

components/textfield/stories/textarea.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/textfield.stories.js Outdated Show resolved Hide resolved
components/textfield/stories/template.js Outdated Show resolved Hide resolved
components/textfield/stories/textarea.test.js Show resolved Hide resolved
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

I love all the changes! This looks fantastic and I'm so happy we got the textarea all split off now. Thanks for taking this on- it was a beast!

A couple of non-blocking things I noticed:

  • In a couple of the text area stories, it looks like the labelText: "Comments" was redefined. It doesn't really need to be, since labelText: "Comments" is the already default arg. 👍
  • I love the updated consts you made to handle all of the focused/keyboard focused states between default & quiet! Nice call 👍
  • Should we talk about a deprecation strategy for that multiline arg at a team meeting? With these separated, maybe once s2 is officially released, that would be a good time to make which component to use a little clearer (by removing multiline)? I like that you kept the arg and the when(multiline) for now, but what does the future hold for that arg with the components now separated? I'm not sure how we handle it.
  • We talked about the wonky quiet + help text + keyboard focus. We'll make a follow up card (just looking quickly, it's probably a CSS bug). We should apparently add quiet + help text to the tests now! 😆

@@ -8,31 +8,31 @@ export const TextAreaGroup = Variants({
{
testHeading: "Text area with value",
displayLabel: true,
multiline: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

great catch!

@castastrophe castastrophe added run_vrt For use on PRs looking to kick off VRT skip_vrt Add to a PR to skip running VRT (but still pass the action) and removed skip_vrt Add to a PR to skip running VRT (but still pass the action) run_vrt For use on PRs looking to kick off VRT labels Oct 21, 2024
@castastrophe
Copy link
Collaborator

@aramos-adobe Can you rebase your branch and take a look at the VRT changes to see that these are the expected updates: https://www.chromatic.com/build?appId=64762974a45b8bc5ca1705a2&number=3505

@aramos-adobe
Copy link
Collaborator Author

@aramos-adobe Can you rebase your branch and take a look at the VRT changes to see that these are the expected updates: https://www.chromatic.com/build?appId=64762974a45b8bc5ca1705a2&number=3505

Done ✅

@castastrophe castastrophe enabled auto-merge (squash) October 23, 2024 17:19
@castastrophe castastrophe removed skip_vrt Add to a PR to skip running VRT (but still pass the action) ready-for-review labels Oct 23, 2024
@castastrophe castastrophe added run_vrt For use on PRs looking to kick off VRT ready-to-merge labels Oct 23, 2024
@castastrophe castastrophe force-pushed the aramos-adobe/css942-textfield-migration-docs branch from f388a06 to eba71c1 Compare October 23, 2024 17:31
@castastrophe castastrophe dismissed jawinn’s stale review October 23, 2024 17:33

Out of office and review feedback has been addressed

@castastrophe castastrophe merged commit d8d2127 into main Oct 23, 2024
14 checks passed
@castastrophe castastrophe deleted the aramos-adobe/css942-textfield-migration-docs branch October 23, 2024 17:41
castastrophe pushed a commit that referenced this pull request Oct 23, 2024
Migrating the textfield and textarea documentation to the Storybook.
castastrophe pushed a commit that referenced this pull request Oct 23, 2024
Migrating the textfield and textarea documentation to the Storybook.
castastrophe pushed a commit that referenced this pull request Oct 23, 2024
Migrating the textfield and textarea documentation to the Storybook.
castastrophe pushed a commit that referenced this pull request Oct 28, 2024
Migrating the textfield and textarea documentation to the Storybook.
castastrophe added a commit that referenced this pull request Oct 28, 2024
Migrating the textfield and textarea documentation to the Storybook.

Co-authored-by: aramos-adobe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge run_vrt For use on PRs looking to kick off VRT s1 storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants