You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace site picker 'Add a site' button with an animated FAB (#23122)
* Replace site picker 'Add a site' button with an animated FAB
Swaps the pinned bottom bar in the site picker for a bottom-end
FloatingActionButton, matching the create-content FAB used for posts
and pages. Uses the Material show()/hide() scale+fade animation, a
long-press tooltip, and reuses the existing add-site click handler.
Removes the now-orphaned Widget.SitePicker.Button style.
* Replace add-site dialog with an animated FAB menu in the site picker
Tapping the site picker FAB now expands a speed-dial menu with 'Create
WordPress.com site' and 'Add self-hosted site' options instead of showing
the AddSiteDialog. The main FAB rotates into a close icon, a scrim dims the
background, and the items stagger in/out with a translate+fade animation.
Dismisses on scrim tap, back press, re-tapping the FAB, or opening search.
Also lifts the FAB to match the create FAB's bottom clearance on the My
Site screen, which floats above the bottom navigation bar.
* Fix clipped FAB shadow in the site picker
The root CoordinatorLayout clipped its children to their bounds, cutting off
the FAB's elevation shadow. Set clipChildren/clipToPadding to false so the FAB
and its expanded menu render their shadows fully.
* Animate the site picker FAB entrance and hide it while pinning
Start the FAB as invisible instead of gone so it is laid out and show() plays
its entrance animation; a gone view is never laid out, so the animation was
skipped. Also hide the FAB while editing pins, matching its behavior in search.
* Inline the single-use toggleAddSiteMenu helper
* Keep the add-site FAB hidden when its reveal is deferred during search
The entrance-animation reveal is posted when the FAB isn't laid out yet. If a
search was restored (e.g. after rotation) in the same pass, the earlier hide()
no-ops on the still-invisible FAB and the queued show() then revealed it over
the search UI. Re-check search/pin/mode state before the deferred show().
* Preserve the expanded add-site FAB menu across configuration changes
Save isAddSiteMenuOpen in the instance state and, on restore, jump straight to
the open end state (scrim, rotated FAB, visible items) without the entrance
animation or re-firing the ADD_SITE_ALERT_DISPLAYED event. Matches the existing
rotation handling for search and pin mode.
* Guard add-site menu restore to DEFAULT mode only
Belt-and-suspenders: the menu only exists in DEFAULT mode, so restoring the
expanded state in other modes would strand the scrim/items if the invariant
ever changed.
* Update MySitesPage e2e for the add-site FAB menu
Renaming button_add_site to fab_add_site left MySitesPage.startNewSite()
referencing a nonexistent id, breaking androidTest compilation. Click the FAB,
then the 'Create WordPress.com site' menu item so the flow still reaches site
creation.
0 commit comments