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: loading indicator map control #1173

Merged
merged 4 commits into from
Aug 5, 2024
Merged

feat: loading indicator map control #1173

merged 4 commits into from
Aug 5, 2024

Conversation

RobertOrthofer
Copy link
Contributor

Implemented changes

This PR implements a Loading Indicator Control for the map element as described in #911, providing a default SVG graphic.

possible options for this control:

  • type: "small" or "fullscreen" (defaults to "small")
  • opacity: opacity of the spinner from 0 to 1
  • spinnerSvg: optional SVG as markdown as string, should already provide the desired animation ("<svg xmls... </svg>")

Two stories have been added, because the different types look quite different. Most of the time the "small" type should be sufficient.

Screenshots/Videos

Screen.Recording.2024-08-02.at.12.16.14.mov
Screen.Recording.2024-08-02.at.12.23.16.mov

Checklist before requesting a review

Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for eoxelements ready!

Name Link
🔨 Latest commit 385177c
🔍 Latest deploy log https://app.netlify.com/sites/eoxelements/deploys/66acb8375d589f000819b218
😎 Deploy Preview https://deploy-preview-1173--eoxelements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@RobertOrthofer RobertOrthofer marked this pull request as ready for review August 2, 2024 12:04
@silvester-pari silvester-pari self-requested a review August 5, 2024 12:42
Copy link
Collaborator

@silvester-pari silvester-pari left a comment

Choose a reason for hiding this comment

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

Thank you for this; since in the other elements we do mostly configuration via CSS variables, could this be an option here as well? So instead of passing an SVG as string, make it overwriteable via CSS variables?

Edit: On the other hand, this currently allows more flexibilty as it would allow setting an e.g. GIF or even a video as loading animation. Fine for me to keep it this way, maybe somethign to consider during our future refactoring.

@silvester-pari silvester-pari changed the title feat: Loading Indicator Map Control feat: loading Indicator map control Aug 5, 2024
@silvester-pari silvester-pari changed the title feat: loading Indicator map control feat: loading indicator map control Aug 5, 2024
@silvester-pari silvester-pari merged commit fb727d3 into main Aug 5, 2024
7 checks passed
@silvester-pari silvester-pari deleted the map/feat/spinner branch August 5, 2024 15:35
@silvester-pari silvester-pari linked an issue Aug 5, 2024 that may be closed by this pull request
@RobertOrthofer
Copy link
Contributor Author

That was exactly my thought process... I'd vote in favor of this option at the moment until we have a real-world problem that would demand the other approach

@github-actions github-actions bot mentioned this pull request Aug 6, 2024
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.

Control for viewing the loading state
2 participants