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

Refactor hypercert page data loading #319

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

bitbeckers
Copy link
Contributor

@bitbeckers bitbeckers commented Nov 29, 2024

Bigger PR than planned, but a quite fundamental change...

This PR updates the loading of the hypercert page to not be a single call to the Graph, but split calls for hypercert data, evaluations and marketplace listings.

The single page layout of the page has been split into multiple components with suspense boundaries, enabling the partial loading of related data and improvind readability. To follow the RSC pattern, the hypercert page is loaded async with different segments wrapped in suspense boundaries.

Additionally, when a mutation is executed the cache for both profile and the hypercert page are invalidated. For example, instead of passing the full object of an hypercert through all components, we now simply use the available hypercertId when available.

While refactoring I tried to harmosize some flows and for example standardized the ErrorState component to a global component.

A few focus points for the review:

  • Responsiveness of page loading
  • Reloading of evaluation records after evaluations
  • Reloading of marketplace listings after mutations

Copy link

vercel bot commented Nov 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hypercerts-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2024 0:58am

@bitbeckers bitbeckers marked this pull request as draft November 29, 2024 05:18
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.

2 participants