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: migrate custom macOS tray view to native one #18981

Merged
merged 10 commits into from Jul 31, 2019

Conversation

@DeerMichel
Copy link
Member

commented Jun 25, 2019

Description of Change

Under macOS Catalina the current custom Tray implementation stops working since we're using deprecated methods (see #18664). This PR uses native methods of [NSStatusItem button] where applicable. Closes #18664.

Discussion

I got all previously available methods & events working except for tray.setHighlightMode(mode). Imho we should drop support for this mac-only method because we'll have a hard time finding ways to sneak in Apple's native menu handling. However, we are still able to control highlighting when no menu is set (i guess that's where most use cases for this method are found anyway). Probably should be further discussed in a Releases WG meeting. If someone knows a way around that all, feel free to dm me. --> Verdict: Deprecate in 6, remove in 7.

cc @codebytere @MarshallOfSound @miniak @erickzhao

Checklist

Release Notes

Notes:

  • Migrated Tray from custom to native view to be compatible with Catalina (macOS).
  • Removed deprecated Tray.setHighlightMode method (macOS).
@DeerMichel DeerMichel referenced this pull request Jun 25, 2019
5 of 5 tasks complete

@codebytere codebytere requested review from miniak and MarshallOfSound and removed request for miniak and MarshallOfSound Jun 26, 2019

@DeerMichel DeerMichel force-pushed the intern/trayicon branch from 6dd43e3 to c8aa64e Jun 26, 2019

@DeerMichel DeerMichel marked this pull request as ready for review Jun 26, 2019

@DeerMichel DeerMichel requested a review from miniak Jun 26, 2019

@electron-cation electron-cation bot removed the new-pr 🌱 label Jun 26, 2019

@DeerMichel DeerMichel force-pushed the intern/trayicon branch 4 times, most recently from d7a21df to c391f6a Jul 2, 2019

@DeerMichel

This comment has been minimized.

Copy link
Member Author

commented Jul 3, 2019

Confirmed to work under macOS Catalina Beta 🎉

@DeerMichel DeerMichel force-pushed the intern/trayicon branch 3 times, most recently from f9201fa to b146491 Jul 10, 2019

@DeerMichel DeerMichel changed the title [wip] feat: migrate custom macOS tray view to native one feat: migrate custom macOS tray view to native one Jul 10, 2019

@DeerMichel DeerMichel referenced this pull request Jul 10, 2019
5 of 5 tasks complete
@DeerMichel

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2019

Should be merged after #19202

@codebytere codebytere self-requested a review Jul 15, 2019

@DeerMichel DeerMichel force-pushed the intern/trayicon branch from 2635dfe to 94ce34b Jul 18, 2019

@DeerMichel DeerMichel requested a review from miniak Jul 22, 2019

@DeerMichel

This comment has been minimized.

Copy link
Member Author

commented Jul 30, 2019

Do we finally want to merge this? 🚀

@miniak
miniak approved these changes Jul 31, 2019

@DeerMichel DeerMichel force-pushed the intern/trayicon branch from 3326d92 to 03dfc77 Jul 31, 2019

Micha Hanselmann and others added 10 commits Jun 24, 2019
Micha Hanselmann
restore stash
revert

some things work others dont

tracking area for rescue

manual popup

restore drag n drop

cleanup
fix: make tray not block main process (#18880)
* fix: make tray not block main process

* make AtomMenuModel refcounted
chore: use ScopedPumpMessagesInPrivateModes in tray (#18977)
* chore: use ScopedPumpMessagesInPrivateModes in tray

* revert refcounting of AtomMenuModel

* Prefer WeakPtr for posting tasks to handle unexpected destruction
Micha Hanselmann
add imports
add missing include
Micha Hanselmann

@DeerMichel DeerMichel force-pushed the intern/trayicon branch from 03dfc77 to b27a1b5 Jul 31, 2019

@DeerMichel

This comment has been minimized.

Copy link
Member Author

commented Jul 31, 2019

Ready

@codebytere

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

@DeerMichel release notes need to be fixed up it seems.

@MarshallOfSound MarshallOfSound merged commit 47a38da into master Jul 31, 2019

12 of 13 checks passed

Artifact Comparison Changes Detected
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190731.15 succeeded
Details
electron-arm64-testing Build #20190731.15 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Jul 31, 2019

Release Notes Persisted

  • Migrated Tray from custom to native view to be compatible with Catalina (macOS).
  • Removed deprecated Tray.setHighlightMode method (macOS).

@MarshallOfSound MarshallOfSound deleted the intern/trayicon branch Jul 31, 2019

@miniak

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

/trop run backport-to 7-0-x

@trop

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "7-0-x" here we go! :D

@trop

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

I was unable to backport this PR to "7-0-x" cleanly;
you will need to perform this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.