Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
56fc6bd
fix: strip html tags from cloud snippet descriptions
imantsk Jul 14, 2026
fb378a7
fix: filter foreign admin notices on code snippets screens
imantsk Jul 14, 2026
d3b8440
fix: improve snippet preview modal sizing and theme
imantsk Jul 14, 2026
1d26a35
feat: show line numbers and language badge in snippet preview
imantsk Jul 14, 2026
d5b9a60
Merge branch 'core-beta' into fix/166-ui-review-fixes
imantsk Jul 14, 2026
db95f8d
fix: use full-size badge in snippet preview modal title
imantsk Jul 14, 2026
ae62c8c
fix: register rest collection args with named keys
imantsk Jul 14, 2026
3a5ddfe
fix: convert zero-based cloud api page numbers for display
imantsk Jul 15, 2026
d7625fc
fix: report one-based page number for featured cloud results
imantsk Jul 15, 2026
9c67039
fix: preserve the preview modal title contract
imantsk Jul 16, 2026
cade6de
fix: load only preview editor assets
imantsk Jul 16, 2026
69ba8cb
fix: degrade snippet preview gracefully when the code editor is unava…
imantsk Jul 16, 2026
c2ca74e
fix: cover preview fallback without the code editor
imantsk Jul 17, 2026
af3a8ef
fix: harden preview fallback and notice ownership
imantsk Jul 17, 2026
2187066
fix: include Add New hook in notice filtering and allow keyboard focu…
Jul 18, 2026
e352952
fix: wrap long lines in preview E2E spec to respect 100-char limit
Jul 18, 2026
88c517b
fix: include compact-menu hookname in notice filter screen check
Jul 18, 2026
5a56b14
fix: restore notice separator spacing rule for filter-disable path
Jul 18, 2026
0cd08d8
fix: handle invokable-object reflection, narrow modal type prop, dele…
Jul 18, 2026
1bf989f
fix: restore table view as default
Jul 18, 2026
c7c5930
fix: make preview modal 5.5-compatible, normalize cloud descriptions,…
Jul 18, 2026
c7ba43d
fix: correct cloud snippet preview output
Jul 18, 2026
5cc1582
fix: strip malformed tags with unbalanced quotes in stripTags
Jul 18, 2026
87467c3
fix: raise locked badge contrast to WCAG AA
Jul 18, 2026
790f741
fix: preserve plain comparison text in stripTags fallback
Jul 18, 2026
eac9b35
fix: make stripTags fallback linear
Jul 18, 2026
308dc5e
fix: make stripTags comment removal linear
Jul 18, 2026
1013055
fix: strengthen stripTags performance regression test
Jul 18, 2026
12acf12
fix: remove historical test comment
Jul 18, 2026
fa2d4e7
fix: decode cloud description entities
Jul 18, 2026
346d28e
fix: correct entity decoding comment
Jul 18, 2026
3264d44
fix: resolve cloud per-page default at request time
Jul 19, 2026
ebf92d8
feat: new admin UI foundation (#415)
imantsk Jul 21, 2026
3f7f6c3
Merge branch 'core-beta' into fix/166-ui-review-fixes/core
sheabunge Jul 21, 2026
d94d2c4
Merge branch 'fix/166-ui-review-fixes' of https://github.com/codesnip…
sheabunge Jul 21, 2026
c623fdc
Remove unnecessary ListTable fragmentation.
sheabunge Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion src/css/common/_badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
}
}

// #646970 (WP gray-50) keeps white badge text at 5.5:1 so locked/unlicensed
// states stay WCAG AA without hover; #a7aaad was 2.3:1.
.nav-tab-inactive .badge,
.inverted-badges .badge {
color: #fff;
background-color: #a7aaad;
background-color: #646970;
border-color: #fff !important;

.dashicons {
Expand Down Expand Up @@ -123,3 +125,31 @@
}
}
}

// Override WordPress' .wp-core-ui .button .dashicons { line-height: 1.9 } —
// inside a button the inflated line-box would shift the glyph below the
// badge's bottom border. Placed at end-of-file so it follows all other
// .dashicons rules in source order (no-descending-specificity).
.wp-core-ui .button .badge .dashicons {
line-height: 1;
}


