Posts

Showing posts from March, 2023

leave warnings for unsaved changes

Image
User Scenario: As a user who edits xyz properties, when I leave the page then I should see a warning prompt to leave and lose changes or stop leaving and remain.  This is a typical scenario and the approach to handle has not changed in a long time. So lets review it. But first what are some of the ways a user could "leave" the page reload the page browser back button navigation action to a different url than this app  edit url in the address bar and hit enter close the tab close the browser navigation action to a different url within this app close app modal with edits & unsaved changes considering mobile it gets more complicated because there are other lifecycle events. On Android and iOS mobile apps can be started and stopped as needed by the OS, which is not something web has historically had to deal with. Web has typically just had to deal with user initiated events Choices 1-6 are all similar: unloading the web page/single page app and are commonly handled using wind

floating ui - a js library for floating elements such as popover and dropdown

this is a cool library which an be used for tooltips, menu btn activator etc  https://floating-ui.com/ https://floating-ui.com/docs/react-examples