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

doc: refactors props for multiple component documentation in storybook #2370

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MaxGammel
Copy link

…in storybook

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit c7d0856
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/674857ea7534180008bc46ab
😎 Deploy Preview https://deploy-preview-2370--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

readOnly: { type: Boolean },
transparent: { type: Boolean },
ariaLabelSelected: { type: String },
hcmLabelDisabled: { type: String },
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can also add the description for these attributes here :
e.g. for hcmLabelDisabled
https://github.com/telekom/scale/blob/main/packages/components/src/components/dropdown-select/readme.md?plain=1#L17

Copy link
Collaborator

Choose a reason for hiding this comment

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

my suggestion is to move the userNavigation and iconNavigation that get added here outside the prop table and add them as extra text under the table.

@@ -26,6 +29,9 @@ export default {
helperText: { type: String },
fullWidth: { type: Boolean, default: false },
styles: { type: String },
selectedIndex: { type: Number },
ariaLabelTranslation: { type: `segment button with $slottedSegments` },
Copy link
Collaborator

Choose a reason for hiding this comment

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

also here the prop description could help

| `ariaLabelTranslation` | `aria-label-translation` | (optional) aria-label attribute needed for icon-only buttons | `string` | ``segment button with $slottedSegments`` |

@@ -2,11 +2,12 @@
export default {
name: 'scale-sidebar-nav',
props: {
ariaLabel: { type: String },
ariaLabelSiderbarNav: { type: String },
Copy link
Collaborator

Choose a reason for hiding this comment

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

prop description need to be added for all of these props:

| `ariaLabelSidebarNav` | `aria-label-sidebar-nav` | From mdn: A brief description of the purpose of the navigation, omitting the term "navigation", as the screen reader will read both the role and the contents of the label. | `string` | `undefined` |

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please update the descriptions to include the prop description from readme

| `customColor` | `custom-color` | <span style="color:red">**[DEPRECATED]**</span> (optional) slider custom color<br/><br/> | `string` | `undefined` |

@@ -39,7 +39,6 @@
:focusable="focusable"
:decorative="decorative"
:accessibility-title="accessibilityTitle"
:styles="styles"
Copy link
Collaborator

Choose a reason for hiding this comment

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

add the style back here to make the storybook work

@@ -55,7 +54,6 @@ export default {
focusable: { type: Boolean, default: false },
decorative: { type: Boolean, default: false },
accessibilityTitle: { type: String },
styles: { type: String }
Copy link
Collaborator

Choose a reason for hiding this comment

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

add the style back here to make the storybook work

@@ -32,11 +32,12 @@ export const Template = (args, { argTypes }) => ({
template: `
<div :style="wrapperStyles">
<scale-sidebar-nav
:arial-label="ariaLabel"
:arial-label-sidebar-nav="ariaLabelSiderbarNav"
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add the readme description to the props , as they exist

Comment on lines 38 to 44
preselected: {
table: {
disable: true,
},
description: '',
control: { type: null },
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

add this again, as it helps render the component

@@ -12,7 +12,7 @@ import TabPanel from './TabPanel.vue';
<Meta
title="Components/Tab Navigation"
component={ScaleTabNav}
subcomponents={{ 'Scale Tab Header': TabHeader, 'Scale Tab Panel': TabPanel }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why did you remove the tabHeader section here?

@amir-ba amir-ba changed the title feat(storybook-vue): added multiple props to component documentation … doc: refactors props for multiple component documentation in storybook Nov 21, 2024
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