// Pro badge consolidated to the navigation pro-chip style: a light accent pill
// in every context, overriding the badge colour map and the inverted/nav-tab
// variants (whose white !important border must be beaten here). This is a
// deliberate final override, so it intentionally follows higher-specificity
// context rules above.
/* stylelint-disable no-descending-specificity */
.badge.pro-badge,
.inverted-badges .badge.pro-badge,
.nav-tab-inactive .badge.pro-badge {
color: #2271b1;
background-color: #eff5f9;
border: 1px solid rgb(34 113 177 / 10%) !important;
border-radius: 999px;
padding-block: 3px;
padding-inline: 10px;
line-height: normal;
}
/* stylelint-enable no-descending-specificity */
74 changes: 64 additions & 10 deletions src/css/common/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.code-snippets-card {
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 6px;
border-radius: 5px;
margin: 0;
display: flex;
flex-flow: column;
Expand All @@ -25,19 +25,46 @@

footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
background: #f6f7f7;
background: #f7f7f8;
margin-block-start: auto;
border-block-start: 1px solid #c3c4c7;
padding-inline: 24px;
padding-block: 12px;
border-end-start-radius: 5px;
border-end-end-radius: 5px;
}

// The status label shrinks and clips away under pressure rather than
// pushing the action buttons onto a second line.
.snippet-card-footer-status {
display: flex;
align-items: center;
border-end-start-radius: 6px;
border-end-end-radius: 6px;
gap: 8px;
flex: 0 1 auto;
min-inline-size: 0;
overflow: hidden;
white-space: nowrap;
}

&.is-selectable,
&.has-corner-controls {
.snippet-card-footer-actions {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: nowrap;
gap: 8px;
flex: 0 0 auto;

.button:not(.kebab-menu-trigger) {
min-inline-size: 103px;
text-align: center;
justify-content: center;
}
}

&.is-selectable {
position: relative;
}

Expand All @@ -54,12 +81,39 @@
}
}

&.is-selectable .card-inner h3 {
margin-inline-end: 48px;
input[type='checkbox'].snippet-card-select {
appearance: none;
display: grid;
place-content: center;
inline-size: 20px;
block-size: 20px;
padding: 0;
box-sizing: border-box;
background: #fff;
border: 1.5px solid #2271b1;
border-radius: 5px;
box-shadow: 0 2px 2px rgb(0 0 0 / 5%);
cursor: pointer;

&::before {
content: none;
}

&:checked {
background: #2271b1;

&::before {
content: '';
inline-size: 14px;
block-size: 14px;
margin: 0;
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z' fill='%23fff'/%3E%3C/svg%3E") center/14px no-repeat;
}
}
}

&.has-corner-controls .card-inner h3 {
margin-inline-end: 96px;
&.is-selectable .card-inner > h3 {
margin-inline-end: 48px;
}

&.is-selected {
Expand Down
104 changes: 104 additions & 0 deletions src/css/common/_kebab-menu.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// Generic kebab ("more actions") menu: a square accent-outlined trigger
// button that opens a small popover of actions anchored to its
// bottom-end corner, flipping above the trigger near the viewport edge.
.kebab-menu {
position: relative;
display: inline-flex;
}

.kebab-menu-trigger {
display: flex;
align-items: center;
justify-content: center;
inline-size: 38px;
block-size: 38px;
box-sizing: border-box;
padding: 0;
background: #fff;
color: #2271b1;
border: 1px solid #2271b1;
border-radius: 5px;
cursor: pointer;

svg {
display: block;
}

&:hover,
&:focus {
background: #f0f6fc;
}
}

.kebab-menu-popover {
position: absolute;
inset-block-start: calc(100% + 4px);
inset-inline-end: 0;
z-index: 1000;
inline-size: 224px;
box-sizing: border-box;
margin: 0;
padding-block: 6px;
padding-inline: 0;
list-style: none;
background: #fff;
border: 1px solid #e2e2e4;
border-radius: 5px;
box-shadow: 0 3px 16px rgb(0 0 0 / 15%);

&.kebab-menu-popover-top {
inset-block: auto calc(100% + 4px);
}

li {
margin: 0;
}
}

.kebab-menu-item {
display: block;
inline-size: 100%;
box-sizing: border-box;
padding-block: 10px;
padding-inline: 14px;
background: none;
border: none;
font-family: inherit;
font-size: 14px;
line-height: 1.4;
color: #2c3337;
text-align: start;
cursor: pointer;

&:hover,
&:focus {
background: #f0f0f1;
}

&:disabled {
color: #a7aaad;
cursor: default;
background: none;
}

&.kebab-menu-item-destructive {
color: #d63638;
}
}

.kebab-menu-divider {
margin-block: 6px;
border-block-start: 1px solid #e2e2e4;
}

.kebab-menu-row {
display: flex;
align-items: center;
gap: 8px;
box-sizing: border-box;
padding-block: 10px;
padding-inline: 14px;
font-size: 14px;
line-height: 1.4;
color: #2c3337;
}
Loading
Loading