Skip to content

Chromeless: keep Quick Edit and Bulk Edit alive across a soft reload - #502

Open
mmtr wants to merge 1 commit into
trunkfrom
claude/openstation-issue-419-7c6fdc
Open

Chromeless: keep Quick Edit and Bulk Edit alive across a soft reload#502
mmtr wants to merge 1 commit into
trunkfrom
claude/openstation-issue-419-7c6fdc

Conversation

@mmtr

@mmtr mmtr commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #419

Proposed changes

Quick Edit, Bulk Edit, the comment inline editors and the comment row actions keep working in classic list windows after the list soft-reloads itself.

Two affordances stay degraded and are noted in the code: an empty bulk action submits instead of showing "Please select at least one item", and the search box no longer clears a stale value on mousedown.

Why are these changes being made?

The soft reload added in #388 replaced the whole list body. Core's inline editors bind inside it, so the swap left them dead: the buttons still render and take focus, and clicking does nothing.

It only starts after the first content-change broadcast, so a freshly opened window works and then quietly stops. Any change on the site triggers it, including ones made by another user or a background process, which is why it reads as "Quick Edit doesn't work" rather than "Quick Edit broke after I did X".

Testing instructions

Native Posts and Pages windows must stay off (the default) so these windows render as classic iframes: OpenStation Settings > Features.

Pages:

  1. Open the Pages window, hover a row, click Quick Edit. It opens.
  2. Force a refresh from the browser console: wp.os.broadcast( 'os.page.changed', { source: 'test', action: 'updated', ids: [ 2 ] } ). The list updates in place, no spinner.
  3. Click Quick Edit again. Make sure it opens. On trunk the button takes focus and nothing appears.
  4. Repeat step 2 a few more times. Make sure Quick Edit keeps working and only one editor row opens each time.

Posts, for Bulk Edit:

  1. Tick a row, choose Edit in Bulk actions, click Apply. The bulk editor opens.
  2. Broadcast os.post.changed as above, then repeat. Make sure it still opens, with exactly one Categories column and one Tags field.

Comments (switch the native Comments window off in OpenStation Settings > Features to get the classic screen):

  1. Broadcast os.comment.changed.
  2. Hover a comment row. Make sure Quick Edit and Reply open the inline editor, and Approve / Unapprove / Spam / Trash still work in place.

Narrow windows:

  1. Resize the Pages window until the list collapses to its mobile layout.
  2. Broadcast, then click the Show more details toggle on a row. Make sure it expands.

The soft reload replaced #wpbody-content wholesale, and Core's inline
editors bind inside it rather than delegating on document. The swap
threw away the elements those handlers were bound to, so Quick Edit,
Bulk Edit and the comment inline editors kept rendering, kept taking
focus, and did nothing from the first content-change broadcast onward.

Keep the #wpbody-content node and swap only its children, then re-run
Core's own init entry points before dispatching os-soft-reloaded.

Fixes #419

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mmtr mmtr self-assigned this Aug 5, 2026
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.

Quick Edit doesn't work

1 participant