feat(admin): admin UX modernisation — settings rebuild + shared scaffolding (NEWS-2152, NEWS-2168, NEWS-2263)#4707
Closed
thomasguillot wants to merge 5 commits into
Closed
Conversation
3 tasks
The `bridgeMounted` flag was only set via the one-shot `newspack-newsletters:bridge-mounted` event listener. If the bridge bundle booted before this module evaluated, the event was missed and the 500ms fallback timer redirected to the legacy editor after every modal-open attempt. Replace the local mutable boolean with a sync read of `window.newspackNewslettersBridgeReady`, which the bridge now sets before dispatching the event. Refs NEWS-2152
…2168)
Stacks the bundled-mode side onto the same wiring as NEWS-2152's
local-list parity. The wizard's SubscriptionLists view dispatches
OPEN_MODAL with kind='esp' for remote rows (replacing the legacy
ExternalLink to the CPT editor) and the active toggle commits
immediately via PATCH /lists/{db_id}.
- Edit on remote rows opens the same modal in ESP mode through the
wizard-bridge (legacy edit_link still serves as the fallback when
the bridge isn't ready).
- Inline TextControl/TextareaControl pair removed for remote rows —
the modal owns title + description.
- Active toggle on every row PATCHes that one row; bulk
"Save Subscription Lists" button removed.
- Description string surfaced under the bold ActionCard title (with
the type label kept on a smaller line below) so publishers see what
customisation is in place without opening the modal.
7 tasks
3 tasks
Contributor
Author
|
Branch was renamed from |
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.
Companion to Automattic/newspack-newsletters#2108 (NEWS-2152) and Automattic/newspack-newsletters#2110 (NEWS-2168).
Started as the wizard-bridge wiring for
<SubscriptionLists>(NEWS-2152 / NEWS-2168) and grew to absorb the broader Newsletters Settings page rebuild and the shared scaffolding it needed (NEWS-2263 / admin UX modernisation milestone). Branch renamed fromnews-2152-bundled-mode-modal-paritytonews-admin-ux-modernisationto reflect the broader scope.NEWS-2152 / NEWS-2168 — Subscription-list bridge + ESP-edit parity
<SubscriptionLists>per-row Edit / Delete buttons dispatchwizard-bridgeevents instead of opening legacy URLs; reloads on save / delete.kind: 'esp'(no audience picker, title + description only).PATCH /lists/{db_id}; bulk Save button retired.NEWS-2263 — Newsletters Settings page rebuild
Single-section wizard (
fixedHeader, dirty tracking, unsaved-changes guard) with sections, top-to-bottom:ToggleControls.ToggleControlwith Local / ESP badge, list description as help text, divider between rows, Edit / Delete on the right (Delete only for local lists). Below the list, a paragraph + secondary "Add new local list" button explain provider-specific syncing (label resolved per-ESP via the wizard's settings response).ToggleControls for click + impressions. Tracking tab removed from the ads-list admin header since the section now lives in Settings.PHP: wizard
/settingsresponse now includes the active provider's labels (get_labels('local_list_explanation')), guarded withclass_existsfor standalone-newspack-plugin installs.Shared scaffolding (packages/components)
integration-iconsnamespace with 6 brand SVGs (Active Campaign, Constant Contact, Fundraise Up, Mailchimp, Salesforce, Wisepops); fills customisable viavar(--integration-icon-color)/--integration-icon-color-accentwith brand-colour defaults.useUnsavedChangesDialoghook — wrapsuseConfirmDialogwith the standard "discard changes" messaging, intercepts outbound link clicks so the custom dialog fires instead of the silent native one, plus abeforeunloadsafety net.CardSettingsGroupgains optionalclassNameandiconSizeprops.CoreCardacceptsiconSize; SCSS reads it via the new--newspack-card-icon-sizecustom property with fallback to existing defaults (no consumer changes required).SectionHeader— container margin now zeroes alongside its inner element whennoMarginis set (via:has()so callsites need no change).admin.css— chrome section header only getsmargin-topwhen it's not the first child ofnewspack-wizard__content, fixing the doubled spacing on audience/edit/new/all.useUnsavedChangesDialogso the same standardised confirm flow covers both wizards.Test plan
newspack-newslettersbranches (NEWS-2152 already merged into the epic; NEWS-2168 onnews-2168-revisit-esp-subscription-list-edit-flow-standalone).newspack-newslettersbundle JS to confirm the fallback timer redirects to the legacy URL on Edit./edit/new/all: confirm the chrome section header sits flush with the wizard content padding (no doubled top margin) and the discard-changes dialog still fires via the shared hook.Merge order
Merge the
newspack-newslettersbranches first; this PR follows.