Quasar: [V1] reduce delay before Dialog is shown

Created on 5 Mar 2019  路  12Comments  路  Source: quasarframework/quasar

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

I'd like to request for us to remove this delay or set it to a different value.

Most helpful comment

@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.

All 12 comments

@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:

https://github.com/quasarframework/quasar/blob/7186dab1c8dc914c64f97195c1f5fa110acb0547/quasar/src/components/dialog/QDialog.js#L144

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:

feat(quasar): Speed up transition times (300ms)

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danikane picture danikane  路  3Comments

lukadriel7 picture lukadriel7  路  3Comments

wc-matteo picture wc-matteo  路  3Comments

slowaways picture slowaways  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments