iOS icon indicating copy to clipboard operation
iOS copied to clipboard

Add action widgets, open page widgets, and gauges on the Lock Screen

Open literally-anything opened this issue 1 year ago • 9 comments

Summary

Allow action widget, open page widget, and watchOS style complications to be available on the iOS Lock Screen.

Screenshots

Screenshot 2024-06-30 at 9 28 19 AM Screenshot 2024-06-30 at 11 17 13 AM Screenshot 2024-06-30 at 9 29 26 AM

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

literally-anything avatar Jun 27 '24 22:06 literally-anything

Looking good! I will manually test and review the PR this week

bgoncal avatar Jun 30 '24 22:06 bgoncal

Codecov Report

Attention: Patch coverage is 7.21649% with 90 lines in your changes missing coverage. Please review.

Project coverage is 27.53%. Comparing base (6c34210) to head (7555425). Report is 145 commits behind head on master.

Files Patch % Lines
...AppIntents/Widget/Gauge/WidgetGaugeAppIntent.swift 0.00% 37 Missing :warning:
...Extensions/AppIntents/IntentServerAppEntitiy.swift 0.00% 26 Missing :warning:
...ntents/Widget/Details/WidgetDetailsAppIntent.swift 0.00% 16 Missing :warning:
...ficationCommands/NotificationsCommandManager.swift 12.50% 7 Missing :warning:
.../SharedPush/Sources/NotificationParserLegacy.swift 60.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2830      +/-   ##
==========================================
- Coverage   27.54%   27.53%   -0.02%     
==========================================
  Files         311      357      +46     
  Lines       31699    24572    -7127     
==========================================
- Hits         8733     6767    -1966     
+ Misses      22966    17805    -5161     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 30 '24 22:06 codecov[bot]

btw bundle exec fastlane autocorrect to fix lint issues

bgoncal avatar Jun 30 '24 22:06 bgoncal

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Jul 01 '24 09:07 home-assistant[bot]

You also need this code on line 81 in LegacyNotificationParserImpl, if you have time would be nice to make it all an enum

case "reload_widgets":
                return .init("reload_widgets")

bgoncal avatar Jul 01 '24 11:07 bgoncal

I haven’t managed to test the notification commands at all. I can’t seem to get my own firebase app connected to APNs properly.

literally-anything avatar Jul 02 '24 21:07 literally-anything

Localization didn't work on my side, do you see it working fine when you edit the widget?

bgoncal avatar Jul 03 '24 09:07 bgoncal

I haven’t managed to test the notification commands at all. I can’t seem to get my own firebase app connected to APNs properly.

I just manually tested it, and after the changes related to the enum above, all works well, we just need to add a note in the documentation telling the user that they can't keep reloading the widgets in a short period of time, since iOS will refuse to do it that often.

Btw, after these changes above we are good to merge, could you just update the docs? https://companion.home-assistant.io/docs/notifications/notification-commands

repo: https://github.com/home-assistant/companion.home-assistant

bgoncal avatar Jul 03 '24 09:07 bgoncal

Localization was working fine for me until I changed my locale. The localized string resources don’t seem to have a fallback for when the string isn’t in the current locale unless you explicitly set it, so I just added defaults for English.

literally-anything avatar Jul 03 '24 23:07 literally-anything

Anything else you want to add? Otherwise I can merge it (Asking because you didnt hit the "ready to review" button)

bgoncal avatar Jul 08 '24 08:07 bgoncal

Oh, no I just forgot to hit the button

literally-anything avatar Jul 08 '24 11:07 literally-anything

Oh, no I just forgot to hit the button

Thank you for your contribution! Don't forget a small update in https://companion.home-assistant.io/docs/notifications/notification-commands

repo: https://github.com/home-assistant/companion.home-assistant

bgoncal avatar Jul 08 '24 11:07 bgoncal

Sorry for commenting but just wondering if any documentation for these new widgets will be added?

dnestico avatar Jul 28 '24 18:07 dnestico