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

Allow user to supply via attribute whether they want the indicator enabled #26

Closed
wants to merge 5 commits into from

Conversation

qq99
Copy link

@qq99 qq99 commented Aug 21, 2014

Fixes #21 (or so I hope)

Hi there

indicator="disabled" in this PR will allow the user to declare whether they want the indicator animating or not
Ideally, the indicator element itself would be hidden entirely (this is not the case)

I wasn't entirely sure how to expose an attribute/property that a user could call externally (via inspect & $0.indicator or otherwise), and the code here looks quite different than https://developer.mozilla.org/en-US/Apps/Tools_and_frameworks/Web_components so I figured I'd start this PR to start the conversation

Let me know what you think

@dotch
Copy link

dotch commented Aug 21, 2014

thank you, good work!
before we merge this, something to discuss:
personally, I would prefer the attribute to be a Boolean attribute, which disables the indicator when it is present.
maybe something like noindicator or plain.
@sole what do you think?

@qq99
Copy link
Author

qq99 commented Aug 21, 2014

Oh, that'd be really good, actually :)
Is there a good example of being able to modify the DOM via inspector or interact with a brick widget via JS from outside? I'd like it to be a property you could toggle display:hidden vs just not animating it

@qq99
Copy link
Author

qq99 commented Aug 21, 2014

noindicator is the form I prefer more

@qq99
Copy link
Author

qq99 commented Aug 23, 2014

I think I've got a better grasp on this now, revised to use noindicator to change the display property, left it still animating s.t. it'd be in the right place if noindicator attr is removed

@dotch
Copy link

dotch commented Aug 28, 2014

we might be able to simplify the code by just adding:

brick-tabbar[noindicator] .selected-indicator {
  display: none;
}

to the default theme css file.
and just always have and animate the indicator. The themes can then make use of the noindicator attribute to either display it or not.
what do you think about that?

@qq99
Copy link
Author

qq99 commented Aug 28, 2014

haha, yeah, that makes a lot more sense 👍

@qq99 qq99 closed this Jul 30, 2019
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.

Any way to disable/configure the "indicator"?
2 participants