Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Filters are reset when the page is reloaded #1820

Merged
merged 10 commits into from
Sep 8, 2022

Conversation

Ifycode
Copy link
Member

@Ifycode Ifycode commented Aug 18, 2022

This pull request makes the following changes:

Testing checklist:

  • Filter is retained on page reload (but reset on login or logout)
  • Also check with saved searches (also with saved searches that should only be accessible to certain users only e.g. admins) and collections
  • filters no more get reset when you go to activity view and come back to data or map view.
  • For saved searches, additional filters usually gets reset on reload or after visiting the activity view. The addition filters no more get reset after page reload or after visiting activity view.
  • I certify that I ran my checklist

Ping @ushahidi/platform

@Ifycode
Copy link
Member Author

Ifycode commented Aug 18, 2022

@tuxpiper @webong This is ready for review

@Ifycode
Copy link
Member Author

Ifycode commented Aug 19, 2022

Has issues. Converting to draft for now, till it is resolved.

@Ifycode Ifycode marked this pull request as draft August 19, 2022 05:13
@tuxpiper
Copy link
Member

From chat:

There seems to be a slight issue (with the fix for filters reset when the page is reloaded). For every other filtering, everything works fine. But in the case of filtering using a saved search that e.g. only admins are permitted to access… If the admin logs out while such filter is still on, trying to access the data view and map view from the modebar brings up the login modal instead of taking the not logged in user to the data or map view.

The restore default button also has stopped working as expected.

@Ifycode
Copy link
Member Author

Ifycode commented Aug 25, 2022

Update: The two issues attached to the restore default button after page reload have been fixed. Only the admin logout issue is left - https://ushahidi.slack.com/archives/CFC4WQG4V/p1660854328246289

@Ifycode
Copy link
Member Author

Ifycode commented Aug 29, 2022

There seems to be a slight issue (with the fix for filters reset when the page is reloaded). For every other filtering, everything works fine. But in the case of filtering using a saved search that e.g. only admins are permitted to access… If the admin logs out while such filter is still on, trying to access the data view and map view from the modebar brings up the login modal instead of taking the not logged in user to the data or map view.

Update: The two issues attached to the restore default button after page reload have been fixed. Only the admin logout issue is left - https://ushahidi.slack.com/archives/CFC4WQG4V/p1660854328246289

@tuxpiper I believe that if this admin-related savedsearch logout is a problem, then it should be isolated and solved separately. I am going to conclude that this part was purposely made to behave like this (based on my re-testing of the develop branch, and also because of a certain comment I found in the code base).

@Ifycode
Copy link
Member Author

Ifycode commented Aug 29, 2022

@tuxipiper @webong This is ready for review.

@Ifycode Ifycode marked this pull request as ready for review August 29, 2022 16:10
@tuxpiper
Copy link
Member

@webong Could you please review?

@tuxpiper
Copy link
Member

tuxpiper commented Sep 5, 2022

@webong is it feasible for you to review this?

@webong
Copy link
Collaborator

webong commented Sep 5, 2022

Tested and works great ... Good work @Ifycode

@AmTryingMyBest ready for QA

@AmTryingMyBest AmTryingMyBest merged commit ce0c39d into develop Sep 8, 2022
@AmTryingMyBest
Copy link
Contributor

QA'd, passes. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters are reset when the page is reloaded
4 participants