Separate dialogs from popovers #961

Open
opened 1 year ago by dpschen · 8 comments
dpschen commented 1 year ago
Collaborator

We should separate these usecase:

  • popover (former modal; popover is the better naming, also allows better distinction from 'model') is used for pages, basically an overlay with a UIs.
    popovers usually have a url

  • dialog: asking the user a question. e.g. delete.
    Not sure what to do with modals that had an url but would then loose it. But this also isn't consequent right now: some delete modals have a url others don't.

Popovers should not be stacked (although we might have some exceptions).
Dialogs might be stacked, but this is also discouraged. Better would be to create a user flow where this is not needed.

See also:
#816

We should separate these usecase: - popover (former modal; popover is the better naming, also allows better distinction from 'model') is used for pages, basically an overlay with a UIs. popovers usually have a url - dialog: asking the user a question. e.g. delete. Not sure what to do with modals that had an url but would then loose it. But this also isn't consequent right now: some delete modals have a url others don't. Popovers should not be stacked (although we might have some exceptions). Dialogs might be stacked, but this is also discouraged. Better would be to create a user flow where this is not needed. See also: https://kolaente.dev/vikunja/frontend/pulls/816#issuecomment-16745
konrad added the
kind/feature
label 1 year ago
konrad commented 1 year ago
Owner

I like the idea.

some delete modals have a url others don't.

That sounds like it should be more consistent.

Did you check which modals have a url and which don't? My guess is all modals which are accessible from the menu directly have one while the ones from a detail page don't.

I like the idea. > some delete modals have a url others don't. That sounds like it should be more consistent. Did you check which modals have a url and which don't? My guess is all modals which are accessible from the menu directly have one while the ones from a detail page don't.
dpschen commented 1 year ago
Poster
Collaborator

I didn't check, but that might be!
Either way still not sure which way to go here: I like that there is a direct url for e.g. editing stuff. For deleting it doesn't make so much sense, since you shouldn't be able to navigate back to a delete dialog after you pressed delete.

I didn't check, but that might be! Either way still not sure which way to go here: I like that there is a direct url for e.g. editing stuff. For deleting it doesn't make so much sense, since you shouldn't be able to navigate back to a delete dialog after you pressed delete.
konrad added the
area/internal-code
label 1 year ago
dpschen commented 1 year ago
Poster
Collaborator

Because of #1037

I started implementing dialogs based on https://headlessui.dev/vue/dialog but with a promise interface.
Still iterating on that idea.

@konrad: what do you think in general?

Because of https://kolaente.dev/vikunja/frontend/issues/1037 I started implementing dialogs based on https://headlessui.dev/vue/dialog but with a promise interface. Still iterating on that idea. @konrad: what do you think in general?
konrad commented 1 year ago
Owner

If I understood the docs from headless ui correctly, using their dialog component would add the focus trap (that's currently not working)?

In general, I think we could move forward with it.

If I understood the docs from headless ui correctly, using their dialog component would add the focus trap (that's currently not working)? In general, I think we could move forward with it.
dpschen commented 1 year ago
Poster
Collaborator

If I understood the docs from headless ui correctly, using their dialog component would add the focus trap (that's currently not working)?

Yes they implement a lot of heavy to implement accessability stuff in there.

> If I understood the docs from headless ui correctly, using their dialog component would add the focus trap (that's currently not working)? Yes they implement a lot of heavy to implement accessability stuff in there.
dpschen commented 1 year ago
Poster
Collaborator

I started with this already, but still in an early phase.

I started with this already, but still in an early phase.
dpschen commented 1 year ago
Poster
Collaborator

I realized that the dialogs should probably be implemented in a way that you cann them via a function that returns a promise.

Does that make sense?

I realized that the dialogs should probably be implemented in a way that you cann them via a function that returns a promise. Does that make sense?
Poster
Collaborator
To remember for later: https://github.com/rlemaigre/vue3-promise-dialog
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/frontend#961
Loading…
There is no content yet.