Closed troughc closed 3 months ago
I think we should have a warning message and also add a button in the warning message to either stay or leave the tab.
@AbhishekPAnil can you use the same popup warning to save here? If so (if the message makes sense), please proceed and implement.
@troughc Currently the data will be lost only if the user saves in any of the tabs. In all other cases the data will persist. Do we need to show the warning for each switching of tab or should we show it only before the user saves something.
@SyamBabu-M I don't think I need to see again - did you implement the same popup message we use everywhere else? If yes, please go ahead and deploy with @AbhishekPAnil
@troughc I am doing some code refactoring of some components connected to this issue. We can deploy this tomorrow.
@SyamBabu-M if you are refactoring code, perhaps I should retest? I am happy to do so if needed.
@troughc Yes, it is a good idea to test blocking in the entire app. Earlier the hook we used to block navigation triggered blocking for changes in search parameters. In the current refactoring, I have removed that. This helped us to use the same hook on the settings page.
@SyamBabu-M I tested this everywhere, and it works except for when I 'edit' a user profile.
to reproduce: Go into User Management and edit a user. Don't save Click the side bar or back to previous screen at the top. No popup appears and I can leave without saving.
Also, I can switch calendars (for example, from signe Laval to tout Culture) without saving edits I am in the midst of doing. No warning is given. This is true from anywhere in the application.
Tested user management editing of User: PASSED
will decide later if we want to have warnings when switching calendars - not necessary right now since no one but us does this.
There is a I make a change in calendar settings / calendar widget / mandatory fields, and then I move to another tab, make a change and then save, only the current tab is saved. The other tab loses the changes I made.
What should we do - should we have a warning when you switch tabs without saving? I think yes. @AbhishekPAnil @SyamBabu-M I'd like to hear your opinions on this. Please add a comment.