Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Add top/bottom bars - #9274

Merged
benogle merged 10 commits into
masterfrom
sm-top-bottom-bars
Feb 1, 2016
Merged

benogle merged 10 commits into
masterfrom
sm-top-bottom-bars

Conversation

@simurai

@simurai simurai commented Oct 24, 2015

Copy link
Copy Markdown
Contributor

This PR adds a top and bottom bar to atom-workspace.

<atom-workspace class="workspace">
  <atom-panel-container class="header"></atom-panel-container><!-- New -->
  <atom-workspace-axis class="horizontal"></atom-workspace-axis>
  <atom-panel-container class="footer"></atom-panel-container><!-- New -->
  <atom-panel-container class="modal"></atom-panel-container>
</atom-workspace>

atom-panels

It allows packages to add <atom-panel>s that span across the whole width and not just above/under the editor.

The status-bar or tabs could go on top and under the tree-view.

screen shot 2015-10-24 at 3 15 51 pm

screen shot 2015-10-24 at 3 04 02 pm

Todo

  • Change to flexbox
  • Add top/bottom bar elements
  • Add API
  • Add specs

Todo after merging

Packages that break or have issues

Closes #8939

@thomasjo

Copy link
Copy Markdown
Contributor

This looks very promising! ✨

@simurai

simurai commented Oct 24, 2015

Copy link
Copy Markdown
Contributor Author

I think if we allow other packages to add a panel that spans across the full width at the bottom, the status-bar should also go full width and be below it. Otherwise, this looks a bit odd having it above the tool-bar.

screen shot 2015-10-24 at 9 25 24 pm

@mertkahyaoglu

Copy link
Copy Markdown
Contributor

I'm working on a package that needs to be fullwidth. This will be 🆒 .

Comment thread src/workspace.coffee Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why name it bar when they are panels?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not panels, they're (panel) containers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, wasn't too sure about the bar name. Any good alternative?

  • top-full
  • top-full-width
  • top-outer
  • top-edge
  • top-most

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomasjo commented on 24 okt. 2015 21:11 CEST:

They're not panels, they're (panel) containers.

I'm sorry, I meant when the content are panels.

I like the top-most and bottom-most, but will leave that up to you guys. Just wasn't sure about bar when the containers aren't limited to bars only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming things is probably the single most difficult thing in software development, hehe. I like top-most and bottom-most too, but something about those names don't "jive".

What about something simple like header and footer?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header and footer are my favorites, especially since the terms are extremely common in the web world and we're using web tech in atom :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header and footer sound 👍 to me too

@benogle benogle added the atom label Oct 26, 2015
simurai added a commit to atom/tree-view that referenced this pull request Oct 27, 2015
This lets the height be changed by the parent flexbox added in atom/atom#9274
@thedaniel

Copy link
Copy Markdown
Contributor

@simurai Looks good to merge when you're satisfied. I don't think moving the status-bar when the panels are there is actually crucial because it's generally full of metadata for the current editor and it seems a little strange to separate it from the bottom of the editor by an arbitrary amount.

@simurai

simurai commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

@thedaniel I tested a few packages and made some tweaks so they don't break. So I think it should be good now.

Well, I still found one that inlines the height based on the whole window, which doesn't work when header/footer gets populated. There are probably more that do the same, but maybe ok?

@thedaniel

Copy link
Copy Markdown
Contributor

I think it's maybe OK. What happens, does the youtube pane cover up the header/footer? We could always give package authors like @alexandruionascu feedback on a better way to calculate height after this gets merged.

@simurai

simurai commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

No, the footer covers the youtube pane. Which is not too problematic in this case.

screen shot 2015-10-28 at 1 01 49 am

Right, we can notify package authors about it.

@thomasjo

Copy link
Copy Markdown
Contributor

Right, we can notify package authors about it.

We can even open PRs. When we merge this, just point me at repos and I can try to fix a few 😉

@simurai

simurai commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

Sounds good. I started a "Packages that break or have issues" list in the description.

Only packages that add an atom-panel on the left/right should be affected.

@thomasjo

Copy link
Copy Markdown
Contributor

@simurai Great, thanks!

@alexandernst

Copy link
Copy Markdown

I'm sorry for the complete offtopic, but what plugin is the one with the GitHub icon (among others) that you're using, @simurai ?

@simurai

simurai commented Oct 28, 2015

Copy link
Copy Markdown
Contributor Author

@alexandernst

Copy link
Copy Markdown

@simurai Thank you so much! This plugin should be part of core imho, it completely rocks! \o/

@as-cii

as-cii commented Dec 8, 2015

Copy link
Copy Markdown
Contributor

Code-wise this looks good to me: nice work here, @simurai! ✨

I know we haven't done so for other kinds of panels, but what would you think about testing the actual dimensions/coordinates in workspace-element-spec.coffee? So that we make sure that our flex box CSS code is actually working as expected. I can add those specs myself or we can 🍐 and add them together.

Also, I gave this a quick test-drive and I have jotted down a couple of concerns (which maybe are not related to this PR, but to the respective packages instead?):

  1. Header panels cause tabs' top-border to look inconsistent/missing:
    screen shot 2015-12-08 at 12 16 24
  2. Header panels cause tree-view projects to look off:
    screen shot 2015-12-08 at 12 20 52

