Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Mar 31, 2017

⛑ This can be merged once 1.17 reaches stable. Tests are red because we're building against a version of Atom that doesn't have the dock APIs ⛑

screen shot 2017-03-31 at 5 00 31 pm

Hey, @simurai. I don't think we're really ready to ship this in the next release cycle because it needs some design ❤️.

In the screenshot above I deliberately sized the tree view so the tab stretched across 100% of its width. But when the tree view is wider, the narrower tab looks awkward:

screen shot 2017-03-31 at 5 34 57 pm

I also think the tab being white when the tree view isn't focused looks weird. Do you think you could come up with some mock ups, a PR on the tabs package, or just do some styling overrides on this branch for a treatment of tabs in docks that feels more natural? I don't think having a tab for the tree view is fundamentally bad. At least it vertically aligns the content of the tree view with the panes, which I think is nice. But I do think the dock tabs need to look somewhat different and more subtle than the pane tabs.

@nathansobo
Copy link
Contributor Author

Another option could be to do not render the tabs at the top for the left and right panels, but instead render them at the left and the right as icons. This might work better because these spaces are fairly narrow. I guess it depends on how many tabs we try to fit in. At the moment, in the default configuration, we only have the tree view so it doesn't matter much. The real problem is making the default configuration not look awkward while still making room for people to add more items.

@simurai
Copy link
Contributor

simurai commented Apr 1, 2017

Just merged atom/one-light-ui#96. So if you build atom/atom you should see it like this (plus the docks border):

screen shot 2017-04-01 at 11 22 42 am

Single tabs are now pretty seamless and look more like titles. Just once you start to add more items, they feel like tabs:

screen shot 2017-04-01 at 11 28 37 am

@nathansobo
Copy link
Contributor Author

Looks amazing. I'm even more excited about this feature now.

/cc @maxbrunsfeld @matthewwithanm

@nathansobo
Copy link
Contributor Author

BTW I think we should make this title-bar free mode the default.

@Alhadis
Copy link
Contributor

Alhadis commented Apr 1, 2017

Where's the option to disable this?

Or should I ask: will there an option to revert to the default?

@matthewwithanm
Copy link
Contributor

Looks amazing @simurai!! 😍

@nathansobo
Copy link
Contributor Author

@Alhadis I'm considering leaving an option to render the tree view in a panel instead of a dock. It's a bit more code complexity but could be a nice escape hatch for people who only want a tree view at the left and don't plan on using the docks at all.

@Alhadis
Copy link
Contributor

Alhadis commented Apr 1, 2017

Well that would be me, but I'm kinda hoping there'll be something that will leave the tree-view looking like it hasn't been touched at all...

#changeHater

@simurai
Copy link
Contributor

simurai commented Apr 1, 2017

You could add

atom-dock.left .tab-bar {
  display: none;
}

then it feels like the current panel.

@simurai
Copy link
Contributor

simurai commented Apr 1, 2017

Ohh.. wait, even better. I forgot about the "Always Show Tab Bar" option:

no-tabs

@matthewwithanm
Copy link
Contributor

@Alhadis I'm considering leaving an option to render the tree view in a panel instead of a dock.

@nathansobo Is this despite the setting @simurai mentioned?

@matthewwithanm
Copy link
Contributor

imo it should be docks-only and any tweaks we wanna allow should be done within that framework. for example, if the existing "Always Show Tab Bar" option isn't enough, we could add one that's dock-specific. branching just makes it more complicated and i'm not sure what the gain is.

i'm a fan of the workspace items concept not just because devs don't have to duplicate logic (toggle side, etc) or because it gives users more control (since they can drag to new locations), but also because the centralization gives Atom more control. for example, Atom could add a mode to docks where they only show one item—the active one—and no tabs. or an option to always add new items in a split. the bottom line is that these things become consistent and predictable instead of having each one governed by a unique set of rules.

@maxbrunsfeld
Copy link
Contributor

omg @simurai that looks awesome.

@nathansobo
Copy link
Contributor Author

I think the setting covers it. Worst case there's a user style sheet if someone is upset about the toggle affordance.

@simurai
Copy link
Contributor

simurai commented Apr 2, 2017

@nathansobo Worst case there's a user style sheet if someone is upset about the toggle affordance.

The One themes already have a setting for that:

dock-buttons

For those that like a more minimal UI and are ok toggling with the keyboard only (or status-bar/tool-bar buttons).

@simurai
Copy link
Contributor

simurai commented Apr 2, 2017

Should find-and-replace also be moved to a dock (bottom)? I think yes. Then the rule of thumb would be:

  • Larger things that you want to show/hide "temporarily" -> docks (tree-view, find-and-replace, etc).
  • Smaller things that you want to show "permanently" -> panels (status-bar, custom title-bar, tool-bar).

It could overlap, but then you can just keep a dock open all the time, or keep toggling a panel (like tool-bar).

Nathan Sobo added 4 commits April 3, 2017 14:48
Existing key-bindings target the `.tree-view` element, but previously
this element wasn't the root of the tree view. Now that focus will be
handled by the workspace, making existing `.tree-view` bindings work
would have required us to transfer focus from the outer element to the
element with the `.tree-view` class. Moving this class to the root
introduces some risk of breaking themes, but I think it's worth keeping
the focus handling simple.
@nathansobo
Copy link
Contributor Author

@50Wliu Apparently this warning has been removed in newer versions of Chrome. At this point I'm not sure it's worth worrying about it.

@winstliu
Copy link
Contributor

winstliu commented Apr 8, 2017

This fixes #68
And #480 when you have no project folders open (though the UX can definitely be improved)

@winstliu
Copy link
Contributor

Pending pane items aren't working:
pending-pane-items-broken

@fabianfiorotto
Copy link

What is going to happen with the config showOnRightSide? I see that is deleted from the config form but you are still using it in the code

@nathansobo
Copy link
Contributor Author

nathansobo commented Apr 25, 2017

@fabianfiorotto We still honor that config setting on package activation because we don't want to flip the tree view back to the left for users that have chosen to put it on the right when they upgrade. Going forward, however, we want to use the drag-and-drop behavior afforded by docks rather than custom configuration.

maxbrunsfeld and others added 2 commits May 4, 2017 10:11
Temporarily set its with to min-content when computing the preferred width
Make list inherit its container's width
@Alhadis
Copy link
Contributor

Alhadis commented May 16, 2017

Looks like we can merge this now. =)

@maxbrunsfeld maxbrunsfeld merged commit 0a225ba into master May 16, 2017
@maxbrunsfeld maxbrunsfeld deleted the ns-mb-dock-item branch May 16, 2017 21:19
@nathansobo
Copy link
Contributor Author

❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants