massif-press / compcon

Digital character creator and player sheets for the LANCER TTRPG
https://compcon.app
GNU General Public License v3.0
281 stars 98 forks source link

[FEATURE] back button closes pop-up modals #1957

Open karidyas opened 2 years ago

karidyas commented 2 years ago

Is your feature request related to a problem? Please describe. Back button currently navigates away from the completely invisible page behind a full screen modal, resulting in either nothing happening if the modal is still available on the page kicked back to, or navigating to the upper level page. This is annoying as you need multiple clicks to get back to where you were, and it is unexpected behaviour.

E.g. Pushing Back while editing pilot skill triggers kicks back to the pilot roster, rather than expected narrative pilot page.

Mainly a mobile QoL request, especially since those full screen popups block the app's integrated back and forward buttons, but possibly useful on desktop as well.

Describe the solution you'd like If a modal is open, back button closes it rather than navigating away from underlying page.

Describe alternatives you've considered Sticky/absolute positioned close button on mobile, either Dismiss at the bottom or title with X at the top, so always accessible without scrolling.

karidyas commented 2 years ago

Turns out the title bar with a top right X to close is sticky already, so the fact I didn't notice or remember means it's probably visually too far away from the phone integrated Back button to divert that automatic action. My conclusion is If the sticky element is used as a solution it would have to be at the bottom to be useful.