Skip to content

fix: expose and sync status ribbons setting - #609

Merged
AllTerrainDeveloper merged 2 commits into
WordPress:trunkfrom
Pranjal1423:fix/post-status-ribbons-toggle
Aug 16, 2026
Merged

fix: expose and sync status ribbons setting#609
AllTerrainDeveloper merged 2 commits into
WordPress:trunkfrom
Pranjal1423:fix/post-status-ribbons-toggle

Conversation

@Pranjal1423

@Pranjal1423 Pranjal1423 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Closes #595

This PR resolves issue where toggling the "Show post/page status ribbon" setting in Preferences features did not hide the ribbons on the tiles (Scheduled, Private, Draft, etc.) even after a reload.

File-by-File Changes:

  1. src/settings/registry.ts
    • Added the showPostStatusRibbons: boolean property to the public OsSettingsSnapshot interface definition so TypeScript knows it's a valid settings key.
  2. src/settings/index.ts
    • Added showPostStatusRibbons to the snapshot object returned by getOsSettingsSnapshot() to ensure the setting's state actually propagates to the public settings snapshot.
  3. src/api/facade.ts
    • Updated updateOsSettings to process and map patch.showPostStatusRibbons so changes made from settings context saves persist correctly.
  4. src/ui/components/os-tile/os-tile.ts
    • Added a listener for os-settings-save-lifecycle in the tile component's lifecycle (connectedCallback / disconnectedCallback). When a settings save finishes (phase === 'saved'), all active tiles trigger _paint() to hide or show their status ribbons instantly on the screen without needing to close or reload the window.

How to test:

  1. Open WP Explorer with scheduled/private/draft content visible.
  2. Open Preferences -> Features.
  3. Toggle "Show post/page status ribbon" off.
  4. The ribbons should immediately vanish from the open folder tiles in real-time.

After Fix

Screen.Recording.2026-08-14.at.5.30.18.PM.mov
Open WordPress Playground Preview

@AllTerrainDeveloper AllTerrainDeveloper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! Thank you very much @Pranjal1423!

@AllTerrainDeveloper
AllTerrainDeveloper merged commit 32ba26c into WordPress:trunk Aug 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post-status ribbons stay visible after the setting is turned off

2 participants