Skip to content

edit your gitignore file - #881

Merged
joshaber merged 11 commits into
masterfrom
edit-gitignore
Feb 1, 2017
Merged

joshaber merged 11 commits into
masterfrom
edit-gitignore

Conversation

@shiftkey

@shiftkey shiftkey commented Jan 31, 2017 •

Copy link
Copy Markdown
Member

Fixes #803

  • can save rules to a new file
  • can update rules in an existing file
  • changes list updates after saving
  • refresh diff of selected file after saving (in case gitignore is selected file)
  • save is disabled while there are no changes
  • add trailing newline to file (just to be safe?)

@shiftkey shiftkey changed the title [WIP] edit your gitignore file edit your gitignore file Jan 31, 2017
@shiftkey

Copy link
Copy Markdown
Member Author

Not too worried about the visuals, but here's what it looks like currently:

Comment thread app/src/ui/app.tsx
remote={state.remote}
dispatcher={this.props.dispatcher}
repository={repository}
gitIgnoreText={state.gitIgnoreText}

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

Ready for review 🦁

@joshaber joshaber self-assigned this Jan 31, 2017

@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.

🦅

Comment thread app/src/lib/dispatcher/app-store.ts Outdated
gitStore.loadCurrentRemote()
gitStore.calculateAheadBehindForCurrentBranch()
gitStore.updateLastFetched()
gitStore.updateGitIgnoreText()

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/git-store.ts Outdated
return new Promise<void>((resolve, reject) => {
Fs.readFile(path, 'utf8', (err, data) => {
if (err) {
// An error most likely means the repository's never been published.

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/git-store.ts Outdated
// An error most likely means the repository's never been published.
this._gitIgnoreText = null
} else if (data.length > 0) {
// If the file's empty then it _probably_ means the fetch failed and we

This comment was marked as spam.

Comment thread app/src/ui/lib/text-area.tsx Outdated
readonly onInputRef?: (instance: HTMLTextAreaElement) => void
}

/** An input element with app-standard styles. */

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/ui/lib/text-area.tsx Outdated
/** Called on key down. */
readonly onKeyDown?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void

/** A callback to receive the underlying `input` instance. */

This comment was marked as spam.

Comment thread app/src/ui/lib/text-area.tsx Outdated
/** Whether the input field is disabled. */
readonly disabled?: boolean

/** Called when the user changes the value in the input field. */

This comment was marked as spam.

readonly text: string
}

export class GitIgnore extends React.Component<IGitIgnoreProps, IGitIgnoreState> {

This comment was marked as spam.

@joshaber joshaber mentioned this pull request Jan 31, 2017
3 tasks done
@shiftkey

shiftkey commented Feb 1, 2017

Copy link
Copy Markdown
Member Author

🍎

@joshaber
joshaber merged commit 9bfe090 into master Feb 1, 2017
@joshaber
joshaber deleted the edit-gitignore branch February 1, 2017 15:41
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