Repository navigation
Reader: Put the article toolbar buttons on frosted capsules so they stay readable - #26176
Merged
Merged
Conversation
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 35102 | |
| Version | PR #26176 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 918acca | |
| Installation URL | 36r5tce2iei4g |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 35102 | |
| Version | PR #26176 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 918acca | |
| Installation URL | 5k9gt36jlpe2o |
jkmassel
marked this pull request as ready for review
October 21, 2026 19:46
jkmassel
force-pushed
the
jkmassel/cmm-2548-frosted-toolbar
branch
from
October 21, 2026 20:01
94882d2 to
6031ea9
Compare
jkmassel
changed the base branch from
release/27.4
to
jkmassel/cmm-2548-like-count-width
October 21, 2026 20:01
Base automatically changed from
jkmassel/cmm-2548-like-count-width
to
release/27.4
October 21, 2026 20:10
On iOS 26 and later, the toolbar's shared Liquid Glass takes its colour from the content under it. Over some images it ends up close in brightness to the icons: white icons on light glass in Dark Mode on iOS 27, the green like and save icons on grey glass, and white icons on light glass over busy images on iOS 26 (CMM-2548). The buttons now sit on two frosted capsules (systemThickMaterial). They stay near white or near black and switch together with the icons, so the icons stay legible over any content. Selected icons use one shade darker green in light mode, and counts stay in the label colour. With no shared glass, iOS 27 draws a frosted band behind the whole toolbar, so the scroll view's bottom edge effect is hidden. A capsule pins each button to its sizeThatFits width. A button's intrinsic content size lags behind a new configuration, and a stack view sized from it clipped a count after it changed width.
Signed out, or on a private site, the reblog button was shown disabled. On iOS 26+ the frosted capsules set the icon colour directly, so the disabled reblog icon no longer greyed out and looked tappable. Leave the button out instead, on every iOS version.
On iOS 26+ the like button sits on a capsule, so it is no longer the toolbar's last custom view, and its width is pinned by a constraint.
crazytonyli
force-pushed
the
jkmassel/cmm-2548-frosted-toolbar
branch
from
October 21, 2026 20:10
6031ea9 to
918acca
Compare
Collaborator
Generated by 🚫 Danger |
crazytonyli
approved these changes
Oct 21, 2026
crazytonyli
pushed a commit
that referenced
this pull request
Oct 22, 2026
…tay readable (#26176) * Put the Reader article toolbar buttons on frosted capsules On iOS 26 and later, the toolbar's shared Liquid Glass takes its colour from the content under it. Over some images it ends up close in brightness to the icons: white icons on light glass in Dark Mode on iOS 27, the green like and save icons on grey glass, and white icons on light glass over busy images on iOS 26 (CMM-2548). The buttons now sit on two frosted capsules (systemThickMaterial). They stay near white or near black and switch together with the icons, so the icons stay legible over any content. Selected icons use one shade darker green in light mode, and counts stay in the label colour. With no shared glass, iOS 27 draws a frosted band behind the whole toolbar, so the scroll view's bottom edge effect is hidden. A capsule pins each button to its sizeThatFits width. A button's intrinsic content size lags behind a new configuration, and a stack view sized from it clipped a count after it changed width. * Add a release note for the frosted Reader toolbar * Hide the Reader reblog button when the post can't be reblogged Signed out, or on a private site, the reblog button was shown disabled. On iOS 26+ the frosted capsules set the icon colour directly, so the disabled reblog icon no longer greyed out and looked tappable. Leave the button out instead, on every iOS version. * Find the like button inside its frosted capsule in the growth test On iOS 26+ the like button sits on a capsule, so it is no longer the toolbar's last custom view, and its width is pinned by a constraint.
mvanhorn
pushed a commit
to mvanhorn/WordPress-iOS
that referenced
this pull request
Oct 30, 2026
* Reader: Keep the article toolbar icons in one colour style after a like (wordpress-mobile#26169) * Update the Reader article toolbar buttons in place Rebuilding every toolbar item on each like, save or count change let iOS 26 give the new items the dark style while the floating toolbar stayed light, so some icons turned white on a light bar (CMM-2548). The toolbar now keeps its buttons and reconfigures them. It only rebuilds them when the comment or like button appears or disappears. Custom-view buttons don't resize by themselves when their title changes, so they're resized after each update. * Add a release note for the Reader toolbar fix * Name the check that decides whether to rebuild the Reader toolbar The toolbar reuses its buttons unless the comment or like button has to appear or disappear. That check compared two optionals against two flags in one condition, which was hard to read. It now compares a small `Layout` value, with a comment saying when the toolbar is rebuilt. Adds a test for the rebuild case: the first comment on a post whose comments are closed adds the comment button. * Reader: Stop clipping the like count when it gets slightly wider (wordpress-mobile#26177) After a like, the like button could keep its old width and clip the new count, e.g. 1 to 2 on iOS 18, or 1 to 9 on iOS 26. `sizeToFit()` measures the button at its current width, and the button fits a slightly wider title into that width instead of growing. Size the button from an unconstrained measurement instead. * Reader: Put the article toolbar buttons on frosted capsules so they stay readable (wordpress-mobile#26176) * Put the Reader article toolbar buttons on frosted capsules On iOS 26 and later, the toolbar's shared Liquid Glass takes its colour from the content under it. Over some images it ends up close in brightness to the icons: white icons on light glass in Dark Mode on iOS 27, the green like and save icons on grey glass, and white icons on light glass over busy images on iOS 26 (CMM-2548). The buttons now sit on two frosted capsules (systemThickMaterial). They stay near white or near black and switch together with the icons, so the icons stay legible over any content. Selected icons use one shade darker green in light mode, and counts stay in the label colour. With no shared glass, iOS 27 draws a frosted band behind the whole toolbar, so the scroll view's bottom edge effect is hidden. A capsule pins each button to its sizeThatFits width. A button's intrinsic content size lags behind a new configuration, and a stack view sized from it clipped a count after it changed width. * Add a release note for the frosted Reader toolbar * Hide the Reader reblog button when the post can't be reblogged Signed out, or on a private site, the reblog button was shown disabled. On iOS 26+ the frosted capsules set the icon colour directly, so the disabled reblog icon no longer greyed out and looked tappable. Leave the button out instead, on every iOS version. * Find the like button inside its frosted capsule in the growth test On iOS 26+ the like button sits on a capsule, so it is no longer the toolbar's last custom view, and its width is pinned by a constraint. * Patch invalid GlotPress placeholders before localization linting (wordpress-mobile#26182) * Update app translations – `Localizable.strings` * Update plural translations from GlotPress * Update WordPress metadata translations * Update Jetpack metadata translations * Bump version number --------- Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Co-authored-by: Tony Li <tony.li@automattic.com>
mvanhorn
pushed a commit
to mvanhorn/WordPress-iOS
that referenced
this pull request
Oct 30, 2026
* Bump version number * Update draft release notes for 27.4 * Update draft release notes for 27.4 * Release Notes: add new section for next version (27.5) * Update release notes * Update strings for localization * Reader: Keep post tag outlines visible after switching light/dark mode (wordpress-mobile#26168) * Keep Reader post tag borders visible after a light/dark switch The tag chips under a Reader post set `layer.borderColor` once, when the cell is configured. A `CGColor` doesn't follow light and dark mode, so a post opened in dark mode kept the dark-mode grey after the device switched to light mode, where it is almost invisible on white (and the reverse on black). The cell now keeps the dynamic `UIColor` and resolves it again whenever its interface style changes. The "Choose your tags" screen uses the same cell, so it sets the border through the same property. * Add a release note for wordpress-mobile#26168 * Merge release_notes/27.4 into release/27.4 (wordpress-mobile#26173) * Add editorialized release notes * Update metadata strings * Update metadata strings --------- Co-authored-by: Tony Li <tony.li@automattic.com> * Reader: Keep the article toolbar icons in one colour style after a like (wordpress-mobile#26169) * Update the Reader article toolbar buttons in place Rebuilding every toolbar item on each like, save or count change let iOS 26 give the new items the dark style while the floating toolbar stayed light, so some icons turned white on a light bar (CMM-2548). The toolbar now keeps its buttons and reconfigures them. It only rebuilds them when the comment or like button appears or disappears. Custom-view buttons don't resize by themselves when their title changes, so they're resized after each update. * Add a release note for the Reader toolbar fix * Name the check that decides whether to rebuild the Reader toolbar The toolbar reuses its buttons unless the comment or like button has to appear or disappear. That check compared two optionals against two flags in one condition, which was hard to read. It now compares a small `Layout` value, with a comment saying when the toolbar is rebuilt. Adds a test for the rebuild case: the first comment on a post whose comments are closed adds the comment button. * Reader: Stop clipping the like count when it gets slightly wider (wordpress-mobile#26177) After a like, the like button could keep its old width and clip the new count, e.g. 1 to 2 on iOS 18, or 1 to 9 on iOS 26. `sizeToFit()` measures the button at its current width, and the button fits a slightly wider title into that width instead of growing. Size the button from an unconstrained measurement instead. * Reader: Put the article toolbar buttons on frosted capsules so they stay readable (wordpress-mobile#26176) * Put the Reader article toolbar buttons on frosted capsules On iOS 26 and later, the toolbar's shared Liquid Glass takes its colour from the content under it. Over some images it ends up close in brightness to the icons: white icons on light glass in Dark Mode on iOS 27, the green like and save icons on grey glass, and white icons on light glass over busy images on iOS 26 (CMM-2548). The buttons now sit on two frosted capsules (systemThickMaterial). They stay near white or near black and switch together with the icons, so the icons stay legible over any content. Selected icons use one shade darker green in light mode, and counts stay in the label colour. With no shared glass, iOS 27 draws a frosted band behind the whole toolbar, so the scroll view's bottom edge effect is hidden. A capsule pins each button to its sizeThatFits width. A button's intrinsic content size lags behind a new configuration, and a stack view sized from it clipped a count after it changed width. * Add a release note for the frosted Reader toolbar * Hide the Reader reblog button when the post can't be reblogged Signed out, or on a private site, the reblog button was shown disabled. On iOS 26+ the frosted capsules set the icon colour directly, so the disabled reblog icon no longer greyed out and looked tappable. Leave the button out instead, on every iOS version. * Find the like button inside its frosted capsule in the growth test On iOS 26+ the like button sits on a capsule, so it is no longer the toolbar's last custom view, and its width is pinned by a constraint. * Patch invalid GlotPress placeholders before localization linting (wordpress-mobile#26182) * Update app translations – `Localizable.strings` * Update plural translations from GlotPress * Update WordPress metadata translations * Update Jetpack metadata translations * Bump version number * Fix Reader dropping content after an unwrapped iframe (wordpress-mobile#26181) * Fix Reader dropping content after an unwrapped iframe The placeholder step renamed only start tags, so `</iframe>` became a stray end tag that the HTML parser ignored. The placeholder stayed open, the rest of the post became its children, and restoring the iframe hid them as fallback content. Bare `<video>` and `<audio>` lost content the same way. Renaming end tags keeps the placeholder balanced. * Add release note for wordpress-mobile#26181 * Match media tags case-insensitively when adding Reader placeholders Renaming only the lowercase form left a mixed-case pair such as <IFRAME></iframe> half renamed, so the element never closed and the rest of the post was hidden. Suggested by jkmassel on wordpress-mobile#26181. * Replace deprecated icon badge writes with UNUserNotificationCenter (wordpress-mobile#26078) * Replace deprecated icon badge writes with UNUserNotificationCenter AppIconBadgeController writes the home-screen icon through setBadgeCount, serialized latest-wins with a bounded retry that foreground and activity renew. NotificationActivityService owns the writer: it clears the icon when Notifications opens and on sign-out or account change, applies WordPress push counts (zero while Notifications is visible in the foreground), and retries a stranded write. The icon counts WordPress pushes only; support keeps its own indicators and no longer adjusts the icon. Removes the last uses of applicationIconBadgeNumber. * Remove delivered pushes where the deprecated badge setter emptied Notification Center The deprecated setter also removed the app's delivered notifications when it took the badge to zero; setBadgeCount(0) does not. The icon writer gains clearBadgeAndDeliveredPushes, which zeroes the icon and removes delivered push notifications only, keeping local ones such as blogging reminders. The service uses it when Notifications appears (now ahead of the account guard, as on trunk), on sign-out or account change, for the disable and welcome clears, and for a server push with a badge of zero. A push count suppressed while the list is visible stays a plain write. * Add Reader and a Reader notifications bell to the WordPress app behind a flag (wordpress-mobile#26084) * Show a live Reader tab in the WordPress app behind a flag Adds a local flag that makes Reader live in the static screens UI, which WordPress.com accounts get while the Jetpack removal phases stay frozen. The tab bar decides per tab between the live screen and the Moved-to-Jetpack poster: Reader is live and Notifications keeps its poster, including in the iPad compact layout. Account-level Notifications requests end on the poster, or take the unsupported-feature fallback in the iPad split view. The iPad sidebar gains only a Reader row, the dashboard bell is hidden, and the posters stop naming Reader as Jetpack-only. Pushes and Jetpack branding stay off. * Limit the WordPress app's Notifications list to Reader activity With the flag on, the lists that the app's navigation creates in the WordPress app show only new-post, mention, and comment-like notes, with All and Unread filters and Mark All Read. The scope applies when fetching from the store; sync keeps the account-wide window. * Suppress notification permission primers when pushes are off The Notifications screen asked for push permission based only on persisted flags. It now also requires the app to present notifications, which the WordPress app doesn't. * Add a Notifications bell to Reader in the WordPress app With the flag on, the Reader menu, streams, Discover, and Search show a bell in compact width that pushes the Reader-scoped list onto Reader's stack, keeping the tab bar. Regular width keeps the existing popover bell. A pure rule decides the bell for each screen and size class. The list no longer turns off the navigation bar's large titles, and a Reader-scoped list registers no Spotlight activity, because that entry stands for the account-level list. * Fix Reader notifications issues from the wordpress-mobile#26084 review (wordpress-mobile#26186) * Leave the account's notification state alone in Reader lists The bell's badge and the last-seen time cover every kind of notification, and the server keeps one last-seen time per account. A Reader list badged its bell for site activity it doesn't show, and opening it marked that activity seen in the Jetpack app and on the web. Reader lists now submit no seen time, and their bells have no badge. * Show the Notifications poster for account-level entrances on iPad With Reader in the WordPress app, the expanded split view ignored Notifications requests, such as the iOS Settings link. It now presents the Moved-to-Jetpack poster as a sheet, as the compact tab bar lands on its poster. * Keep untagged bar buttons when Reader updates its bell The bell's tag was 0, every bar button's default, so replacing the bell on a size class change removed untagged buttons too. Discover replaced all of its buttons. Tags now start at 1, and Discover replaces only its bell. * Show the Reader bell on larger iPhones in landscape Plus and Max iPhones are regular width in landscape, where the bell followed the iPad split view rules and disappeared from most Reader screens. Only an iPad now follows those rules. * Store a newer notification while the list is visible in the seen tests The like stored while the list was visible was older than the new post already shown, so the newest timestamp never changed and the update path never ran. Store a comment like (a Reader kind, two hours newer) instead: the unscoped list now has to submit both timestamps, and the Reader list still submits none. * Present one Notifications poster at a time on iPad Each account-level entrance, such as a notifications link or the iOS Settings link, presented another Moved-to-Jetpack sheet on top of the last one in the expanded split view, so each needed its own close. Skip the presentation while the poster is still up. --------- Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> * Gate Reader in the WordPress app on a remote feature flag (wordpress-mobile#26187) * Gate Reader in the WordPress app on a remote feature flag The local flag becomes the remote `wordpress_ios_reader` flag, off by default. The app reads it once per launch, so the app UI type and the Notifications list scope always agree. A fetched change applies on the next launch. * Fetch remote feature flags after sign-in Some flags target an account, such as `wordpress_ios_reader`. The app fetched flags only at launch, on foreground and on logout, so after a sign-in the cache kept the anonymous values until the next foreground or launch. A user who signed in and then had the app terminated needed two launches to see Reader. Sign-in used to fetch flags with the new token. That call was removed along with the WordPressAuthenticator code in wordpress-mobile#25645. --------- Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> * Update app translations – `Localizable.strings` * Bump version number * Cherry-pick the iPhone Duo fixes into 27.4 (wordpress-mobile#26290) * Leave room for the create button below the dashboard on every iPhone (wordpress-mobile#26212) * Leave room for the create button below the dashboard on every iPhone The extra space below the last dashboard card, which keeps it clear of the create (+) button, was only added at compact width. The button is shown on every iPhone, so on a regular-width iPhone screen the last card ended up level with it and tight against the tab bar. Add the space wherever the button is shown: every iPhone, and iPad at compact width. * Leave room for the create button below the dashboard on iPad too The create button is shown on every device and width, including full-screen iPad, so add the space below the last card unconditionally. (cherry picked from commit f1f97bb) * Keep themes inside the side safe area (wordpress-mobile#26217) * Keep themes inside the side safe area On the iPhone Duo's outer screen, the theme cards and the Current Theme card ran under the right-hand strip with the clock and nav buttons. A card's "…" button could end up behind the Back button, where tapping it did nothing. Lay the theme grid out inside the safe area and size the cards to fit it, and pin the Current Theme card to the safe area. Nothing changes where there are no side insets; in iPhone landscape the cards now clear the sensor housing. * Keep theme headings and RTL cards inside the safe area The "Themes" / "Custom Themes" section heading was pinned to the header's own edges, so it ran under the sensor housing in iPhone landscape and under the iPhone Duo's side strip in right-to-left languages. Pin it to the safe area in code, like the Current Theme card. In right-to-left layouts the flow layout mirrors its frames across the full width, so `.fromSafeArea` put the strip-side inset on the wrong side and the cards still ran under the strip. Compute the section insets from the safe area instead, swapping the sides in right-to-left layouts. (cherry picked from commit d41e929) * Keep Stats and Comments tabs inside the side safe area (wordpress-mobile#26208) * Keep Stats and Comments tabs inside the side safe area On the iPhone Duo's outer screen, the Stats and Comments tabs and their separator ran under the right-hand strip with the clock and nav buttons, which cut off the last tab. Lay the tabs and the separator out inside the safe area, which the bar already used to measure them. Nothing changes where there are no side insets (portrait iPhone, iPad); in iPhone landscape the tabs now clear the sensor housing. * Clip the Stats and Comments tab underline with the tabs The selection indicator was a sibling of the tabs' scroll view, so it wasn't clipped when the scroll view stopped at the side safe area. With the selected tab scrolled partly out of view, its underline ran on under the iPhone Duo's side strip or the sensor housing. Add the indicator to the scroll view, so it scrolls and clips with the tabs. (cherry picked from commit 9e8e98c) * Show the whole notification permission prompt on short screens (wordpress-mobile#26222) * Show the whole notification permission prompt on short screens On the iPhone Duo's outer screen, the notifications permission prompt cut its text off after two lines ("…and likes. Would…"). Two things caused it. The alert split its spare height between the image and the text, so the text was cut off even when the sheet had room for it. And the sheet is always half the screen's height, which isn't enough on a short screen or with a large text size. Give the text priority over the image, and let alert sheets grow taller than half the screen when their content needs it. Where the alert already fitted, it looks the same. * Measure the alert sheet height only when its width or text size changes UIKit resolves a custom detent on every frame while the sheet is dragged. Keep the last measurement instead of laying out the alert again each time. (cherry picked from commit 89ffb5f) * Show the next and previous notification arrows on every iPhone (wordpress-mobile#26215) * Show the next and previous notification arrows on every iPhone Notification details hid the next / previous arrows whenever the split view wasn't compact, on the assumption that the list is visible next to the details. On a regular-width iPhone screen (the iPhone Duo's inner screen, a Pro Max in landscape) the list isn't visible, so you had to go back for every notification. Hide the arrows only in an expanded iPad split view. * Treat a view controller outside a split view as the compact layout `splitViewControllerIsHorizontallyCompact` fell back to the view controller's own size class when there's no split view. On iPhone there's never a split view, so a regular-width iPhone screen (the iPhone Duo's inner screen, a Pro Max in landscape) answered "not compact" and took the iPad layout. Fix the helper instead of working around it in the notification screens, which also fixes My Site opening on the site menu instead of the dashboard when it loads on a wide iPhone screen. * Check whether the split view is collapsed instead of its size class `splitViewControllerIsHorizontallyCompact` no longer matched its name: it returned true at a regular width when there was no split view. Each caller really wants to know whether another column is visible next to it, so ask the split view directly with `isCollapsed` and remove the helper. * Show the My Site menu card on every iPhone (wordpress-mobile#26211) The dashboard only added the Stats / Posts / Pages / Media / More card at compact width, on the assumption that a regular width means an iPad with the site menu in the sidebar. On the iPhone Duo's inner screen and on a Pro Max in landscape, the dashboard lost its only way into the site menu, and it stayed lost after folding or rotating back until the next reload. Ask `splitViewControllerIsHorizontallyCompact` instead, so the card is hidden only when the site menu is shown beside the dashboard in an expanded split view. * Check whether the split view is collapsed in the dashboard too wordpress-mobile#26211 added a call to `splitViewControllerIsHorizontallyCompact`, which was removed in a3db20e, so the build failed after it merged into this branch. (cherry picked from commit d180374) * Keep the settings error banner inside the safe area (wordpress-mobile#26219) On the iPhone Duo's outer screen, the green "We had trouble loading data" banner in Account Settings was full width, with the clock and wifi drawn on top of it. A longer message would have wrapped under the strip. Lay the banner out inside the safe area, and measure the message's height at the width the text actually gets, after the label's padding. Nothing changes where there are no side insets. (cherry picked from commit 51c7fdb) * Keep list separators out of the side safe area (wordpress-mobile#26220) On the iPhone Duo's outer screen, list separators ran under the right-hand strip in Comments, Users, Reader streams and the notification likes list. By default UIKit ends a table separator at the safe area, but an explicit `separatorInset` replaces that inset, and these cells set one. Add `separatorInsets(leading:trailing:)`, which measures the inset from the safe area and handles right-to-left layouts, and use it in the Comments, People and Reader stream cells. The Reader site header line and the full-width separators in notification details also stop at the safe area now. Nothing changes where there are no side insets. (cherry picked from commit b4650f6) * Read orientation, keyboard and safe area from the view (wordpress-mobile#26203) * Read orientation, keyboard and safe area from the view Orientation checks compare the view's width and height, or check for a compact vertical size class, instead of reading the device orientation. The mention and cross-post suggestions in both block editors are pinned to `keyboardLayoutGuide`. The share extension's tag picker and presentation controller convert the keyboard frame into their own view and use only the part it covers. In landscape the tag picker used to add the keyboard's full width below the list. The Stats date bar, collapsable-header footers and the domain registration footer follow the view's safe area. The splash screen's logo and title stay inside the safe area. Also removes the unused `UIApplication.currentStatusBarOrientation`. * Fix the tag list gap and drop changes that had no effect - The share extension tag list no longer counts the bottom safe area twice. UIKit already insets the table view for it, and the keyboard covers that same strip. Adds TableViewKeyboardObserverTests. - Revert ExtensionPresentationController. Nothing creates it, so the change had no effect. - Revert the domain registration footer. Its safe area was always 0 when the footer was built. - Delete the unused UIView.getHorizontalMargin(compactMargin:). (cherry picked from commit 09733a1) * Use NavigationStack so sheets don't turn into split views (wordpress-mobile#26214) * Use NavigationStack so sheets don't turn into split views A bare `NavigationView` becomes a two-column split view at regular width. The Stats Custom Range sheet, for example, opened with its form in a sidebar on a Pro Max in landscape, and hiding the sidebar also hid Cancel. Replace the remaining non-preview `NavigationView`s with `NavigationStack`, which stays a single column. None of the views inside use navigation APIs that behave differently in a stack. * Let the Activity Log date picker scroll in landscape The graphical date picker with its time row is taller than an iPhone's height in landscape. Without a scroll view the calendar header ended up under the navigation bar and the time row couldn't be reached. * Move the Activity Log date sheet's Clear button to the navigation bar In the bottom toolbar, Clear sat on top of the calendar's last row in landscape. Taps on the days around it (27 and 28 in October 2026) were ignored until the calendar was scrolled. In the navigation bar it sits opposite Done and covers nothing. (cherry picked from commit ac42dca) * Keep notices inside the app window when it's resized (wordpress-mobile#26204) * Keep notices inside the app window when it's resized The notice overlay is a separate window with its own frame, and it kept the frame it had when the first notice appeared. After the app window was resized, notices were cut off or stuck to one side, and the overlay's views kept the previous size class. Each notice, and every resize while one is on screen, now gives the overlay the app window's frame and size class, and measures how much of that window the keyboard covers. In a narrow iPad window the notice sits above the tab bar, which is inside the split view there rather than at the window's root. * Keep notices above the tab bar when the keyboard covers little of the window In a narrow iPad window the notice window's mask hides the strip where the tab bar is. With the keyboard up, a notice sat only above the part of the window the keyboard covers. When that part was shorter than the tab bar (a window that sits above most of the keyboard), the notice was partly or fully hidden by the mask. A notice now sits above whichever is taller. The keyboard overlap also counts only the part of the keyboard frame inside the window, so a frame that isn't at the bottom of the screen can't push the notice off the top. * Add a release note for the notice fixes (cherry picked from commit a9300b9) * Fit the Create sheet's content to its visible width (wordpress-mobile#26221) On the iPhone Duo's outer screen, the Create sheet's buttons were as wide as the whole sheet, while the scroll view that holds them stops at the safe area. The content was wider than the scroll view, so the blogging prompt was centred off to one side and a longer prompt was cut off. Size the buttons to the safe area, which the scroll view already follows. Nothing changes where there are no side insets. (cherry picked from commit bf3337f) * Keep the Stats back button on wide iPhone screens (wordpress-mobile#26207) * Keep the Stats back button on wide iPhone screens On a regular-width iPhone screen (the iPhone Duo's inner screen, a Pro Max in landscape), Stats is pushed with the tab bar hidden, and the Traffic / Insights / Subscribers switcher replaced the back button, so there was no way out. Folding or rotating back didn't help, because the switcher was never removed at compact width. The modal Stats screen opened from a `viewstats` link lost its Done button the same way, on iPad too. Add the switcher next to the screen's existing left items instead of replacing them, keep the back button with `leftItemsSupplementBackButton`, and remove only the switcher when the width becomes compact again. * Add a release note for the Stats back button fix (cherry picked from commit 9ba4f09) * Add a Close button when the commenter info popover is shown full screen (wordpress-mobile#26213) * Add a Close button when the commenter info popover is shown full screen At regular width, the commenter info (the (i) next to a comment's author) is shown as a popover with no Close button. On a Plus or Max iPhone in landscape, iOS shows that popover full screen, where tapping outside or swiping doesn't dismiss it, so the only way out was relaunching the app. Add a Close button whenever the popover is adapted to another style. Real popovers (iPad, the iPhone Duo's inner screen) are unchanged. * Use the system Close button for the commenter info popover On iOS 26 this shows the standard X glyph, matching other UIKit screens. (cherry picked from commit 666b187) * Keep the Menus screen inside the side safe area (wordpress-mobile#26218) On the iPhone Duo's outer screen, the menu area and menu pickers and the menu item list ran under the right-hand strip, and "USES" was centred on the whole screen rather than the visible content. Pin the scroll view to the safe area instead of the screen edges. The storyboard's edge constraints become placeholders that are removed at build time. Nothing changes where there are no side insets. (cherry picked from commit 929eee4) * Size pixels from the view's display scale, not the main screen (wordpress-mobile#26202) * Size pixels from the view's display scale, not the main screen One-pixel separators and borders, rendered button backgrounds, Image CDN (Photon) URLs, site icons, and editor and Reader gallery image sizes use the view's `displayScale` instead of `UIScreen.main.scale`, and redraw when it changes. The new `makeHairlineConstraint(for:)` helper does this for constraint-based separators. Page layout requests send the native scale of the window's screen and start in `viewIsAppearing`, once the view is in a window. Screen-based entry points that no longer have callers are removed. The ones that still have callers without a view (comment formatting, the media thumbnail pipeline, SwiftUI site icons) stay as deprecated wrappers. * Follow the display scale in the places review found - Stats separators use `makeHairlineConstraint(for:)`, registered once per separator, so they follow display-scale changes. - WordPress.com, P2 and Gravatar site icons use the trait collection that's passed in, not `UITraitCollection.current`. - `renderBackgroundImage` renders at the trait collection's scale. The default renderer format uses the main screen's. - Reader gallery images are sized for the window, which the gallery covers, not for the post's column. - A reblog's featured image URL is published in the post, so it never asks for less than a 2x image. * Stop reading the current trait collection when sizing images Site icons now size their URL when they draw, from the SwiftUI environment's display scale. Reader post avatars use the table view's trait collection. Media thumbnails use fixed pixel sizes (408 px small, 1024 px large), and the thumbnail and comment paths size images for 3x, the largest display scale the app runs on. Comments still read the main screen's bounds; see wordpress-mobile#26252. The deprecated wrappers stay, but nothing calls them. * Size small media thumbnails for landscape grids The media grid shows five cells per row once it's wider than 500 pt, so landscape cells are bigger than portrait ones. On an iPhone Pro Max in landscape they're 190 pt at 3x, or 569 px, which a 408 px thumbnail can't fill. 576 px fills the largest cell on any built-in screen. * Remove the deprecated wrappers that read the current trait collection Nothing calls them any more: formatContentString(_:isPrivateSite:), MediaImageService.getResizedImageURL(for:blog:size:), MediaThumbnailExporter(url:) and SiteIconViewModel.optimizedURL(for:imageSize:isP2:). (cherry picked from commit e2c72dd) * Keep Reader stream headers and Discover channels inside the safe area (wordpress-mobile#26210) On the iPhone Duo's outer screen, the Discover channel chips scrolled under the right-hand strip. In iPhone landscape, Reader stream headers (Discover, tags, sites, lists) sat under the sensor housing, and the Discover title didn't line up with the chips. Pin the compact header content to the safe area, and clip the Discover channels to it. Nothing changes where there are no side insets. (cherry picked from commit 49fe43a) * Keep filter tab bars inside the side safe area (wordpress-mobile#26209) * Keep filter tab bars inside the side safe area On the iPhone Duo's outer screen, the filter tabs and divider in Notifications, Posts, Pages and other `FilterTabBar` screens ran under the right-hand strip. Pin the divider and the tabs' scroll view to the safe area, and scroll to the selected tab using the scroll view's width. Nothing changes where there are no side insets; in iPhone landscape the tabs and divider now clear the sensor housing. * Clip the filter tab underline with the tabs The selection indicator was a sibling of the tabs' scroll view, so it wasn't clipped when the scroll view stopped at the side safe area. With the selected tab scrolled partly out of view, its underline ran on under the iPhone Duo's side strip or the sensor housing. Add the indicator to the scroll view, so it scrolls and clips with the tabs. (cherry picked from commit b6520dd) * Keep the editor and Spotlight preview open in the tab bar layout (wordpress-mobile#26223) * Keep open screens when the app shows a site in the tab bar layout Two paths close a screen the user has open, both through `MySitesCoordinator.showBlogDetails`, which closes anything presented: - The first time the split view collapses after launch (an iPad window narrowed into the tab bar layout), it moves the tab bar to the split view's site with `showBlogDetails`. That closes an open editor or Site Creation. Later collapses skip it, because the tab bar is already on that site. The collapse now uses the new `switchToBlog(_:)`, which leaves presented screens alone. - A Spotlight result for a self-hosted post presents the post preview, then opens the site's Posts list, which closes the preview about a second later. It now opens the list first and presents the preview over it, the order the Spotlight path for drafts already uses with the editor. * Add release notes for wordpress-mobile#26223 (cherry picked from commit ff20333) * Keep the Site Creation design list's place when the iPad window is resized (wordpress-mobile#26224) * Keep the design list's place when the window is resized On iPad, resizing the window across the compact/regular line while the Site Creation design list is scrolled down jumps the list back to the top. After each size transition, `CollapsableHeaderViewController` gives the header its full height so it can be measured (`alwaysResetHeaderOnRotation`, which only the design list sets). It didn't size the header for the scroll position again, so the list sat scrolled down under a full header. The snap that runs when the size class changes then read that header and scrolled to the top. The design list only gets that snap since 27.4: wordpress-mobile#26054 replaced its `traitCollectionDidChange` override, which didn't call `super`. The header is now sized for the scroll position at the end of each transition, as the rotation path already does. * Add a release note for wordpress-mobile#26224 (cherry picked from commit ea7983e) * Choose presentation styles from the window's size class, not the device type (wordpress-mobile#26201) * Choose layouts from the window's size class, not the device type Screens that picked a layout or presentation style by checking for an iPad now read the horizontal size class. Presentation decisions read the size class of the presenter's window, because a split view column or a form sheet reports a compact size class inside a wide window. A narrow iPad window (split view, Slide Over, Stage Manager) now gets the iPhone presentation styles, and Plus and Pro Max iPhones in landscape get the iPad ones. Checks that depend on the device type itself, such as alert vs action sheet and popover vs inline picker, stay on the idiom, read from the view controller's trait collection. * Present previews and View Site through one helper The seven places that present a post preview or View Site now call `presentCoveringWindow`. It's full screen in a regular-width window and a page sheet in a compact one. Unlike the default form sheet, a page sheet grows to nearly fill the window when the window is widened while it's open, instead of staying a 580 pt card. The preview from the post-published notice now follows the same rule; before, it was always the default sheet. The preview also fits its web view to its size on every layout. A sheet resized along with its window gets no size transition, so the page kept the narrow width it opened at. * Leave out changes to code that never runs Nothing calls tabBarIconImageInsets or AdaptiveNavigationController's configurePopoverPresentationStyle(from:), so its popover delegate method never runs either. * Keep changed lines stable under swift format * Mention large iPhones in the release note (cherry picked from commit e0085a1) * Present sheets by the window's size class (wordpress-mobile#26233) Add `presentAdaptiveSheet` (WordPressUI): a form sheet while the window has a regular width, and a sheet with the given detents while it has a compact width. The style follows the window while the sheet is on screen, so resizing an iPad window or rotating a large iPhone switches it. Use it for the voice-to-content sheet and the post published sheet. The Blogging Reminders settings sheet picks its spacing and bottom margin from the window's size class too. (cherry picked from commit 18a0da9) * Size Site Creation designs by the window's size class (wordpress-mobile#26235) * Size Site Creation designs by the window's size class The design thumbnails and the assembly screen's readable-width layout followed the device type. They now follow the window's size class. The design request sends the scale of the window's screen, and the loaded designs are laid out again, without a new request, when the size class changes. * Size Site Creation from the window, not the page sheet Site Creation is a page sheet, which reports a compact size class in a wide iPad window. The thumbnail sizes and the assembly screen's readable-width layout now read the window's size class, so a full-screen iPad keeps the wide layout it had before. The sheet's own size class doesn't change when the window is resized, so they check the window's size class on each layout pass and update when it changes. * Pin the final Site Creation screen to one guide that follows the window The content is laid out once against a private layout guide. When the window's size class changes, only the four constraints that pin that guide to the readable or safe area guide are replaced, so the animated top and bottom constraints are never re-created. * Test the preview size and scale sent with the design request Also formats SiteDesignServiceRemote.swift with swift-format. * Lay out the design rows at display time, and keep their scroll position - Each row's thumbnail size now comes from its section type and the window's size class when the row is shown. A resize only reloads the table: the loaded designs are not assembled again, so they can't be reshuffled. - The previews are always requested at the largest thumbnail size (350 x 450), so they are never scaled up after a resize. - Rows keep their horizontal scroll position through a reload. The cell set the saved offset before its collection view had laid out the new designs, so a reused cell clamped it to the previous row's width. The offset is now applied after layout, and saved in thumbnails rather than points so it survives a size change. - Appearing again while the designs are loading no longer starts a second request. (cherry picked from commit 7f48e14) * Size notification text by the window's size class (wordpress-mobile#26234) * Size notification text by the window's size class Notification text was larger on every iPad, whatever the window size. The styles now take the horizontal size class of the window that shows them, and the formatter caches each size class separately. * Build notification fonts and paragraph styles once per size class Notification rows and detail blocks ask for their fonts and paragraph styles on every render. Taking a size class made them build new ones each time, so they're now built once for each size class and reused. * Remove the unused ListTableViewCell notification configuration The notifications list only registers NotificationTableViewCell, so the ListTableViewCell branch in configureCell(_:at:) never ran. * Wrap lines that exceed swift-format's line length (cherry picked from commit d1f3ad7) * Move the cherry-picked release notes into the 27.4 section * Update app translations – `Localizable.strings` * Update WordPress metadata translations * Update Jetpack metadata translations * Bump version number --------- Co-authored-by: Tony Li <tony.li@automattic.com> Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes CMM-2548.
Stacked on #26177, which stops the like count from being clipped in the same toolbar. It merges first.
Puts the Reader article toolbar buttons on frosted capsules on iOS 26 and later, so the icons stay readable over any image, in light and dark mode. Follows #26169, which stopped the icons from mixing black and white; this PR is about how readable those colours are.
The problem
On iOS 26 and later, the toolbar's shared Liquid Glass takes its colour from the content under it, and the icons often end up close in brightness to the glass:
Icons need about 3:1 to be easy to see, and the counts, as text, need 4.5:1.
The change
ReaderDetailToolbarputs the buttons on two frosted capsules (systemThickMaterial) instead of the shared glass. A capsule stays near white or near black, and it switches together with the icons. That includes iOS 26 turning the toolbar dark over dark images: the capsule turns dark too, so the icons and the capsule never end up close in brightness.ReaderDetailViewControllerhides the scroll view's bottom edge effect. Without the shared glass, iOS 27 draws a frosted band with a hard top edge behind the whole toolbar.sizeThatFitswidth. Right after a new title, a button still reports its old width, and a stack view sized from that clipped a count when it changed width (for example a like count going from 1 to 0).Before / after
Real builds of
release/27.4(today) and this PR (frosted), on iOS 26.5 and 27.0 simulators, over 8 backgrounds: six bars from a stress-test post, plus the text and the golf photos from the reported post. Likes and saves were faked locally.iOS 27.0, over the golf photos from the report (liked and saved):
iOS 27.0, toolbar close-ups:
iOS 26.5
iOS 17.5 and 18.6 keep the regular toolbar, so the two columns look the same there.
iOS 17.5
iOS 18.6
With the frosted capsules, the lowest icon contrast is 3.85:1 (the light-mode green star) and the lowest count contrast is 12.75:1.
Things for design to look at
Test plan
ReaderDetailToolbarTests(updated for the capsules, plus new tests that a capsule fits its buttons after a count changes width, and that the reblog button is only shown when the post can be reblogged) andReaderDetailViewControllerTestspass on iOS 26.5 and 27.0 simulators.Other approaches we tried
configureWithOpaqueBackground)