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

feat: prevent loading state while waiting for the post #5012

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

christian14b
Copy link
Collaborator

In the past implementation, the module was still appearing while fetching the post and then disappeared if no posts were found.

With this implementation the page will decide to show or not the whole education module, instead of the module.

The downside of this is that we will have to make an api call even if the module is not visible.

@christian14b christian14b requested review from emuvente and a team October 4, 2023 18:28
@dyersituations
Copy link
Collaborator

@christian14b Both this PR and https://github.com/kiva/cms-page-server/pull/693 seem related, and the recent changes seem good. Were you able to test locally? If so, I can approve, I just know we had issues with testing the previous iteration of the promo spot.

@christian14b
Copy link
Collaborator Author

@christian14b Both this PR and kiva/cms-page-server#693 seem related, and the recent changes seem good. Were you able to test locally? If so, I can approve, I just know we had issues with testing the previous iteration of the promo spot.

Yeah! they both work well locally, this work is related to the existing blog post so they're not completely related, just happens that the timing was really close

@christian14b christian14b merged commit 3b4c2d5 into main Oct 5, 2023
1 check passed
@christian14b christian14b deleted the fix-education-loading-state-MARS-522 branch October 5, 2023 16:27
}
},
created() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use mounted instead so that this isn't started on the server-side. The server completes the request as soon as created finishes, so anything async started during that is ignored.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll create a quick pr for this. Thanks!

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.

3 participants