Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into list-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed May 5, 2017
2 parents 92e5a22 + 124b88e commit 5dcd64b
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 29 deletions.
20 changes: 15 additions & 5 deletions app/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"moment": "^2.17.1",
"octokat": "^0.6.4",
"react": "^15.5.4",
"react-addons-css-transition-group": "^15.5.2",
"react-addons-shallow-compare": "^15.5.2",
"react-dom": "^15.5.4",
"react-virtualized": "^9.7.4",
"react-transition-group": "^1.1.3",
"textarea-caret": "^3.0.2",
"ua-parser-js": "^0.7.12",
"untildify": "^3.0.2",
Expand Down
7 changes: 4 additions & 3 deletions app/src/ui/app-error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import * as ReactCSSTransitionGroup from 'react-addons-css-transition-group'

import { Button } from './lib/button'
import { ButtonGroup } from './lib/button-group'
Expand All @@ -11,6 +10,7 @@ import { GitError as GitErrorType } from 'dugite'
import { Popup, PopupType } from '../lib/app-state'
import { ErrorWithMetadata } from '../lib/error-with-metadata'
import { remote } from 'electron'
import { CSSTransitionGroup } from 'react-transition-group'

/**
* Inspect the error metadata to see if this is an uncaught error
Expand Down Expand Up @@ -175,6 +175,7 @@ export class AppError extends React.Component<IAppErrorProps, IAppErrorState> {
<Dialog
id='app-error'
type='error'
key='error'
title={title}
dismissable={!unhandled}
onDismissed={this.onDismissed}
Expand Down Expand Up @@ -210,14 +211,14 @@ export class AppError extends React.Component<IAppErrorProps, IAppErrorState> {

public render() {
return (
<ReactCSSTransitionGroup
<CSSTransitionGroup
transitionName='modal'
component='div'
transitionEnterTimeout={dialogTransitionEnterTimeout}
transitionLeaveTimeout={dialogTransitionLeaveTimeout}
>
{this.renderDialog()}
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
)
}
}
44 changes: 32 additions & 12 deletions app/src/ui/app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import * as ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import { ipcRenderer, shell } from 'electron'

import { RepositoriesList } from './repositories-list'
Expand Down Expand Up @@ -41,6 +40,7 @@ import { getVersion, getName } from './lib/app-proxy'
import { Publish } from './publish-repository'
import { Acknowledgements } from './acknowledgements'
import { UntrustedCertificate } from './untrusted-certificate'
import { CSSTransitionGroup } from 'react-transition-group'
import { BlankSlateView } from './blank-slate'

/** The interval at which we should check for updates. */
Expand Down Expand Up @@ -737,21 +737,28 @@ export class App extends React.Component<IAppProps, IAppState> {

switch (popup.type) {
case PopupType.RenameBranch:
return <RenameBranch dispatcher={this.props.dispatcher}
return <RenameBranch
key='rename-branch'
dispatcher={this.props.dispatcher}
repository={popup.repository}
branch={popup.branch}/>
case PopupType.DeleteBranch:
return <DeleteBranch dispatcher={this.props.dispatcher}
return <DeleteBranch
key='delete-branch'
dispatcher={this.props.dispatcher}
repository={popup.repository}
branch={popup.branch}
onDismissed={this.onPopupDismissed}/>
case PopupType.ConfirmDiscardChanges:
return <DiscardChanges repository={popup.repository}
return <DiscardChanges
key='discard-changes'
repository={popup.repository}
dispatcher={this.props.dispatcher}
files={popup.files}
onDismissed={this.onPopupDismissed}/>
case PopupType.Preferences:
return <Preferences
key='preferences'
dispatcher={this.props.dispatcher}
appStore={this.props.appStore}
dotComAccount={this.getDotComAccount()}
Expand All @@ -767,6 +774,7 @@ export class App extends React.Component<IAppProps, IAppState> {
: null

return <Merge
key='merge-branch'
dispatcher={this.props.dispatcher}
repository={repository}
allBranches={state.branchesState.allBranches}
Expand All @@ -781,33 +789,37 @@ export class App extends React.Component<IAppProps, IAppState> {
const state = this.props.appStore.getRepositoryState(repository)

return <RepositorySettings
key='repository-settings'
remote={state.remote}
dispatcher={this.props.dispatcher}
repository={repository}
onDismissed={this.onPopupDismissed}/>
}
case PopupType.SignIn:
return <SignIn
key='sign-in'
signInState={this.state.signInState}
dispatcher={this.props.dispatcher}
onDismissed={this.onSignInDialogDismissed}/>
case PopupType.AddRepository:
return <AddExistingRepository
key='add-existing-repository'
onDismissed={this.onPopupDismissed}
dispatcher={this.props.dispatcher} />
case PopupType.CreateRepository:
return (
<CreateRepository
key='create-repository'
onDismissed={this.onPopupDismissed}
dispatcher={this.props.dispatcher} />
)
case PopupType.CloneRepository:
return <CloneRepository
accounts={this.state.accounts}
initialURL={popup.initialURL}
onDismissed={this.onPopupDismissed}
dispatcher={this.props.dispatcher}
/>
key='clone-repository'
accounts={this.state.accounts}
initialURL={popup.initialURL}
onDismissed={this.onPopupDismissed}
dispatcher={this.props.dispatcher} />
case PopupType.CreateBranch: {
const state = this.props.appStore.getRepositoryState(popup.repository)
const branchesState = state.branchesState
Expand All @@ -819,6 +831,7 @@ export class App extends React.Component<IAppProps, IAppState> {
}

return <CreateBranch
key='create-branch'
tip={branchesState.tip}
defaultBranch={branchesState.defaultBranch}
allBranches={branchesState.allBranches}
Expand All @@ -829,12 +842,14 @@ export class App extends React.Component<IAppProps, IAppState> {
case PopupType.InstallGit:
return (
<InstallGit
key='install-git'
onDismissed={this.onPopupDismissed}
path={popup.path} />
)
case PopupType.About:
return (
<About
key='about'
onDismissed={this.onPopupDismissed}
applicationName={getName()}
applicationVersion={getVersion()}
Expand All @@ -845,6 +860,7 @@ export class App extends React.Component<IAppProps, IAppState> {
case PopupType.PublishRepository:
return (
<Publish
key='publish'
dispatcher={this.props.dispatcher}
repository={popup.repository}
accounts={this.state.accounts}
Expand All @@ -854,6 +870,7 @@ export class App extends React.Component<IAppProps, IAppState> {
case PopupType.UntrustedCertificate:
return (
<UntrustedCertificate
key='untrusted-certificate'
certificate={popup.certificate}
url={popup.url}
onDismissed={this.onPopupDismissed}
Expand All @@ -862,7 +879,10 @@ export class App extends React.Component<IAppProps, IAppState> {
)
case PopupType.Acknowledgements:
return (
<Acknowledgements onDismissed={this.onPopupDismissed}/>
<Acknowledgements
key='acknowledgements'
onDismissed={this.onPopupDismissed}
/>
)
default:
return assertNever(popup, `Unknown popup type: ${popup}`)
Expand All @@ -875,14 +895,14 @@ export class App extends React.Component<IAppProps, IAppState> {

private renderPopup() {
return (
<ReactCSSTransitionGroup
<CSSTransitionGroup
transitionName='modal'
component='div'
transitionEnterTimeout={dialogTransitionEnterTimeout}
transitionLeaveTimeout={dialogTransitionLeaveTimeout}
>
{this.currentPopupContent()}
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
)
}

Expand Down
7 changes: 4 additions & 3 deletions app/src/ui/changes/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import * as ReactCSSTransitionGroup from 'react-addons-css-transition-group'

import { ChangesList } from './changes-list'
import { DiffSelectionType } from '../../models/diff'
import { IChangesState, PopupType } from '../../lib/app-state'
Expand All @@ -12,6 +12,7 @@ import { IAutocompletionProvider, EmojiAutocompletionProvider, IssuesAutocomplet
import { ICommitMessage } from '../../lib/app-state'
import { ClickSource } from '../list'
import { WorkingDirectoryFileChange } from '../../models/status'
import { CSSTransitionGroup } from 'react-transition-group'

/**
* The timeout for the animation of the enter/leave animation for Undo.
Expand Down Expand Up @@ -164,14 +165,14 @@ export class ChangesSidebar extends React.Component<IChangesSidebarProps, void>
}

return (
<ReactCSSTransitionGroup
<CSSTransitionGroup
transitionName='undo'
transitionAppear={true}
transitionAppearTimeout={UndoCommitAnimationTimeout}
transitionEnterTimeout={UndoCommitAnimationTimeout}
transitionLeaveTimeout={UndoCommitAnimationTimeout}>
{child}
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
)
}

Expand Down
13 changes: 11 additions & 2 deletions app/styles/ui/_dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,28 @@ dialog {
&-enter {
opacity: 1;
transform: scale(0.75);
}

pointer-events: none;

&::backdrop {
opacity: 0;
}
}

&-enter-active {
opacity: 1;
transform: scale(1);
transition: transform 250ms var(--easing-ease-out-back);

&::backdrop {
opacity: 0.4;
transition: opacity 100ms ease-in;
}
}

&-leave {
opacity: 1;
transform: scale(1);
pointer-events: none;

&::backdrop {
opacity: 0.4;
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ environment:
nodejs_version: "7"

cache:
- node_modules -> appveyor.yml
- '%USERPROFILE%\.electron -> appveyor.yml'
- node_modules
- '%USERPROFILE%\.electron'

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
"@types/mocha": "^2.2.29",
"@types/node": "^6.0.31",
"@types/react": "15.0.23",
"@types/react-addons-css-transition-group": "^15.0.1",
"@types/react-addons-test-utils": "^0.14.17",
"@types/react-dom": "^15.5.0",
"@types/react-virtualized": "^9.5.1",
"@types/react-transition-group": "^1.1.0",
"@types/ua-parser-js": "^0.7.30",
"@types/uuid": "^2.0.29",
"@types/winston": "^2.2.0",
Expand Down

0 comments on commit 5dcd64b

Please sign in to comment.