chore(calendar,card,coachmark): remove MDX files#3443
Conversation
|
2eebf01 to
711d4cd
Compare
- adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead
- adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead
- migrates documentation from MDX file to the stories file instead
7f1d858 to
8feb55a
Compare
| testHeading: "With action menu + media", | ||
| hasPagination: false, | ||
| isOpen: true, | ||
| hasImage: true, | ||
| wrapperStyles: { | ||
| "background-color": "var(--spectrum-gray-50, white)" | ||
| }, | ||
| }, | ||
| { | ||
| testHeading: "With pagination", | ||
| hasPagination: true, | ||
| hasActionMenu: false, | ||
| hasImage: false, | ||
| wrapperStyles: { | ||
| "background-color": "var(--spectrum-gray-50, white)" | ||
| }, | ||
| }, | ||
| { | ||
| testHeading: "With pagination + media", | ||
| hasActionMenu: false, |
There was a problem hiding this comment.
TODO: I have not run VRTs with these new tests yet.
| title: "Card title", | ||
| description: "Optional description that should be one or two lines", | ||
| footer: undefined, | ||
| image: undefined, | ||
| }, | ||
| { | ||
| testHeading: "Horizontal", | ||
| title: "Card title", | ||
| description: "jpg", | ||
| showAsset: "file", | ||
| isQuiet: false, |
There was a problem hiding this comment.
All the changes in here aren't necessary- we just don't need to redefine a bunch of stuff. This was sort of an extension of some of the removals in card.stories.js.
There was a problem hiding this comment.
Great updates! Love an optimization. ❤️
| { | ||
| size: "xxl", | ||
| iconName: showAsset === "folder" ? "File" : "Document", | ||
| iconName: showAsset === "folder" ? "Folder" : "Document", |
There was a problem hiding this comment.
"File" isn't an icon (apparently), but "Folder" is. Which actually makes more sense when `showAsset: "folder" 😆
There was a problem hiding this comment.
Nice! Let's hope that translates to our S2 icons too when the time comes.
| control: "date", | ||
| if: { arg: "isDisabled", truthy: false }, | ||
| }, | ||
| isRangeSelection : { |
There was a problem hiding this comment.
I could understand if we wanted to remove this for now. It definitely feels like we could get this to work in the template, but I didn't want to sink too much time dedicated to that, in this PR.
castastrophe
left a comment
There was a problem hiding this comment.
Super minor questions and suggestions. These updates are great! Thanks for not just migrating the mdx docs but also adding tests cases we were missing and clarifying the knobs in our stories!
| name: "Days of the week", | ||
| description: "Use 3 letter abbreviation for day of week.", |
There was a problem hiding this comment.
Since this boolean is specifically to change the days of the week from spelled out to abbreviated, I wonder if this update is actually less clear? Perhaps the title should be something like, "Use abbreviated weekdays"?
| isQuiet, | ||
| isQuiet: { | ||
| ...isQuiet, | ||
| description: "`showAsset: 'image'` must be selected to properly render the quiet styles.", |
There was a problem hiding this comment.
If this is a requirement, should we update the controls with an if that requires it?
There was a problem hiding this comment.
I took another look at this. I don't think showAsset is actually a requirement, so I'm handling the isQuiet arg differently in the template now. Let me know what you think! e2a3bb8
| control: "boolean", | ||
| if: { arg: "isHorizontal", truthy: false }, | ||
| }, | ||
| isCardAssetOverride: { |
There was a problem hiding this comment.
Override feels a touch vague for what this is actually doing. Is there a more descriptive way to describe the change such as "Image fill" or "Gallery style"?
There was a problem hiding this comment.
What do you think of isImageFill? Gallery already has a control, with different styles, so I went with isImageFill. That did require a change to args in asset, however. 874f6cc
| title: "Card title", | ||
| description: "Optional description that should be one or two lines", | ||
| footer: undefined, | ||
| image: undefined, | ||
| }, | ||
| { | ||
| testHeading: "Horizontal", | ||
| title: "Card title", | ||
| description: "jpg", | ||
| showAsset: "file", | ||
| isQuiet: false, |
There was a problem hiding this comment.
Great updates! Love an optimization. ❤️
| { | ||
| size: "xxl", | ||
| iconName: showAsset === "folder" ? "File" : "Document", | ||
| iconName: showAsset === "folder" ? "Folder" : "Document", |
There was a problem hiding this comment.
Nice! Let's hope that translates to our S2 icons too when the time comes.
| content: html` | ||
| ${Container({ | ||
| withBorder: false, | ||
| heading: "With action menu", | ||
| content: Template({...args, isOpen: true}, context), | ||
| })} | ||
| ${Container({ | ||
| withBorder: false, | ||
| heading: "Without action menu", | ||
| content: Template({...args, hasActionMenu: false}, context), | ||
| })} | ||
| ` |
There was a problem hiding this comment.
This is perfect but just so you see a possible alternative, you can also pass content in using an array and then you don't have to add the html wrapper here:
| content: html` | |
| ${Container({ | |
| withBorder: false, | |
| heading: "With action menu", | |
| content: Template({...args, isOpen: true}, context), | |
| })} | |
| ${Container({ | |
| withBorder: false, | |
| heading: "Without action menu", | |
| content: Template({...args, hasActionMenu: false}, context), | |
| })} | |
| ` | |
| content: [ | |
| Container({ | |
| withBorder: false, | |
| heading: "With action menu", | |
| content: Template({...args, isOpen: true}, context), | |
| }), | |
| Container({ | |
| withBorder: false, | |
| heading: "Without action menu", | |
| content: Template({...args, hasActionMenu: false}, context), | |
| }) | |
| ] |
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
* chore(card): remove default args from test cases * docs(card): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * docs(coachmark): remove MDX file - adds some missing documentation regarding stories - reorganizes some information to sit with appropriate story/variant - migrates documentation from MDX file to the stories file instead * chore(coachmark): adds extra chromatic coverage * docs(calendar): remove MDX file - migrates documentation from MDX file to the stories file instead * docs(calendar): clarifies days of the week control name * docs(card): clarify quiet control requirements * chore(coachmark): remove html wrapper in favor of content array * chore(card): fix isQuiet controls and usage in template * docs(asset,card): isCardAssetOverride renamed to isImageFill
Description
This PR migrates any documentation from MDX files to the component's
*.stories.jsfile. No loss of documentation should have occurred, but minor changes, like correcting story names to organize similar stories together or reorganizing content now that there is not an MDX file or fixing sentence-casing, is acceptable.Components included are:
args, so those were added.Jira/Specs
CSS-1049
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
Additional Validation
Regression testing
Validate:
Screenshots
To-do list