-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat: ResourceListDetails doc block #3129
Commits on Oct 18, 2024
-
chore: add componentGuidelinesName to package.json
- components that have a valid page on the spectrum guidelines site have a componentGuidelinesName key now. - components that do not have a valid page on the spectrum guidelines site have a componentBetaName key that will point to the spectrum-contributions site. - for components that do not any guidelines, setting the componentGuidelinesName key to an empty string in the package.json will make sure the guidelines resource card doesn't render.
Configuration menu - View commit details
-
Copy full SHA for ed9cbe2 - Browse repository at this point
Copy the full SHA ed9cbe2View commit details -
feat: resource list component doc block
The ResourceListDetails fetches data from each storybook component's package.json, specifically utilizing the package name and optional componentGuidelinesName. It then creates links to the spectrum guidelines, github, and npm sites. If a component doesn't have a spectrum guidelines page, it uses the optional componentBetaName and the spectrum-contributions site instead. - creates new `styled` components related to the resource section, any element wrappers and links - creates ResourceListDetails doc block - creates ResourceListContent component (which are the individual resource cards) - adds some helper functions to generate SVGs corresponding to the links, switch statements, mapping text, etc.
Configuration menu - View commit details
-
Copy full SHA for 0bf7ff9 - Browse repository at this point
Copy the full SHA 0bf7ff9View commit details -
refactor: add support for nested components
this applies to form and meter. Form should no longer render a guidelines link card, and meter should navigate to its own guidelines page instead of progress bar's.
Configuration menu - View commit details
-
Copy full SHA for 6b8c1e0 - Browse repository at this point
Copy the full SHA 6b8c1e0View commit details -
- update spacing for if() statement - render ResourceListDetails in ComponentDetails - console.warn instead of throw an error - hard codes styles for cards
Configuration menu - View commit details
-
Copy full SHA for 6513461 - Browse repository at this point
Copy the full SHA 6513461View commit details -
- extracts SVG code to individual jsx files - imports those SVG jsx files to use a components - replaces/refactors svg functions to render new svg components
Configuration menu - View commit details
-
Copy full SHA for d15330d - Browse repository at this point
Copy the full SHA d15330dView commit details -
- creates a `spectrum` key in each component's package.json to use in ComponentDetails - `spectrum` array holds metadata for components and/or nested components, like the componentName, the guidelineLink, and rootClass - eventually we may be able to add designLink to add Figma links to this block
Configuration menu - View commit details
-
Copy full SHA for 732417b - Browse repository at this point
Copy the full SHA 732417bView commit details -
refactor: resource list component fixes
- reorganizes file so ResourceLinkContent and ResourceListDetails are closer to CopmonentDetails, and all fetching/processing helper functions are together - addresses missing field label guidelines link - removes some hardcoded nestedComponent code in favor for a for loop - indentation fixes
Configuration menu - View commit details
-
Copy full SHA for ac9c142 - Browse repository at this point
Copy the full SHA ac9c142View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41cbfb9 - Browse repository at this point
Copy the full SHA 41cbfb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b387c79 - Browse repository at this point
Copy the full SHA b387c79View commit details -
docs: revert componentName in favor of docsPage: false
- removed componentName from field label and progress bar package.jsons - created docsPage parameter for form in the storyMeta - refactored the nested component for loop to check if the guidelines are defined, and if docsPage is undefined. If both of those check out, render the guidelines link. Form is the only component that needed this, since it's the only nested component that doesn't have a guidelines page while its parent (field label) does.
Configuration menu - View commit details
-
Copy full SHA for dad33fc - Browse repository at this point
Copy the full SHA dad33fcView commit details -
chore: refactor to check for unique rootClass
To better capture nested components, as well as components that may not have a guidelines page, this refactor double checks that the hasDocsPage prop is undefined, as well as that the spectrum.rootClass value includes a transformed component title. Adding the additional check of the rootClass helped ensure the proper guidelines link was rendering for nested components, as well as breaking when the condition was met.
Configuration menu - View commit details
-
Copy full SHA for e7c8e70 - Browse repository at this point
Copy the full SHA e7c8e70View commit details -
chore: refactor to use meta.args.rootClass
- instead of comparing a story's title (because meter didn't have a unique rootClass), compare the spectrum.rootClass to the meta.args.rootClass. This is possible now because we have updated the default args for meter to be spectrum-Meter. - removes usage or reformatTitle and hasDocsPage functions and props - adds more thorough JSDoc comments
Configuration menu - View commit details
-
Copy full SHA for 78fff5c - Browse repository at this point
Copy the full SHA 78fff5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e661f2f - Browse repository at this point
Copy the full SHA e661f2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d56e9ad - Browse repository at this point
Copy the full SHA d56e9adView commit details -
docs: add quickaction guidelines link
- white space removal
Configuration menu - View commit details
-
Copy full SHA for 8237a91 - Browse repository at this point
Copy the full SHA 8237a91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 742845b - Browse repository at this point
Copy the full SHA 742845bView commit details -
- change status prop name to isDeprecated - remove unnecessary skipBorder prop
Configuration menu - View commit details
-
Copy full SHA for a65531d - Browse repository at this point
Copy the full SHA a65531dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b8bbd5 - Browse repository at this point
Copy the full SHA 5b8bbd5View commit details