Skip to content

Toolbar redesign part #1 - #554

Merged
joshaber merged 78 commits into
masterfrom
toolbar
Nov 2, 2016
Merged

joshaber merged 78 commits into
masterfrom
toolbar

Conversation

@niik

@niik niik commented Oct 25, 2016 •

Copy link
Copy Markdown
Member

screen shot 2016-11-02 at 16 16 59

TODO

  • Toolbar should cover title bar on Win32
  • macOS dark title bar
  • Toolbar buttons
  • Fold out component
  • Repo selection button should match width of first column in history/changes

What does it do

It removes the old sidebar component and introduces a new Toolbar component with ToolbarButton and ToolbarDropdown.

We also have a new sidebar concept which is local to the RepositoryView. Both changes and history have been refactored and their first columns have been moved out into sidebar components which are rendered into a resizable column by the repository view. The width of this sidebar is persisted via the dispatcher so that the first button (or two in the case of windows) of the toolbar can share the same width.

What doesn't it do

There's a bunch of styling left do to do which I'm punting on in other to get this in before the merge hell gets even worse. The foldout stuff needs to be broken down a bit more and it needs to support non-relative placement, right now foldouts a positioned bottom left of the toolbar button and that works on macOS but on Windows we're going to have a hamburgler menu offset the first button but that shouldn't affect the placement of the repository foldout.

I've also left the redesign of the history view for a separate PR in order to cut down on scope.

Foldouts are only closable by clicking on the toolbar button again or clicking on the overlay. This needs to be extended to support Escape (regardless of wether that's still a thing on macs) as well as clicking on a non-dropdown area of the toolbar.

Review notes

There's a lot in here and I apologize for that. Worth noting as you review this is that I've created folders for changes, history, and toolbar styles. The diff will likely show it all as additions which is unfortunate but unavoidable.

There's one or two TODOs in the code which I'm going to leave in and address separately. The documentation (especially in scss) isn't quite what I would like it to be but that too is something I can address separately.

@niik niik mentioned this pull request Oct 25, 2016
@pmn pmn mentioned this pull request Nov 1, 2016
@niik niik changed the title [WIP] Toolbar Toolbar Nov 2, 2016
@niik niik changed the title Toolbar Toolbar redesign part #1 Nov 2, 2016
@niik

niik commented Nov 2, 2016

Copy link
Copy Markdown
Member Author

This is ready for review 🎉

@joshaber joshaber self-assigned this Nov 2, 2016

@joshaber joshaber left a comment

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.

Reviewing this is pretty lulz, so just a couple comments.

Comment thread app/package.json Outdated
"license": "MIT",
"dependencies": {
"byline": "^4.2.2",
"classnames": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz",

This comment was marked as spam.

This comment was marked as spam.

/** GitStores keyed by their associated Repository ID. */
private readonly gitStores = new Map<number, GitStore>()

private sidebarWidth: number = defaultSidebarWidth

This comment was marked as spam.

This comment was marked as spam.

@niik

niik commented Nov 2, 2016

Copy link
Copy Markdown
Member Author

Just spotted this little thing on Windows

image

Let's not sweat it for this PR though, I'll get right on it tomorrow

@joshaber

joshaber commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

@joshaber

joshaber commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

This is a strong #jolo

@joshaber
joshaber merged commit 3899dc9 into master Nov 2, 2016
@joshaber
joshaber deleted the toolbar branch November 2, 2016 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants