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

rename visible #92

Open
Mouvedia opened this issue Apr 10, 2013 · 5 comments
Open

rename visible #92

Mouvedia opened this issue Apr 10, 2013 · 5 comments

Comments

@Mouvedia
Copy link
Member

When ref(visible of selector) returns yes you could logically think it's visible: you would be wrong, it could be hidden by another element. It's badly named: it should describe what it does.

render: yes | no;

rendered: yes | no;
display: yes | no;
displayed: yes | no;
insert: yes | no;
inserted: yes | no;
is: yes | no;
@vprimachenko
Copy link

+1 for displayed

@veosotano
Copy link
Member

I don't think this is an issue. Something being visible on your page, in an abstract sense, has nothing to do with wether it is overlapping with another element and is being obscured. Also, the name "visible" as it is now, is immediately familiar with CSS users, since it acts the same as visibility: hidden. Keep in mind that the flow is still being affected even if not visible.

@Mouvedia
Copy link
Member Author

I gotta say that I originally planned to introduce a new read-only property which would return the state of an element (yes for visible, no for completely hidden, partial for partially visible/hidden). And @veosotano pointed out that it can't be considered reliable once you take transparency into account.

Let's talk about what this property does. This property is not about whether the element is visible or not. Does it insert or remove an element into/from the tree? Since you said that the flow is still affected that means that we can remove insert and inserted. Since it has no incidence on the existence of the element we can also remove is. Does it render or display the element on the screen? The answer is yes. Since it's not a read-only property the verb form should be chosen: it's an order. So we end up with:

render: yes | no;
display: yes | no;

Which one is the most accurate? Which one would you pick? And why?

@Mouvedia Mouvedia reopened this Apr 10, 2013
@vprimachenko
Copy link

display because css

@Mouvedia
Copy link
Member Author

display because css

@vprimachenko in CSS display removes elements from the flow. So that's actually something that could be confusing for an user with a CSS background.

Mouvedia added a commit that referenced this issue Apr 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants