feat: new admin UI foundation#415
Conversation
d02849c to
d69c5f6
Compare
d69c5f6 to
ee0e4de
Compare
|
|
Updated preference coverage to assert the table default and invalid-value fallback. PHPUnit passes. |
|
Two small cleanups remain:
|
|
The search box now submits through a real form control, and the stray blank line at the toolbar stylesheet EOF is gone. |
|
Follow-up adversarial re-audit found four remaining issues:
|
|
Resolved. Snippet search is explicitly live with the redundant submit removed, the cloud selector uses “Bulk actions,” warned functions were split, and the list-table additions moved into focused partials within the source limits. Lint, PHPUnit, and build pass. |
# Conflicts: # src/css/common/_subnav.scss # src/css/common/_theme.scss # src/css/manage.scss # src/php/Admin/Menus/Manage_Menu.php # tests/unit/Admin/Menus/Manage_Menu_Test.php
There was a problem hiding this comment.
This can be moved under list-table/.
| export const PartialDataListTable = <T, K extends Key, A extends string>( | ||
| props: PartialDataListTableProps<T, K, A> | ||
| ) => { | ||
| const [selected, setSelected] = useState(() => new Set<K>()) |
There was a problem hiding this comment.
I don't really see any value in taking this out as a separate inner component?
| <div className="snippet-editor-sidebar"> | ||
| <div className="box"> | ||
| {snippet.id && !isCondition(snippet) && <ActivationSwitch />} | ||
| {snippet.id && !isCondition(snippet) ? <ActivationSwitch /> : null} |
| case 'desc': | ||
| // Descriptions render as rich HTML but can originate from remote | ||
| // sources such as the cloud, so restrict them to post-safe markup. | ||
| return wp_kses_post( $value ); |
There was a problem hiding this comment.
Given that this a rendering/presentation detail, I don't know if it belongs in a setter.
| <?php $this->render_section_tabs(); ?> | ||
|
|
||
| <h2 class="screen-reader-text"><?php esc_html_e( 'Settings', 'code-snippets' ); ?></h2> | ||
| <div class="snippets-page-header"> |
There was a problem hiding this comment.
Is switching a h2 with a h1 okay from an accessibility perspective? @ramiy, do you know?
| * | ||
| * @return void | ||
| */ | ||
| public function handle(): void { |
There was a problem hiding this comment.
Should this be a REST API controller?
| icon: <BlueprintIcon />, | ||
| pro: true, | ||
| subpage: 'blueprints' | ||
| }, |
There was a problem hiding this comment.
Pro items should be grouped together.
| pro?: boolean | ||
| pageSlug?: string | ||
| subpage?: typeof SUBPAGES[number] | ||
| end?: boolean |
There was a problem hiding this comment.
Should not need to set this manually.
Co-authored-by: Maisy <maisy@codesnippets.pro> Co-authored-by: Shea Bunge <shea@sheabunge.com>
Summary
Implements the new admin UI foundation across the plugin's admin screens.
h1and a right-aligned primary action; status links (All | Active | Inactive) restyled to 13px with rule dividers; search moved into the results toolbar with pagination alone on the end side.src/js/components/common/KebabMenu.tsx) with divider, destructive, and custom-row support; closes on outside click and Escape, traps focus, and flips above the trigger near the viewport edge. Not yet wired into any screen.Verification
npm run buildcompiles successfully (Node 20).npm run lint:js,npm run lint:styles, andnpm run lint:phpall pass.npm run test:php: 116 tests, 258 assertions, 0 failures (25 skipped).