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: fix show hide event readability and make controls expanded as d… #2081

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

shaharzil
Copy link
Contributor

@shaharzil shaharzil requested a review from a team as a code owner April 21, 2024 15:37
@shaharzil shaharzil marked this pull request as draft April 21, 2024 15:39
@@ -19,14 +20,30 @@ const metaSettings = createStoryMetaSettingsDecorator({
actionPropsArray: [] // List the component's actions here
});

const showHideArgTypes = {
Copy link
Member

Choose a reason for hiding this comment

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

BTW have you tried using the enumPropNamesArray?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it is not doing anything that helps with the readability :(

@shaharzil shaharzil marked this pull request as ready for review April 24, 2024 08:14
Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

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

Cool! Maybe we can generalize it somehow so it will be used in other stories as well

Comment on lines +62 to +63
showTrigger={showTrigger || [Dialog.hideShowTriggers.CLICK]}
hideTrigger={hideTrigger || [Dialog.hideShowTriggers.CLICK]}
Copy link
Member

Choose a reason for hiding this comment

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

You can give these two also a default in the signature

@@ -45,7 +45,8 @@ const fontLoader = async () => ({
const preview: Preview = {
parameters: {
controls: {
sort: "alpha"
sort: "alpha",
expanded: true
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
Copy link
Contributor

Choose a reason for hiding this comment

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

💪🏼

Comment on lines +24 to +33
options: Object.values(HideShowEvent),
control: {
type: "multi-select"
},
table: {
type: {
summary: Object.values(HideShowEvent).join(" | ")
}
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

definitely should be (in a future enhancement, maybe create a task?) a common util, or as part of the createMeta

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'll create a task for it in the backlog

@shaharzil shaharzil merged commit f081a2c into master Apr 30, 2024
10 checks passed
@shaharzil shaharzil deleted the fixes-in-dialog-docs-page branch April 30, 2024 10:51
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.

3 participants