Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make zoomLevel/zoomFactor sync #16410

Merged
merged 2 commits into from Jan 21, 2019

Conversation

Projects
None yet
5 participants
@codebytere
Copy link
Member

commented Jan 15, 2019

Description of Change

Convert webContents getZoomLevel and getZoomFactor to be sync methods.

cc @ckerr

Checklist

Release Notes

Notes: Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere requested a review from as a code owner Jan 15, 2019

@codebytere codebytere added the wip label Jan 15, 2019

@codebytere codebytere requested a review from as a code owner Jan 15, 2019

@codebytere codebytere changed the title [wip] feat: promisify zoomLevel and zoomFactor feat: promisify zoomLevel and zoomFactor Jan 16, 2019

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 92326cd to 6e0b22b Jan 17, 2019

@deepak1556
Copy link
Member

left a comment

GetZoomFactor and GetZoomLevel were originally implemented using webFrame apis, hence they had to rely on ipc and had an async api signature. It then got refactored to rely on the browser side ZoomController. These apis no longer need to be async, its better to deprecate the current signature in favor of that instead of promisification.

@codebytere codebytere referenced this pull request Jan 17, 2019

Merged

fix: correctly handle IPC for promise-based methods #16433

4 of 4 tasks complete

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 707356c to cf5d11d Jan 17, 2019

@codebytere codebytere changed the title feat: promisify zoomLevel and zoomFactor feat: make zoomLevel/zoomFactor sync Jan 17, 2019

@codebytere codebytere removed the wip label Jan 17, 2019

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from cf5d11d to 5562f02 Jan 17, 2019

@deepak1556
Copy link
Member

left a comment

Is there a plan to handle the deprecations of the async signatures ?

Show resolved Hide resolved atom/browser/api/atom_api_web_contents.cc Outdated

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from a469044 to d85402a Jan 18, 2019

@codebytere

This comment has been minimized.

Copy link
Member Author

commented Jan 18, 2019

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from d85402a to 2133f87 Jan 18, 2019

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 2133f87 to 5454cd0 Jan 18, 2019

@zcbenz

zcbenz approved these changes Jan 21, 2019

@codebytere codebytere merged commit 3ca87d2 into master Jan 21, 2019

26 of 27 checks passed

Artifact Comparison Changes Detected
Details
Absolute Zero
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing-tests Your tests passed on CircleCI!
Details
electron-arm-testing Build #20190118.18 succeeded
Details
electron-arm64-testing Build #20190118.18 succeeded
Details
electron-lint Build #20190118.21 succeeded
Details
electron-mas-testing Build #20190118.21 succeeded
Details
electron-osx-testing Build #20190118.21 succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Jan 21, 2019

Release Notes Persisted

Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere deleted the promisify-getzoomlevel branch Jan 21, 2019

andrewkisliakov-citrix added a commit to andrewkisliakov-citrix/electron that referenced this pull request Jan 22, 2019

feat: make zoomLevel/zoomFactor sync (electron#16410)
* feat: make zoomLevel/zoomFactor sync

* update ts defs dep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.