Match the plans manager to the WooCommerce Subscriptions global plans UI#16
Draft
vbelolapotkov wants to merge 11 commits into
Draft
Match the plans manager to the WooCommerce Subscriptions global plans UI#16vbelolapotkov wants to merge 11 commits into
vbelolapotkov wants to merge 11 commits into
Conversation
List: grip drag-handle column, plain headers, kebab-only row actions, expiration column, currency-aware discount formatting, no search or pagination chrome. Modal: per-field labels replacing section headers, canonical helper texts, value-first discount input with currency affix, revealed total-payments and discounted-cycles steppers. Plan names are derived from the billing frequency; the name and description inputs are removed.
Validation errors are now associated with their inputs (aria-invalid + aria-describedby, with help text rendered outside InputControl since it replaces external describedby ids when help is set). The reorder grip column stops advertising an inoperable drag to screen readers and hints at the Move up / Move down row actions instead. The discount input carries its unit in the accessible name. Frequency labels and derived plan names always include the interval (1 month, 2 weeks). Adds component tests for error rendering and derivation-guard cases.
React.act is test-only and not re-exported by wordpress/element; react itself comes from the wordpress/scripts jest environment, so declaring it as a dependency would only risk version skew.
Drop the Card wrapper so the table sits flush in the settings column, use the default DataViews density (12px cells, 57px rows), remove the stale per-cell content padding left over from the title-column layout, align the first column at 24px, and lighten row separators to gray-100.
The released global-plans UI gives its table wrapper a white background; without the removed Card the transparent DataViews table sat directly on the gray admin background.
DataViews re-creates its row elements after this component's effects run (it defers data rendering internally), so the per-row draggable attributes and listeners silently disappeared and a drag could never start. The wrapper now carries one set of delegated drag listeners and a MutationObserver re-stamps the rows whenever DataViews swaps them. Reordering follows the released implementation: a local optimistic copy reorders live on dragover and commits once on dragend, with the moved row dimmed. Also collapses the DataViews 15ch content minimum on the icon-only grip column.
Replace the per-row hidden hint text with an aria-label on the grip handle - hidden text inside the row rendered unclipped in the browser drag ghost, turning the drag preview into a large blob. Dim and tint the dragged row like the released UI. Lift DataViews' 15ch per-cell minimum so columns share the available width on narrower screens. Rename the footer button to Add subscription plan. Also reference MutationObserver via window for the linter.
The Add subscription plan button now sits inside the same white panel as the table, in a padded footer like the released UI, and the actions column drops its DataViews-supplied background so the whole row tints uniformly while dragged.
Validation errors now appear when a field loses focus and clear as the value changes, matching the released plan editor, with its error copy (Discount cannot be negative. / Percentage discount cannot exceed 100%.). Success and error notifications dispatch to the notices store as snackbars - rendered bottom-left by the WooCommerce admin layout - including a new confirmation when plans are reordered. The inline notice stays only for list-load failures.
The previous lockfile update was written by a newer npm and left entries npm 10 (used in CI) requires, failing npm ci with EUSAGE.
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.
Aligns the storewide plans manager (WooCommerce > Settings > Subscriptions) with the WooCommerce Subscriptions 9.x global-plans UI patterns, and hardens the data path it sits on.
Part of WOOSUBS-1796.
List
Modal
Accessibility
New copy to review
Testing
npm install && npm run build:scripts, thennpm run test:js(36 tests incl. new formatter, derivation-guard, and error-rendering component suites) andcomposer test:integrationagainst wp-env🤖 Generated with Claude Code