I don't like that there's a small delay before my dialogs are shown.
I looked through the code and think it's this line:
https://github.com/quasarframework/quasar/blob/7186dab1c8dc914c64f97195c1f5fa110acb0547/quasar/src/components/dialog/QDialog.js#L159
@rstoenescu I'd be happy to do a PR for this if needs be. I propose a new prop:
delay: {
type: Number,
default: 600
}
From what I can see, it'd need to apply to the show and hide emits.
PS, if no special reason for 600ms, I would set the default to 300 (or 0), just to make the default feel more responsive.
Ok, so the $emit('show') doesn't actually control the speed of the dialog showing so this isn't just a prop change from what I can see so far.
From what I can see there no forced delay being applied to the display of the modal at all. The modal is added to the dom via:
At this point I'm not sure where to take this. I think the minor delay is the fact it has to wait until the nexttick, then it has to render and forceupdate. This add's a slight delayed feel.
Are you sure? Show portal could mean the mask and then a show event is emit to show the actual dialog after 600 ms.
I debugged it this morning and the setTimeout() delay had no effect. The dialog showed, then my console log would appear after 3 seconds (with a 3000 delay).
@rstoenescu Do you have any idea why the Dialog feels like there's a short delay before it is shown?
@webnoob I think Razvan's latest commit might have something to do with this issue:
@mesqueeb thanks for pointing this out. Closing bug as the transitions are now set to 300ms.
Will be available in beta.11
Thanks a lot! I'll see how it feels in next beta!
It feels snappier, even if it doesn't has to do with performance at all :)
@mesqueeb Well it appears he made the same changes I made locally. I "think" the issue is I didn't change the CSS transitions! Will take note for future.
Most helpful comment
@rstoenescu I'd be happy to do a PR for this if needs be. I propose a new prop:
From what I can see, it'd need to apply to the show and hide emits.