Skip to content

Add an add menu - #1018

Merged
niik merged 62 commits into
masterfrom
add-this-again
Mar 14, 2017
Merged

niik merged 62 commits into
masterfrom
add-this-again

Conversation

@donokuda

@donokuda donokuda commented Mar 8, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #831

This pull request removes the add repo & create branch foldouts and moves them into an "Add" menu.

Here's what it the button looks like next to the repo button:

image

With the menu open:

image

The repo dropdown stays as the same size of the "Changes/History" list to the left:

image

Each of the foldouts have been moved to a dialog component. They still need some styling work, but I think it makes sense to address that in a subsequent PR.

dropdown


Why this change?

As we played around with the foldouts we've realized that the minimum size of the app had a hard time supporting the create branch foldout:

image

Additionally, the expand foldout option felt awkward above the filter input:

Moving the create options into an "add" dropdown fixes these issues.


  • ❓ I'm using basic HTML for the foldout, which isn't the right approach to for the menu. Should I be using the AppMenu component instead?
  • 🗒 The app menu on Windows hasn't been removed in this branch since @niik will be removing it in his app-menu-take-two branch.

@niik niik self-assigned this Mar 9, 2017

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some minor tweaks left!

Comment thread app/src/ui/create-branch/index.tsx Outdated
onChange={this.onBranchNameChange} />
</Row>

<Row>

This comment was marked as spam.

Comment thread app/src/ui/create-branch/index.tsx Outdated
private onDismissed = () => {
this.props.dispatcher.closePopup()
return (
<div>Will be created as {this.state.sanitizedName}</div>

This comment was marked as spam.

<Row>
<TextBox
value={this.state.path}
label='Local Path'

This comment was marked as spam.

</Button>
</Form>
<Dialog
title='Add local repository'

This comment was marked as spam.

<DialogFooter>
<ButtonGroup>
<Button disabled={disabled} type='submit'>
{this.state.isGitRepository ? 'Add Repository' : 'Create & Add Repository'}

This comment was marked as spam.

<Button onClick={this.showFilePicker}>Choose…</Button>
</Row>

<Checkbox

This comment was marked as spam.

value={this.state.createWithReadme ? CheckboxValue.On : CheckboxValue.Off}
onChange={this.onCreateWithReadmeChange} />

{this.renderGitIgnores()}

This comment was marked as spam.


{this.renderGitIgnores()}

{this.renderLicenses()}

This comment was marked as spam.

Comment thread app/src/ui/app.tsx Outdated

const currentState: DropdownState = isOpen ? 'open' : 'closed'

const dropdownStyle = {

This comment was marked as spam.

Comment thread app/src/ui/create-branch/index.tsx Outdated
this.props.hideBranchPanel()
}
return (
<div>Will be created as {this.state.sanitizedName}</div>

This comment was marked as spam.

@donokuda

Copy link
Copy Markdown
Contributor Author

🍬 Good looking out on the <Row> and OS title casing. This is ready for another review!

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Super close now @donokuda, merge master into this and fix the last remaining issues that I noted and I'll get this merged

<DialogFooter>
<ButtonGroup>
<Button onClick={this.props.onDismissed}>Cancel</Button>
<Button disabled={disabled} type='submit'>Clone</Button>

This comment was marked as spam.

Comment thread app/src/ui/app.tsx Outdated
icon={OcticonSymbol.plus}
className='app-menu'
dropdownContentRenderer={this.renderAddMenu}
onDropdownStateChanged={this.onAppMenuDropdownStateChanged}

This comment was marked as spam.

Comment thread app/src/ui/app.tsx Outdated

private renderAddToolbarButton() {
const isOpen = this.state.currentFoldout
&& this.state.currentFoldout.type === FoldoutType.AppMenu

This comment was marked as spam.

@niik

niik commented Mar 14, 2017

Copy link
Copy Markdown
Member

Super close now @donokuda, merge master into this and fix the last remaining issues that I noted and I'll get this merged

So I just saw that @donokuda wasn't feeling well today so I'm just gonna fix up these tiny last changes and get this merged rather than have this sit any longer as I need it for #991.

@niik

niik commented Mar 14, 2017

Copy link
Copy Markdown
Member

Travis is timing out on tests but it's not related to this PR so imma go ahead and get this merged

@niik
niik merged commit c62adc9 into master Mar 14, 2017
@niik
niik deleted the add-this-again branch March 14, 2017 18:19
This was referenced Mar 23, 2017
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