-
Notifications
You must be signed in to change notification settings - Fork 99
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
Removing unneccessary calls when opening/editing a post #1463
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Angamanga I did notice something with the UI and it's dependence on the API call before it responds to user action. Affects card preview slide out on click and Mode switch in general on feed view.
Link to video here: https://ushahidi.slack.com/archives/C03T5716QE5/p1731926348116819
This PR introduce a resolver instead of a guard for post-detail/post-edit view. In this way, we can still check the permissions and also reuse the post-object in the components, and in that way removing an unneccessary call to the API that slowed down the opening of the post.
To test:
Note: While testing this, I found an existing bug in the mapview:
https://linear.app/ushahidi/issue/USH-1677/changing-status-on-a-post-in-map-view-doesnt-update-the-ui-to-reflect I have not fixed that in this PR.