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
Add Story & Storybook Documentation for Dialog Component #507
Conversation
ref="simple" | ||
:actions="actions" | ||
style="transform: translate(50%, 50%)" | ||
@action="(_, dialog) => dialog.hide()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this from the MMF. should this be the generic action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I understand the question? If you mean to say should the dialog just close on any button click then yes, it should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now there is only one action, yes, so both buttons close the window. is this desired = should i just leave it like this? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yes
42ddb30
to
9f94564
Compare
this.$emit( 'dismissed' ); | ||
this.hide(); | ||
}, | ||
_dispatch( namespace: string ): void { | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prob needs a better explanation. I don't know how to write it because i don't understand how it works 100%.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good altogether, there are still missing descriptions for each of the props in the controls and docs tab of the story. We can add those as docbloc comments above the definition of each property in the component's vue file.
Additionally, we have an issue with the overly not showing up. Probably due to the changes @Silvan-WMDE and I made by converting the top: 0, left: 0, right: 0, bottom: 0
css positions of the overlay in the vue file to the inset
shorthand (which might not work as expected).
this.$emit( 'dismissed' ); | ||
this.hide(); | ||
}, | ||
_dispatch( namespace: string ): void { | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it ;)
} | ||
], | ||
visible: true, | ||
dialogText: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads-up that this should be replaced by the copy linked from the ticket. See copy in Figma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but without the line breaks, right? since the <br/>
neither the \n
are rendered
Co-authored-by: Itamar Givon <itamar.givon.dev@gmail.com>
Co-authored-by: Itamar Givon <itamar.givon.dev@gmail.com>
Co-authored-by: sai <sarai.sanchez@wikimedia.de>
Co-authored-by: sai <sarai.sanchez@wikimedia.de>
Co-authored-by: Itamar Givon <itamar.givon.dev@gmail.com>
Co-authored-by: sai <sarai.sanchez@wikimedia.de>
Co-authored-by: sai <sarai.sanchez@wikimedia.de>
Co-authored-by: Itamar Givon <itamar.givon.dev@gmail.com>
A couple of issues:
A request for a change that I could apply myself in a separate PR if that sounds better:
Thank you! C'mon we're almost there 🙌 |
ref="simple" | ||
:actions="actions" | ||
style="transform: translate(50%, 50%)" | ||
@action="(_, dialog) => dialog.hide()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yes
} | ||
], | ||
visible: true, | ||
dialogText: `Complex dialogs can display extensive information and contain all kinds of interactive elements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would maybe change the name of this control to content, to make it a little more storybook-user friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, good point
Co-authored-by: sai <sarai.sanchez@wikimedia.de>
Yes, the canvas can be resized, no problem. The button I would suggest yes making a separate PR for that since that's not part of the story itself, but it's a fix to the the dialog component, right? |
@@ -12,7 +12,7 @@ export function complex( args: { title: string, actions: string, dismissButton: | |||
components: { Button, Dialog }, | |||
props: Object.keys( args ), | |||
template: ` | |||
<div> | |||
<div style="height: 70vh;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It increases the height of the canvas section in the Docs page, so the Dialog does not overlap with the props table (see my comment above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, yeah, just saw it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for now, as the overlay will be fixed in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving again with the same comment as before
Bug: T295875