feat: improve Windows Toast actions support#48132
Conversation
543fb76 to
5398c73
Compare
7402311 to
a7ed12e
Compare
ac4006f to
23c7db6
Compare
|
I'm curious about how this gets around the requirement for COM server to implement reply features. |
| @@ -0,0 +1,414 @@ | |||
| // Copyright (c) 2025 Microsoft, GmbH | |||
|
|
||
| namespace { | ||
|
|
||
| class NotificationActivatorFactory final : public IClassFactory { |
There was a problem hiding this comment.
Maybe throw in a giant warning here that you'll be using COM macros liberally (you have to!) just so that people who haven't encountered them know what to google for
I feel like many people will see a IFACEMETHODIMP and go "huh?"
| void** ppv) override { | ||
| if (outer) | ||
| return CLASS_E_NOAGGREGATION; | ||
| auto activator = Microsoft::WRL::Make<NotificationActivator>(); |
There was a problem hiding this comment.
Damn, nice! They really improved things!
| base::win::RegKey key(HKEY_CURRENT_USER, key_path.c_str(), KEY_SET_VALUE); | ||
| if (!key.Valid()) | ||
| return; | ||
| key.WriteValue(nullptr, L"Electron Notification Activator"); |
There was a problem hiding this comment.
No idea, just wondering if we want this to be app-configurable. I wouldn't know if that is user-visible anywhere though.
There was a problem hiding this comment.
This is likely not a problem because the the key path includes the CLSID which is unique. But I'm still wondering if there could be a name collision if multiple Electron Apps register the toast activator. Just being paranoid here.
cfd534e to
1d038bf
Compare
|
API LGTM ✅ |
|
Release Notes Persisted
|
|
I was unable to backport this PR to "38-x-y" cleanly; |
|
I was unable to backport this PR to "39-x-y" cleanly; |
|
I have automatically backported this PR to "40-x-y", please check out #49786 |
|
I have automatically backported this PR to "41-x-y", please check out #49787 |
* feat: improve Windows Toast actions support * fix: ensure MSIX compatibility * test: add bad clsid format test
Description of Change
Closes #47722
Closes #24524
Extends actions support for Windows Toasts to include buttons, dropdowns, and replies.
TODO:
Checklist
npm testpassesRelease Notes
Notes: Extended actions support for Windows notifications to include buttons, select dropdowns, and replies.