Repository navigation
feat: promisify dialog.showOpenDialog() - #16973
Merged
Merged
Conversation
codebytere
force-pushed
the
promisify-showopendialog
branch
from
February 14, 2019 23:36
4bcec77 to
bb9cbc7
Compare
codebytere
force-pushed
the
promisify-showopendialog
branch
2 times, most recently
from
February 15, 2019 16:47
f0169e8 to
0cca779
Compare
codebytere
force-pushed
the
promisify-showopendialog
branch
from
February 16, 2019 16:45
4fd58e0 to
c056a03
Compare
codebytere
force-pushed
the
promisify-showopendialog
branch
from
February 19, 2019 13:44
c056a03 to
10cc766
Compare
Member
Author
|
Needs rebase on #17050 once it's merged. |
codebytere
force-pushed
the
promisify-showopendialog
branch
2 times, most recently
from
February 25, 2019 08:27
d3f91d1 to
2bca51f
Compare
zcbenz
suggested changes
Feb 25, 2019
5 of 6 tasks
codebytere
force-pushed
the
promisify-showopendialog
branch
from
February 26, 2019 12:27
f517b0e to
271d772
Compare
zcbenz
reviewed
Feb 26, 2019
codebytere
force-pushed
the
promisify-showopendialog
branch
3 times, most recently
from
February 27, 2019 09:01
ac6dc6e to
6f4ba16
Compare
codebytere
force-pushed
the
promisify-showopendialog
branch
from
March 1, 2019 08:37
6f4ba16 to
9d9098a
Compare
zcbenz
suggested changes
Mar 3, 2019
Member
Author
|
@miniak i'd rather that be a separate PR once this gets merged so they can be reviewed separately and not create scope creep |
codebytere
force-pushed
the
promisify-showopendialog
branch
from
March 4, 2019 06:31
0efad7d to
674cb11
Compare
Contributor
|
@codebytere ok |
miniak
approved these changes
Mar 4, 2019
miniak
suggested changes
Mar 4, 2019
miniak
suggested changes
Mar 4, 2019
miniak
suggested changes
Mar 4, 2019
miniak
suggested changes
Mar 4, 2019
Contributor
There was a problem hiding this comment.
this fix needs to be included to avoid breaking devtools
diff --git a/lib/browser/chrome-devtools.js b/lib/browser/chrome-devtools.js
index f2db33344..b3aa84f0f 100644
--- a/lib/browser/chrome-devtools.js
+++ b/lib/browser/chrome-devtools.js
@@ -86,9 +86,9 @@ ipcMainUtils.handle('ELECTRON_INSPECTOR_SELECT_FILE', function (event) {
return new Promise((resolve, reject) => {
assertChromeDevTools(event.sender, 'window.UI.createFileSelectorElement()')
- dialog.showOpenDialog({}, function (files) {
- if (files) {
- const path = files[0]
+ dialog.showOpenDialog({}, function (result) {
+ if (!result.canceled) {
+ const path = result.filePaths[0]
fs.readFile(path, (error, data) => {
if (error) {
reject(error)
zcbenz
approved these changes
Mar 5, 2019
miniak
approved these changes
Mar 5, 2019
|
Release Notes Persisted
|
3 tasks done
briandk
added a commit
to briandk/transcriptase
that referenced
this pull request
Oct 11, 2019
jtojnar
added a commit
to jtojnar/markdown-image-insertion
that referenced
this pull request
Apr 14, 2021
Electron 6 used by Atom 1.54 splits the methods: - electron/electron#17298 - electron/electron#16973 Fixes: #5
36 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Promisifies
dialog.showOpenDialog().cc @ckerr @MarshallOfSound @deepak1556
Checklist
npm testpassesRelease Notes
Notes: Split
dialog.showOpenDialog()into a synchronous version and a version that returns a Promise