Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 0df9f44

Browse files
authored
Merge pull request #2222 from atom/aw/create-and-publish
Create and publish dialog
2 parents 2e8726d + 9c0d6fb commit 0df9f44

File tree

59 files changed

+4573
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4573
-195
lines changed

keymaps/git.cson

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
'esc': 'tool-panel:unfocus'
113113

114114
'.github-Dialog':
115+
'tab': 'core:focus-next'
115116
'shift-tab': 'core:focus-previous'
116117

117118
'.github-Dialog input':
@@ -120,18 +121,20 @@
120121
'.github-CoAuthorForm input':
121122
'enter': 'core:confirm'
122123

124+
'body .github-TabbableWrapper':
125+
'down': 'github:selectbox-down'
126+
'up': 'github:selectbox-up'
127+
'enter': 'github:selectbox-enter'
128+
'tab': 'github:selectbox-tab'
129+
'backspace': 'github:selectbox-backspace'
130+
'pageup': 'github:selectbox-pageup'
131+
'pagedown': 'github:selectbox-pagedown'
132+
'end': 'github:selectbox-end'
133+
'home': 'github:selectbox-home'
134+
'delete': 'github:selectbox-delete'
135+
'escape': 'github:selectbox-escape'
136+
123137
'body .github-CommitView-coAuthorEditor':
124-
'enter': 'github:co-author:enter'
125-
'down': 'github:co-author:down'
126-
'up': 'github:co-author:up'
127-
'tab': 'github:co-author:tab'
128-
'backspace': 'github:co-author:backspace'
129-
'escape': 'github:co-author:escape'
130-
'pageup': 'github:co-author:pageup'
131-
'pagedown': 'github:co-author:pagedown'
132-
'home': 'github:co-author:home'
133-
'end': 'github:co-author:end'
134-
'delete': 'github:co-author:delete'
135138
'shift-backspace': 'github:co-author-exclude'
136139

137140
'.platform-darwin .github-Reviews':

lib/atom/atom-text-editor.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export default class AtomTextEditor extends React.Component {
4141
tabIndex: PropTypes.number,
4242

4343
refModel: RefHolderPropType,
44+
refElement: RefHolderPropType,
4445

4546
children: PropTypes.node,
4647
}
@@ -62,7 +63,7 @@ export default class AtomTextEditor extends React.Component {
6263
this.subs = new CompositeDisposable();
6364

6465
this.refParent = new RefHolder();
65-
this.refElement = new RefHolder();
66+
this.refElement = null;
6667
this.refModel = null;
6768
}
6869

@@ -91,7 +92,7 @@ export default class AtomTextEditor extends React.Component {
9192
}
9293
element.appendChild(editor.getElement());
9394
this.getRefModel().setter(editor);
94-
this.refElement.setter(editor.getElement());
95+
this.getRefElement().setter(editor.getElement());
9596

9697
this.subs.add(
9798
editor.onDidChangeCursorPosition(this.props.didChangeCursorPosition),
@@ -136,20 +137,20 @@ export default class AtomTextEditor extends React.Component {
136137
observeEmptiness = () => {
137138
this.getRefModel().map(editor => {
138139
if (editor.isEmpty() && this.props.hideEmptiness) {
139-
this.refElement.map(element => element.classList.add(EMPTY_CLASS));
140+
this.getRefElement().map(element => element.classList.add(EMPTY_CLASS));
140141
} else {
141-
this.refElement.map(element => element.classList.remove(EMPTY_CLASS));
142+
this.getRefElement().map(element => element.classList.remove(EMPTY_CLASS));
142143
}
143144
return null;
144145
});
145146
}
146147

147148
contains(element) {
148-
return this.refElement.map(e => e.contains(element)).getOr(false);
149+
return this.getRefElement().map(e => e.contains(element)).getOr(false);
149150
}
150151

151152
focus() {
152-
this.refElement.map(e => e.focus());
153+
this.getRefElement().map(e => e.focus());
153154
}
154155

155156
getRefModel() {
@@ -164,6 +165,18 @@ export default class AtomTextEditor extends React.Component {
164165
return this.refModel;
165166
}
166167

168+
getRefElement() {
169+
if (this.props.refElement) {
170+
return this.props.refElement;
171+
}
172+
173+
if (!this.refElement) {
174+
this.refElement = new RefHolder();
175+
}
176+
177+
return this.refElement;
178+
}
179+
167180
getModel() {
168181
return this.getRefModel().getOr(undefined);
169182
}

lib/containers/__generated__/createDialogContainerQuery.graphql.js

Lines changed: 283 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)