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: add multi BrowserView support to BrowserWindow #16148

Merged

Conversation

Projects
None yet
3 participants
@summeroff
Copy link
Contributor

commented Dec 19, 2018

Description of Change

new feature: multi browser views support for BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to BrowserWindow class.

Existing API setBrowserView and getBrowserView changed to use new API inside.

This functionality was mentioned in the initial BrowserView feature PR #9166 . And asked few times since then. Recently in a discussion #10622 .

It is a resubmit of PR #16064 as changes moved to master branch instead of 2-0-x branch.
/cc @zcbenz

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: Added support for multiple browser views per BrowserWindow.

@summeroff summeroff requested review from as code owners Dec 19, 2018

@summeroff summeroff referenced this pull request Dec 19, 2018

Closed

feat: multi browser views support for BrowserWindow #16064

5 of 5 tasks complete
@codebytere

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

not ok 1026 chromium feature focus handling "before each" hook for "moves focus to the next focusable item"
  ReferenceError: emittedOnce is not defined
      at Context.beforeEach (/home/builduser/project/src/electron/spec/chromium-spec.js:1422:28)
      at processImmediate (timers.js:632:19)

is failing across several platforms, and is thus i believe consequential of this PR.

@summeroff

This comment has been minimized.

Copy link
Contributor Author

commented Dec 20, 2018

Failed test is trying to use emittedOnce without including it.
Something like const { emittedOnce } = require('./events-helpers') probably can help. But I am not sure it should be fixed in this feature PR and not small fix PR that will be merged in master a lot faster.

Change what added test with emittedOnce was merged into master just 18 hours ago. So my PR can be one of the first that catches it.

@zcbenz

This comment has been minimized.

Copy link
Member

commented Dec 20, 2018

The CI is broken on master branch, I also see the failed test in other unrelated PRs.

summeroff added some commits Dec 19, 2018

feat: add multi BrowserView support to BrowserWindow
Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.
feat: add multi BrowserView support to BrowserWindow
Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

@summeroff summeroff force-pushed the stream-labs:sl_multi_browser_views_support_master branch from 0c099a4 to 38816e8 Dec 20, 2018

@summeroff

This comment has been minimized.

Copy link
Contributor Author

commented Dec 21, 2018

For failed tests on 'ci/circleci: mas-testing-tests' run.
UPD:
3 of them will be dealt in PR #15987.

And one with timeout on getAllWebContents probably just some slowdown on host.

@zcbenz

zcbenz approved these changes Dec 22, 2018

@zcbenz zcbenz merged commit 5ae3d1a into electron:master Dec 22, 2018

21 of 23 checks passed

ci/circleci: mas-testing-tests Your tests failed on CircleCI
Details
Artifact Comparison Changes Detected
Details
Absolute Zero
Semantic Pull Request ready to be squashed
Details
WIP ready for review
Details
appveyor: win-ia32-testing-pr 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
ci/circleci: mas-testing Your tests passed on CircleCI!
Details
ci/circleci: osx-testing Your tests passed on CircleCI!
Details
ci/circleci: osx-testing-tests Your tests passed on CircleCI!
Details
electron-lint Build #20181221.1 succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Dec 22, 2018

Release Notes Persisted

Added support for multiple browser views per BrowserWindow.

@welcome

This comment has been minimized.

Copy link

commented Dec 22, 2018

Congrats on merging your first pull request! 🎉🎉🎉

@summeroff summeroff referenced this pull request Dec 24, 2018

Merged

feat: flexible autoresize for BrowserViews #16184

3 of 6 tasks complete

summeroff added a commit to stream-labs/electron that referenced this pull request Apr 22, 2019

feat: add multi BrowserView support to BrowserWindow (electron#16148)
* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* feat: add multi BrowserView support to BrowserWindow

Add functions addBrowserView, removeBroserView, getBrowserViews to
BrowserWindow class. Existing API as setBrowserView and
getBrowserView code replaced to use new api inside.

* fix: for lint and osx compile errors

* fix: lint error in test code

* fix: method to be accessible on mac api impl

* fix: missed function declarations for mac impl

* fix: use base class reset function
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.