I noticed you opened a PR on tree-view which is maybe addressing 2), but atom/tree-view#627 (comment) seems to state it's not needed anymore. Thoughts?

simurai added a commit to atom/one-light-ui that referenced this pull request Dec 8, 2015
simurai added a commit to atom/one-dark-ui that referenced this pull request Dec 8, 2015
@simurai

simurai commented Dec 8, 2015

Copy link
Copy Markdown
Contributor Author

@as-cii Thanks for testing. Point 2 should be fixed with the PRs above.

Point 1: Yeah, it looks a bit odd if you just add text with One light. I guess it depends on the theme and the package that would occupy the header. For example the tool-bar has a bottom border so it should look ok.

screen shot 2015-12-08 at 12 24 34 pm

I think we can leave it up to the package/theme to either add a bottom border or a different background color to have some kind of separation.

I can add those specs myself or we can 🍐 and add them together.

🍐ing would be great. I'm flying home tonight, so I'll ping you about it.

@simurai simurai mentioned this pull request Jan 5, 2016
4 of 6 tasks
@rm-code

rm-code commented Jan 21, 2016

Copy link
Copy Markdown

Wow, very nice!

@alexandernst

Copy link
Copy Markdown

@rm-code This hasn't been merged yet

@rm-code

rm-code commented Jan 21, 2016

Copy link
Copy Markdown

@alexandernst I know 😁 Looking forward to it though. Especially if it enables #10208 to be merged as well.

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

The code looks good to me. @as-cii are you still interested in 🍐ing with @simurai to add some DOM-based specs?

@as-cii

as-cii commented Jan 28, 2016

Copy link
Copy Markdown
Contributor

Looks good! ✨

:shipit: after specs go 💚!

@benogle
benogle force-pushed the sm-top-bottom-bars branch from 86d8bad to 127e4db Compare February 1, 2016 19:34
@benogle

benogle commented Feb 1, 2016

Copy link
Copy Markdown
Contributor

Travis builds are legit. Merging.

benogle added a commit that referenced this pull request Feb 1, 2016
@benogle
benogle merged commit 78190f1 into master Feb 1, 2016
@maxbrunsfeld
maxbrunsfeld deleted the sm-top-bottom-bars branch February 1, 2016 21:03
@alexandernst

Copy link
Copy Markdown

@benogle Don't forget to merge atom/tree-view#627 please

@benogle

benogle commented Feb 1, 2016

Copy link
Copy Markdown
Contributor

Thanks for the heads up

@zertosh

zertosh commented Feb 8, 2016

Copy link
Copy Markdown
Contributor

This broke some Nuclide stuff too. Will this go out with 1.5.0 or 1.6.0?

EDIT: I love the change though!

@benogle

benogle commented Feb 8, 2016

Copy link
Copy Markdown
Contributor

Sorry about that. It'll be out in 1.6

@simurai

simurai commented Feb 9, 2016

Copy link
Copy Markdown
Contributor Author

@zertosh Sorry. Yeah, noticed that scrolling of Nuclide's file-tree will break.

Any idea where that <div> with inline height: 100%; comes from? If that <div> can be removed, I think it should work.

screen shot 2016-02-09 at 6 00 00 pm

Or if that <div> needs to stay, removing the height and adding flexbox should work too:

atom-panel.left > div {
  height: initial !important;
  display: flex;
}

@zertosh

zertosh commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

@simurai: No worries, @ssorallen is the one looking into. I think he has a solution to support both the new and old behavior- something we have to do since we can't upgrade everyone at fb to 1.6.0 at the same time.

@ssorallen

Copy link
Copy Markdown
Contributor

@simurai Thanks for checking out the Nuclide DOM. I will try out your fix.

@simurai

simurai commented Feb 10, 2016

Copy link
Copy Markdown
Contributor Author

I think he has a solution to support both the new and old behavior

Good point. Most packages currently use .my-package { height: 100%; }. Then in 1.6.0 core styles will override it with initial atom-panel-container > atom-panel.left > * { height: initial; } to make it work with Flexbox and the added header/footer.

If you wanna keep the current markup in Nuclide, inheriting the height and adding flexbox seems to work with both versions.

<atom-panel class="left tool-panel panel-left">
  <div style="height: inherit; display: flex;">

ghost pushed a commit to facebookarchive/nuclide that referenced this pull request Feb 11, 2016
Summary:
public

Atom v1.6.0 will ship with [updated panel styling][1] that prevents the
side bar from scrolling in its current form. Inherit height and switch
to flex layout in order to inherit the `height:100%` from v1.5 and fill
the flex container in v1.6. The `inherit` will inherit `height:auto` in
v1.6, ensuring it instead uses flex.

[1] atom/atom#9274

Reviewed By: zertosh

Differential Revision: D2925685

fb-gh-sync-id: 231dc66898d7e8170df82aa35c8ca93b2dfdb719
shipit-source-id: 231dc66898d7e8170df82aa35c8ca93b2dfdb719
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.