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

Update widget design #1343

Merged
merged 40 commits into from
Jun 25, 2024
Merged

Update widget design #1343

merged 40 commits into from
Jun 25, 2024

Conversation

jgcaruso
Copy link
Contributor

@jgcaruso jgcaruso commented Jan 11, 2024

Updates to widgets based on new designs Lkt7fuf9Nq3XvfAFPCfpTD-fi-995_4119

Also introduces a PCWidgetColorScheme struct to store different collections of colours to be passed to the different versions of the widgets to support a new style and a "contrast" style that is more like the current widgets.

cc @david-gonzalez-a8c

Some screenshots

The widget chooser

Screen.Recording.2024-01-04.at.4.57.03.PM.mov

iPhone 13 mini in dark mode (widget doesn't change based on light/dark mode)

new large new small / medium old/contrast large old/contrast small / medium
IMG_0004 IMG_0003 IMG_0002 IMG_0001

iPhone 15

default text small / medium default text large max text size small/medium max text size large
Simulator Screenshot - iPhone 15 - 2024-02-08 at 16 01 09 Simulator Screenshot - iPhone 15 - 2024-02-08 at 16 00 49 Simulator Screenshot - iPhone 15 - 2024-02-08 at 15 22 23 Simulator Screenshot - iPhone 15 - 2024-02-08 at 15 21 47

iPhone 15 - other widgets

empty state empty state filter widgets new style filter widgets contrast
Simulator Screenshot - iPhone 15 - 2024-01-11 at 16 12 03 Simulator Screenshot - iPhone 15 - 2024-01-11 at 16 12 06 Simulator Screenshot - iPhone 15 - 2024-02-08 at 16 06 36 Simulator Screenshot - iPhone 15 - 2024-02-08 at 16 06 49

Desktop widgets

SCR-20240208-nwyd

ios 16 non-interactive

small / medium large now playing (empty) and filter large filter
Simulator Screenshot - iPhone SE (3rd generation) - 2024-02-08 at 16 12 35 Simulator Screenshot - iPhone SE (3rd generation) - 2024-02-08 at 16 12 30 Simulator Screenshot - iPhone SE (3rd generation) - 2024-02-08 at 16 13 34 Simulator Screenshot - iPhone SE (3rd generation) - 2024-02-08 at 16 13 38

To test

Test on an iOS 17 device (for interactive widgets) and a lower iOS version (for non interactive widgets)

  1. View all of the widgets in the widget viewer, they should be ordered smallest to largest, new style design first and "contrast" styles second
  2. add all widget types to your homescreen
  3. Ensure you have a bunch of podcasts in your "up next" queue
  4. All widget sizes should match the designs
  5. For iOS 17 interactive widgets, try playing the podcast with the play buttons, they should start and update instantly
  6. Clicking anywhere else on a row should open the podcast in the app (all iOS versions)
  7. clear out your now playing list, leave 1 episode in "now playing"
  8. widgets should match the designs
  9. Remove the currently playing episode
  10. Go to your filters and make sure that the top filter has some episodes in it
  11. view the widgets again, they should look pleasing (but not exactly like designs, these weren't designed i just applied some common colours to them because there is too much shared code between the widgets to leave them the way they were)
  12. Clear episodes from the top filter
  13. View the widgets again, they should look pleasing and show the empty widget state

Test on an iOS 17 device, linked to a MacOS Sonoma mac for Desktop widgets

  • ensure your mac and test phone are on the same icloud account
  • if you have multiple phones you can choose which phone is used for widgets in System Settings ➝ Desktop & Dock, and in the "‌Widgets‌" section, click the ‌iPhone‌ dropdown
  • add widgets to your desktop by right-clicking on the desktop -> Edit Widgets, search for Pocket Casts then add the widgets

Update experience

  1. remove all pocket casts widgets
  2. return to trunk, build and run
  3. add all pocket casts widgets to your home screen
  4. switch back to this branch, build and run
  5. all widgets should still be on the home screen and should be using the "contrast" style, not the new style

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@jgcaruso jgcaruso assigned jgcaruso and unassigned jgcaruso Jan 11, 2024
@jgcaruso jgcaruso changed the title Update widget design [wip] Update widget design Jan 11, 2024
@pocketcasts
Copy link
Contributor

pocketcasts commented Jan 11, 2024

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@jgcaruso jgcaruso force-pushed the update/widget-design branch from 177315b to fd86fef Compare February 8, 2024 20:10
@jgcaruso jgcaruso marked this pull request as ready for review February 8, 2024 21:26
@jgcaruso
Copy link
Contributor Author

I've also tested the Sonoma/iPhone integration and they are also looking good. One thing that I noticed is that sometimes the widgets can get a bit out of sync from the phone status, specially if you change the upnext or playing status on the phone it can take a while to update on MacOS. Is this expected?

So I'm not sure it is expected, but I'm also not sure we're doing anything special in order to get them to appear there. It is just leveraging whatever iOS already does to make widgets available on desktop.

@@ -0,0 +1,122 @@
import SwiftUI

let widgetRedDark = Color(red: 217, green: 32, blue: 28)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating global constants you can do the following:

Extension Color {
  static let widgetRedDark = Color(red: 217, green: 32, blue: 28)
}

And then in any place you need it you just do: .widgetRedDark

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 36762aa

@leandroalonso
Copy link
Member

One thing that I noticed is that sometimes the widgets can get a bit out of sync from the phone status, specially if you change the upnext or playing status on the phone it can take a while to update on MacOS. Is this expected?

I faced the same while testing with the old widget code. As @jgcaruso mentioned I don't think we do anything special...

@SergioEstevao SergioEstevao self-requested a review June 18, 2024 09:19
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my checks on iOS17 it's all looking and code is now updated with my suggestions.
So this is a green for me, but lets wait for @bjtitus and @leandroalonso to approve too.

@leandroalonso
Copy link
Member

I'm gonna test this a bit more but I propose we leave that for 7.68 given 7.67 has already some important changes.

Copy link
Member

@leandroalonso leandroalonso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good from my side.

@bjtitus would you mind taking a final look?

@jgcaruso could you please waiting to merge this one so it goes to 7.68?

@leandroalonso leandroalonso added this to the 7.68 milestone Jun 21, 2024
@jgcaruso
Copy link
Contributor Author

@jgcaruso could you please waiting to merge this one so it goes to 7.68?

Sure thing! How will I know it is safe to merge?

Alternatively, feel free to merge this in when appropriate if there are no other requested changes. I'm not planning any additional changes at this point. Only thing planned at this point is a separate PR once this is merged in for the new medium size "Now Playing" widget

Copy link
Contributor

@bjtitus bjtitus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍🏻

Thank you so much for all of your hard work and being receptive of our feedback @jgcaruso! 🙇

@bjtitus bjtitus merged commit 8be7824 into trunk Jun 25, 2024
5 of 7 checks passed
@bjtitus bjtitus deleted the update/widget-design branch June 25, 2024 03:45
@bjtitus
Copy link
Contributor

bjtitus commented Jun 25, 2024

I just merged this for the 7.68 release now that 7.67 has been frozen.

@leandroalonso
Copy link
Member

@bjtitus I believe we should add this to the CHANGELOG.

bjtitus added a commit that referenced this pull request Jun 25, 2024
Adds an item in the Changelog for the updated widget designs [#1343](#1343).
@bjtitus
Copy link
Contributor

bjtitus commented Jun 25, 2024

@leandroalonso 👍 Submitted in #1864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants