mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
There were couple of problems in our handling of invalid or incomplete URLs- - The browser back button behavior breaks if someone enters url with invalid group ID, incorrect group name. - On typing group edit URLs with invalid group ID, an error was raised and the URLs remained the same with just opening the groups overlay with "Your" tab selected in left panel. - On typing group edit URLs with incorrect right side tab or without any right side tab, we showed "general" section, which is fine, but the URL was still incorrect. This commit fixes the above mentioned problems- - URLs with invalid group IDs are now handled gracefully with groups UI opening in the same way as before but the url is updated to "#groups/your". - We now update the right side tab to "general" if right side tab is invalid or there is no right side tab. - All the URL updates to fix invalid urls are done using "history.replaceState" to make sure the browser back button behaves as expected. - All the code for checking the urls is done in hashchange.js itself, so we can remove some code from change_state.
13 KiB
13 KiB