-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
✅ Deploy Preview for eoxelements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
a00c07d
to
f5d24c3
Compare
f5d24c3
to
d845367
Compare
There was a problem hiding this 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.
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 |
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 1spinnerSvg
: 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