Repository navigation
Create tabbed interface for GitHub features - #461
Conversation
| .github-PanelResizer { | ||
| // ok, yeah, magic number.. err color | ||
| background-color: mix(@base-background-color, @tool-panel-background-color); | ||
| // background-color: mix(@base-background-color, @tool-panel-background-color); |
There was a problem hiding this comment.
I'm having some problems with this. Why is it that when I move this line........
| flex: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| // background-color: mix(@base-background-color, @tool-panel-background-color); |
There was a problem hiding this comment.
.......to here, the color looks wrong?
There was a problem hiding this comment.
Yeah, the color mix() is kinda custom. So either we could use it also in .github-Tabs-NavigationItem .active. Or use @tab-background-color-active for the .github-Tabs-PanelContainer.
I can play around with it, if you like.
There was a problem hiding this comment.
@simurai That'd be great!! I'd also love to understand what I was doing wrong xD
There was a problem hiding this comment.
Basically I was trying to get the background behind the tabs to match the background behind the tree-view/tabs, and the rest of the panel to have your original BG color
There was a problem hiding this comment.
If you uncomment here ☝️ .
|
@simurai you'll need to run this to make the tabbed interface show up |
| </nav> | ||
| <section className="github-Tabs-PanelContainer"> | ||
| {children.map((child, i) => ( | ||
| child && React.cloneElement(child, {active: i === this.props.activeIndex}) |
There was a problem hiding this comment.
Do these cloned elements need a key?
There was a problem hiding this comment.
I think toArray takes care of adding them in this case
| } | ||
|
|
||
| Tabs.Panel = TabPanel; | ||
| export default Tabs; |
There was a problem hiding this comment.
Any reason not to export default class Tabs { ... } up above?
For that matter I think you can do:
Tabs.Panel = class TabPanel extends React.Component {
// ...
}Just a style thing, but I think elsewhere we've tended to export at declaration site. I tend to prefer that myself because it makes it evident how to import a definition right at the declaration site without needing to hunt for the exports.
| </EtchWrapper> | ||
| </Tabs.Panel> | ||
| {this.props.githubEnabled && ( | ||
| <Tabs.Panel title="Hub"> |
There was a problem hiding this comment.
Hee hee, I still think that's great.
There was a problem hiding this comment.
Ya, let's leave it for a bit longer. 😂
| repository={this.getActiveRepository()} | ||
| statusBar={this.statusBar} | ||
| savedState={this.savedState.gitController} | ||
| githubEnabled={this.config.get('github.githubEnabled')} |
| border: 1px solid @tab-border-color; | ||
| border-left: 2px solid @background-color-info; | ||
| border-bottom: none; | ||
| background: @tab-background-color-active; |
There was a problem hiding this comment.
...and change ☝️ to background-color: mix(@base-background-color, @tool-panel-background-color);, then it should match.
|
Currently the tabs look like: But not sure, it feels uncanny. Also, because themes style the editor tabs (instead of the tabs package), it will be off/un-aligned for most themes. And pretty different for some. Here the Hmm.. either we use the exact same markup + class names as the tabs package or we try to make it look less like tabs. Then it might be ok that they are different. Here a version with underlines for the selection: Or use a "segmented control": Or use vertical tabs, like the go-plus package: I think I like the vertical tabs best. Also because there would be tons of space for more tabs. Like we wouldn't have to cram everything into just two panels but could have lots more. Downside is that it's limited to icons only. Or maybe with label if they are not too long. |
|
Oh good call. I like the last two options. I say we try vertical tabs and see how it feels. |
|
Hm the other downside to vertical tabs is you lose horizontal space all the way down the pane, instead of space just at the top... |
|
I kind of like the segmented control, personally. I can't think of any other tabs we'd need to leave space for, and we could always change to vertical tabs if and when we need them. |
|
I experimented with the vertical tab list but it felt super weird... with only two icons there's a tooon of wasted space. I'm gonna go for the segmented UI for now and we can go from there if we want to change it. |
|
@BinaryMuse We probably could use these "Selected buttons" from the styleguide. Then the selected color will be set by the themes. <div class='btn-group'>
<button class='btn selected'>Git</button>
<button class='btn'>Hub</button>
</div> |
|
@simurai The downside there is we have to change the Tab panel (which I plan on extracting) to use the button groups — but if that's really what makes the most sense here, I could make that work. |
|
By "change the Tab panel", you mean change the markup and class names? Yeah, right. If you wanna keep it custom, we can try using |
|
@BinaryMuse Ah, sorry, never mind. You're already using |
So it works for light and dark themes
So that the height still looks the same
So it matches other stuff like buttons or inputs. Also I think the `:not()` selectors aren't really needed.
So it matches themes
In case they overflow, one day.








No description provided.