flowcore-io / luttaka-open

The open source event experience app powered by the Flowcore Data Management Platform
https://luttaka.com
MIT License
12 stars 11 forks source link

Create a reusable Loading Indicator molecule component #169

Open suuunly opened 5 months ago

suuunly commented 5 months ago

Is your improvement request related to a specific problem in the code or project structure? Please describe. šŸ‘Øā€šŸ’» We have quite a fair bit of sprinkled loading code around. All of which should be combined into a single component.

Describe the improvement or refactor you would like šŸŽÆ Create a Loading component, that renders only spinner when the loading input is true, and otherwise render the underlying details.

It would also make sense to make the underlying details an optional part, in case we want to render a loading indicator as a standalone thing (for example inside a button, next to a piece of text)

Explain why this improvement or refactor is beneficial šŸŽ–ļø This will significantly reduce the amount of if-else statements in the code, and unify every loading development experience.

Describe alternatives you've considered šŸ”„ none

Additional context or comments

This could be converted into a reusable component. But I think this can be done as a separate issue :) _Originally posted by @suuunly in https://github.com/flowcore-io/luttaka-open/pull/168#discussion_r1567024569_