Skip to content

refactor(site): Refactor error state #7313

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

Merged
merged 6 commits into from
Apr 28, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented Apr 27, 2023

  • Refactor design
  • Added discord link and GitHub link with prefill info
  • Reload the page if the error is a dynamic import error

Before:
Screen Shot 2023-04-27 at 15 05 51

Now:
Screen Shot 2023-04-27 at 16 48 30

GitHub issue prefilled:
Screen Shot 2023-04-27 at 15 55 15
Screen Shot 2023-04-27 at 15 55 09

Fix #7300

@BrunoQuaresma BrunoQuaresma self-assigned this Apr 27, 2023
@BrunoQuaresma BrunoQuaresma requested review from a team and Kira-Pilot and removed request for a team April 27, 2023 19:14
@matifali
Copy link
Member

Btw this doesn't fix #7300 it just refactors the error trace.
So do you really think you should close the issue?

@BrunoQuaresma
Copy link
Collaborator Author

BrunoQuaresma commented Apr 27, 2023

It is a work around since a true fix is not possible and there is no prevision for that - we depend on vite but I'm almost sure it is kinda an hard problem - the build would have to keep the previous build files on the server. It is a workaround because after refresh the page, the index.html will be updated and reference the updated assets names.

error: Error
}
const fetchDynamicallyImportedModuleError =
"Failed to fetch dynamically imported module" as const
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have to cast this as const?

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 don't remember, I think it was Co-pilot 🤔 I will remove it since does not influence anything

Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

nice!

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) April 28, 2023 12:51
@BrunoQuaresma BrunoQuaresma merged commit 88c362d into main Apr 28, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/reload-page-when-dynamic-file-not-found branch April 28, 2023 13:03
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site crashes when navigating after deploy
3 participants