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

Navigator Panel #144

Closed
taylornowotny opened this issue Jul 13, 2022 · 31 comments · Fixed by #216
Closed

Navigator Panel #144

taylornowotny opened this issue Jul 13, 2022 · 31 comments · Fixed by #216
Assignees
Labels
help wanted Extra attention is needed prio:2 Always look for prio:1 issues first before working on prio:2 type:question Further information is requested

Comments

@taylornowotny
Copy link
Contributor

This issue is to discuss all details of the Navigator panel that are not already covered in Issue #131

Suggestions:
Make it pinnable - As a user I want the ability to pin the navigator panel so it's always open on the left side (I have this permanently enabled in Webflow). I use the Navigator in Webflow frequently so it saves me a lot of clicks to have it always open. Having the Navigator always pinned is like having the layers panel always open in figma.

There's also the issue of naming elements.
In Figma you can name layers directly (and most users don't). In Webflow the element name in the navigator is the name of the class.
What do you think our approach should be here?

@taylornowotny taylornowotny changed the title Navigator Panel UX Navigator Panel Jul 13, 2022
@taylornowotny taylornowotny added help wanted Extra attention is needed type:question Further information is requested prio:2 Always look for prio:1 issues first before working on prio:2 labels Jul 13, 2022
@taylornowotny
Copy link
Contributor Author

Oleg:
"I think we should enable changing the name in-place in the navigator, since its a component name, not a class name + we should enable changing it in the style panel where we display the selected instance."

So the component name = the name displayed for that element in the Navigator panel, correct?

As far as I know that will work just fine

As a low-priority feature in the future, many Webflow users wish they had the ability bulk re-name elements via the navigator panel. Figma has a UX flow for this that we can imitate

@kof
Copy link
Member

kof commented Jul 13, 2022

So the component name = the name displayed for that element in the Navigator panel, correct?

yep

As a low-priority feature in the future, many Webflow users wish they had the ability bulk re-name elements via the navigator panel. Figma has a UX flow for this that we can imitate

How can one bulk-rename components which have each different names? I mean do they need a name that has a base part and some generated suffix (e.g. 1,2,3) ?

In any case, for bulk-renaming we should have a separate issue.

@taylornowotny
Copy link
Contributor Author

What if the user could hide an element from the Navigator like you can hide layers in design programs like Figma?

We'd have an eye icon that shows when the element is hovered in the Navigator. Clicking it would apply display: none to the element. Clicking it again would apply the display settings that were previously applied before it was hidden. (Is this a technical challenge?)

Hidden items would grey-out in the Navigator to indicate that the item is hidden. Webflow doesn't have this, so keeping track of hidden items is a bit of a pain.

For example anything that doesn't show on the page by default but is revealed by an interaction, such as a dropdown menu, would be hidden. In Webflow you just have to remember that it's hidden. But if we grey-out hidden items in the Navigator, that makes it easy to keep track.

Thoughts?

@kof
Copy link
Member

kof commented Jul 27, 2022

@taylornowotny lest make this hiding a separate issue, if doing it I would not set display, I would mark it as hidden in the data structure and not render it at all. Setting display still renders it in the dom, but doesn't paint it.

@taylornowotny
Copy link
Contributor Author

Display: none is actually what we want I think

The Navigator should represent the HTML structure of the page, so if an element is hidden but still in the Nav, I would expect it to still exist in the DOM but not be rendered on the canvas

For example a modal. Meant to be hidden at first, then show when appropriate. We don't want the content of the modal to be removed from the DOM we just want it to not display

@taylornowotny
Copy link
Contributor Author

And if it was display: none but still part of the page then it could still be moved around in the navigator and have properties applied to it, it just wouldn't display

Basically the same behavior that a designer would expect from layers in any design program

@kof
Copy link
Member

kof commented Jul 27, 2022

For example a modal. Meant to be hidden at first, then show when appropriate. We don't want the content of the modal to be removed from the DOM we just want it to not display

That's not a great way to render modal or generally render any hidden element that will be used once upon the time.

We don't want the content of the modal to be removed from the DOM we just want it to not display

Why? Just because something is in the navigator but isn't on canvas dom tree? What is the problem I don't see

@kof
Copy link
Member

kof commented Jul 27, 2022

@taylornowotny for you to understand why UI engineers think this way: DOM has a cost, high cost. We don't put in the dom anything that we don't need to show.

@taylornowotny
Copy link
Contributor Author

taylornowotny commented Jul 27, 2022

@kof Well I don't have a great understanding of how engineers use the dom so you can let me know if these are valid concerns:

The main concern I have is SEO. Search engines needs to be able to crawl all the content on the page, even if it's inside a modal or a menu that is hidden from view. Will that still be possible if the element is removed from the DOM?

Also, if a code embed element is hidden, would that code still be able to execute as part of the page? My phrasing might not be perfect here but in Webflow I have a set of code snippets that goes on every page. I put them all into an embed element. In Webflow the embed element takes up no space so it doesn't show anyway. But what if I hid a Webstudio embed element, would that prevent the code from working?

@kof
Copy link
Member

kof commented Jul 27, 2022

The main concern I have is SEO. Search engines needs to be able to crawl all the content on the page, even if it's inside a modal or a menu that is hidden from view. Will that still be possible if the element is removed from the DOM?

That's a whole different topic. Not an expert in SEO, but it was considered a red flag by google crowler if something is in the HTML but something else is actually rendered on the page to the user. Basic rule I remember is that google wants to index same content users can see. Its probably not as simple as that and they may be smart to identify stuff like modal.

So what you are trying to do is to show to the user one thing, but show to the search engine another thing. This is generally considered as an attempt to trick the search engine, back in the days sites were blocked from search entirely which tried to do stuff like that, but I don't know how things are nowdays.

@kof
Copy link
Member

kof commented Jul 27, 2022

Also, if a code embed element is hidden, would that code still be able to execute as part of the page? My phrasing might not be perfect here but in Webflow I have a set of code snippets that goes on every page. I put them all into an embed element. In Webflow the embed element takes up no space so it doesn't show anyway. But what if I hid a Webstudio embed element, would that prevent the code from working?

That would depend on how we decide to implement such embeds. It does seem logical to me right now that if you hide an embed then it won't get executed.

@taylornowotny
Copy link
Contributor Author

taylornowotny commented Jul 27, 2022

So what you are trying to do is to show to the user one thing, but show to the search engine another thing. This is generally considered as an attempt to trick the search engine, back in the days sites were blocked from search entirely which tried to do stuff like that, but I don't know how things are nowdays.

Not exactly. What I mean is, the google crawler doesn't use a website like a human. It can't open menus or show modals. If those menus are set to display: none in CSS then they aren't hidden from google at all, only from the human users, and only conditionally.

If google had a problem with display: none then every site with a hamburger menu would be problematic for SEO.

For many companies SEO is the #1 factor when choosing a site builder so this is something we want to get right. I know Webflow gets a lot of market share from SEO-minded marketing teams because it allows more control over the HTML structure than WYSIWYGs

@natlusyht
Copy link
Contributor

If the element is style display: none or attribute hidden=true, it would be better to represent this state in the navigator, whether we allow the reverse to affect the element; is what is being discussed here right?

@kof
Copy link
Member

kof commented Jul 27, 2022

Not exactly. What I mean is, the google crawler doesn't use a website like a human.

It actually tries to use a website like a human, they use browser engine to render things.

It can't open menus or show modals.

it totally can and probably does and if you build something that opens for humans one text and for crowler another text it may consider this an attempt to trick it.

display: none in CSS then they aren't hidden from google at all

yes but also if its not visible to the user, they will not index this part or will keep the ranking for that piece low

If google had a problem with display: none then every site with a hamburger menu would be problematic for SEO.

Yeah, they are probably smart enough to differentiate actual attempt at tricking them from just a closed menu

I know SEO is very important and I also know that webflow has a lot of problems there too. Let me involve an expert here to give you a full picture.

@kof
Copy link
Member

kof commented Jul 27, 2022

@natlusyht I was thinking that hiding from navigator should be removing the instance from render tree. It should not do the same thing we can already do in the style panel: display: none

@taylornowotny
Copy link
Contributor Author

@natlusyht more specifically, I'm wanting to know if we can apply display: none from the navigator, like hiding a layer in Figma.

I am not certain but I think hidden=true and removing the element from the DOM are both going to be problematic for SEO. I agree with Oleg's suggestion of involving an expert here

Figma:
https://user-images.githubusercontent.com/86495896/181288105-cbfe53a5-c47a-4295-91c1-bb3645e1652e.mov

@taylornowotny
Copy link
Contributor Author

@kof That's a good idea. It would be great to have ongoing support from an SEO expert who has used site builders before. In this issue and others we want to have a platform that is optimized for SEO

@kof
Copy link
Member

kof commented Jul 27, 2022

@taylornowotny I am not sure how this compares to figma, because in figma it just doesn't show on canvas, there is no dom behind canvas in figma, that element simply doesn't exist on canvas when its hidden, right?

@taylornowotny
Copy link
Contributor Author

@kof yea the figma reference is just for the UX, to show what I want it to look like

To clarify, the reason I think it would be valuable to apply display: none from the Navigator in addition to the Properties panel is so that
1 - users dont have to select the element and look at the properties panel to see if it is hidden. The element will simply be greyed out in the navigator.
2 - users can hide/show elements very quickly. For example when working on a nav menu where every nav item is a dropdown menu (I do this a lot in Webflow). Each dropdown menu has to be hidden when not being worked on, or else they would overlap eachother. So when working on multiple menus like this, I want to be able to quickly hide one and show another and keep visual track of which ones are hidden and which ones are shown. That would speed up my workflow.

@kof
Copy link
Member

kof commented Jul 27, 2022

@taylornowotny all those benefits seem to apply also if we remove the element from the tree on canvas

@taylornowotny
Copy link
Contributor Author

@kof yes for sure, but we don't want to negatively impact SEO in the process

@kof
Copy link
Member

kof commented Jul 27, 2022

@kof yes for sure, but we don't want to negatively impact SEO in the process

I am 90% certain we are not, will get a 100% statement from expert.

@kof
Copy link
Member

kof commented Jul 27, 2022

Also what I don't get is why would you want to hide something and yet assume SEO benefits. Its literally trying to hide information from user but give it to the crowler. If intentional its not a thing search engines like to see.

@taylornowotny
Copy link
Contributor Author

@kof

why would you want to hide something and yet assume SEO benefits.

Dropdown menus, mobile nav (hamburger) menus, modals, and tabs.

They are meant to be seen by the user and meant to be crawled by search engines. But the functionality of these components requires that they only be conditionally visible to the user.

@kof
Copy link
Member

kof commented Jul 27, 2022

Ok in such cases you don't want to use the hide/show button in the navigation, you want to use the display style property. To me this seems very logical

@kof
Copy link
Member

kof commented Jul 27, 2022

Hide/show in the navigator would be for things you don't want to be rendered because they are not ready or because you decided to stop showing them to the user entirely. E.g. some promo event that you enabled for a month and then disabled.

@taylornowotny
Copy link
Contributor Author

The hide/show button in the navigator is just meant to be a shortcut for the the display style property

It's not essential, but would make it significantly easier to work on things like nav menus with a lot of dropdowns. And it would mean that you can see at a glance which elements have display: none applied, without having to select the element first

@kof
Copy link
Member

kof commented Jul 27, 2022

@taylornowotny I think I get it now, its how it works in figma apparently, I didn't realize it is essentially a shortcut for the layer visibility that you can as well toggle in the layer on the right.

@taylornowotny
Copy link
Contributor Author

ah sorry if I didn't make that clear

Should I go ahead and include this in the design then or wait?

@kof
Copy link
Member

kof commented Jul 27, 2022

Yeah, we will figure out this rendering detail as we go, but I think its useful either way to have it

@natlusyht
Copy link
Contributor

natlusyht commented Jul 27, 2022

Whether it's rendered to the DOM is semantic on the implementation front. But it would be better rather than not to be able to glean the hidden/display nature of the element in the navigator.

There's no doubt that someone could set display to none regardless of what that does to SEO, it's not like we would disallow this in the style panel; with that in mind, the only other way to find that element after it has been set to display:none is through the navigator, an indication of the nodes that are indeed display:none/hidden should thus be accessible through the navigator: beyond the added action of clicking a node to see it's style/hidden properties.

For example Chrome dev-tools has this indicator for flex parents, has hidden attributes for hidden elements, etc.

Screenshot 2022-07-27 at 8 22 14 PM

Screenshot 2022-07-27 at 8 15 48 PM

@kof kof self-assigned this Aug 5, 2022
@kof kof linked a pull request Aug 5, 2022 that will close this issue
12 tasks
@kof kof closed this as completed in #216 Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed prio:2 Always look for prio:1 issues first before working on prio:2 type:question Further information is requested
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants