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: cloud map error state offline mode #695

Merged
merged 1 commit into from
Apr 4, 2023
Merged

Conversation

victorgaard
Copy link
Contributor

Problem

If a given user has loaded the Komiser dashboard, visited the Inventory page, lost internet connection or closed the server, then went back to the dashboard, they will be served either with a default browser error screen (i.e.: there is no internet connection...) or with the Next.js cached HTML/JS version of the page, which shows the dashboard widgets with the error state.

In the case they receive the cached version, the cloud map error state would render like this:
image

We use an SVG to display the world map as a placeholder, so since there is no connection to load the file, it displays its alt text instead.

Solution

Remove the alt property, so in this specific scenario of no internet connection, they would just see a blank space where the map should be.

The error state (not in offline mode) can be observed from the Storybook:
https://storybook.komiser.io/?path=/story/komiser-widgets-cloud-map--error

@victorgaard victorgaard added the bug Something isn't working label Apr 4, 2023
@victorgaard victorgaard marked this pull request as ready for review April 4, 2023 12:03
@victorgaard victorgaard requested a review from eneskaya April 4, 2023 12:03
@victorgaard victorgaard added this to the v3.0.11 milestone Apr 4, 2023
@victorgaard victorgaard merged commit 8927ea9 into develop Apr 4, 2023
@victorgaard victorgaard deleted the feature/tech-1013 branch April 4, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants