-
Notifications
You must be signed in to change notification settings - Fork 361
Make the tree view a dock item #1056
Conversation
4a638ba
to
fe63d74
Compare
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. |
Just merged atom/one-light-ui#96. So if you build Single tabs are now pretty seamless and look more like titles. Just once you start to add more items, they feel like tabs: |
Looks amazing. I'm even more excited about this feature now. |
BTW I think we should make this title-bar free mode the default. |
Where's the option to disable this? Or should I ask: will there an option to revert to the default? |
Looks amazing @simurai!! 😍 |
@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. |
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...
|
You could add atom-dock.left .tab-bar {
display: none;
} then it feels like the current panel. |
@nathansobo Is this despite the setting @simurai mentioned? |
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. |
omg @simurai that looks awesome. |
I think the setting covers it. 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: For those that like a more minimal UI and are ok toggling with the keyboard only (or status-bar/tool-bar buttons). |
Should find-and-replace also be moved to a dock (bottom)? I think yes. Then the rule of thumb would be:
It could overlap, but then you can just keep a dock open all the time, or keep toggling a panel (like tool-bar). |
fe63d74
to
9a70d1e
Compare
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.
a690ef3
to
81bc7f9
Compare
@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. |
Fixes failures in atom/atom#14221
…hs change This was causing an error to happen asynchronously in the test suite
What is going to happen with the config |
@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. |
Temporarily set its with to min-content when computing the preferred width
Make list inherit its container's width
33155d1
to
210fada
Compare
Looks like we can merge this now. =) |
❤️ |
⛑ 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 ⛑
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:
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.