Repository navigation
Add an add menu - #1018
Add an add menu#1018
Conversation
| onChange={this.onBranchNameChange} /> | ||
| </Row> | ||
|
|
||
| <Row> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| private onDismissed = () => { | ||
| this.props.dispatcher.closePopup() | ||
| return ( | ||
| <div>Will be created as {this.state.sanitizedName}</div> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| <Row> | ||
| <TextBox | ||
| value={this.state.path} | ||
| label='Local Path' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| </Button> | ||
| </Form> | ||
| <Dialog | ||
| title='Add local repository' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| <DialogFooter> | ||
| <ButtonGroup> | ||
| <Button disabled={disabled} type='submit'> | ||
| {this.state.isGitRepository ? 'Add Repository' : 'Create & Add Repository'} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| <Button onClick={this.showFilePicker}>Choose…</Button> | ||
| </Row> | ||
|
|
||
| <Checkbox |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| value={this.state.createWithReadme ? CheckboxValue.On : CheckboxValue.Off} | ||
| onChange={this.onCreateWithReadmeChange} /> | ||
|
|
||
| {this.renderGitIgnores()} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| {this.renderGitIgnores()} | ||
|
|
||
| {this.renderLicenses()} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| const currentState: DropdownState = isOpen ? 'open' : 'closed' | ||
|
|
||
| const dropdownStyle = { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| this.props.hideBranchPanel() | ||
| } | ||
| return ( | ||
| <div>Will be created as {this.state.sanitizedName}</div> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🍬 Good looking out on the |
| <DialogFooter> | ||
| <ButtonGroup> | ||
| <Button onClick={this.props.onDismissed}>Cancel</Button> | ||
| <Button disabled={disabled} type='submit'>Clone</Button> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| icon={OcticonSymbol.plus} | ||
| className='app-menu' | ||
| dropdownContentRenderer={this.renderAddMenu} | ||
| onDropdownStateChanged={this.onAppMenuDropdownStateChanged} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| private renderAddToolbarButton() { | ||
| const isOpen = this.state.currentFoldout | ||
| && this.state.currentFoldout.type === FoldoutType.AppMenu |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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. |
|
Travis is timing out on tests but it's not related to this PR so imma go ahead and get this merged |
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:
With the menu open:
The repo dropdown stays as the same size of the "Changes/History" list to the left:
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.
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:
Additionally, the expand foldout option felt awkward above the filter input:
Moving the create options into an "add" dropdown fixes these issues.
AppMenucomponent instead?app-menu-take-twobranch.