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

Introduce an active property on wl-progress-spinner #68

Open
rwestlund opened this issue Jun 4, 2019 · 1 comment
Open

Introduce an active property on wl-progress-spinner #68

rwestlund opened this issue Jun 4, 2019 · 1 comment
Labels
feature New feature

Comments

@rwestlund
Copy link
Contributor

When using the spinner in indeterminate mode (e.g. during an AJAX call), there's no obvious way to hide it. I'd imagine writing something like:

<wl-progress-spinner ?active="${this.loading}"></wl-progress-spinner>

I tried setting wl-progress-spinner:not([active]) { visibility: hidden; }, but it pops in and out in a jarring way.

Polymer's paper-spinner uses a fade in/out that worked well: https://github.com/PolymerElements/paper-spinner

@andreasbm
Copy link
Owner

Hi, thanks for opening an issue 👍

I can definitely see why you need this feature. Right now the indeterminate mode is assumed as always being active and it is therefore up to the library consumers to either hide or show the spinner. I will consider adding an active property in the future.

For now I'll advise you to introduce a data-active attribute that you can toggle yourself on the spinner and hide it using some CSS like this.

wl-progress-spinner:not([data-active]) {
  visibility: hidden;
}

I made a Codepen you can look at for inspiration https://codepen.io/andreasbm/pen/NWWXBaV.

@andreasbm andreasbm added the feature New feature label Nov 2, 2019
@andreasbm andreasbm changed the title make progress-spinner inactive Introduce an active property on wl-progress-spinner Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants