|
1 | | -diff --git a/tools/palette-manager-v2/modules/SwatchRow.js b/tools/palette-manager-v2/modules/SwatchRow.js |
2 | | -index 2670eb99..6e66e66e 100644 |
3 | | ---- a/tools/palette-manager-v2/modules/SwatchRow.js |
4 | | -+++ b/tools/palette-manager-v2/modules/SwatchRow.js |
5 | | -@@ -31,9 +31,6 @@ export class SwatchRow { |
| 1 | +diff --git a/tools/common/PaletteSortService.js b/tools/common/PaletteSortService.js |
| 2 | +index 338b7ad2..f9db35d4 100644 |
| 3 | +--- a/tools/common/PaletteSortService.js |
| 4 | ++++ b/tools/common/PaletteSortService.js |
| 5 | +@@ -1,5 +1,4 @@ |
| 6 | + const PALETTE_SORT_MODES = Object.freeze([ |
| 7 | +- Object.freeze({ value: "original", label: "Original / source order" }), |
| 8 | + Object.freeze({ value: "hue", label: "Hue" }), |
| 9 | + Object.freeze({ value: "saturation", label: "Saturation" }), |
| 10 | + Object.freeze({ value: "brightness", label: "Brightness" }), |
| 11 | +@@ -92,7 +91,7 @@ export class PaletteSortService { |
6 | 12 | } |
7 | 13 |
|
8 | | - static createSourceTile(documentRef, swatch, options = {}) { |
9 | | -- const entry = documentRef.createElement("div"); |
10 | | -- entry.className = "palette-manager-v2__source-entry"; |
11 | | -- |
12 | | - const tile = documentRef.createElement("div"); |
13 | | - tile.className = "palette-manager-v2__source-tile"; |
14 | | - tile.tabIndex = 0; |
15 | | -@@ -68,9 +65,8 @@ export class SwatchRow { |
| 14 | + sortSwatches(swatches, mode) { |
| 15 | +- if (!this.isValidSortMode(mode) || mode === "original") { |
| 16 | ++ if (!this.isValidSortMode(mode)) { |
| 17 | + return Array.isArray(swatches) ? swatches.slice() : []; |
| 18 | + } |
16 | 19 |
|
17 | | - const details = SwatchRow.createDetailsBlock(documentRef, swatch, "palette-manager-v2__source-details"); |
18 | | - |
19 | | -- tile.append(chip, tack); |
20 | | -- entry.append(tile, details); |
21 | | -- return entry; |
22 | | -+ tile.append(chip, tack, details); |
23 | | -+ return tile; |
| 20 | +@@ -106,7 +105,7 @@ export class PaletteSortService { |
24 | 21 | } |
25 | 22 |
|
26 | | - static createDetailsBlock(documentRef, swatch, className) { |
27 | | -diff --git a/tools/palette-manager-v2/paletteManagerV2.css b/tools/palette-manager-v2/paletteManagerV2.css |
28 | | -index b2eae3b0..11f536b2 100644 |
29 | | ---- a/tools/palette-manager-v2/paletteManagerV2.css |
30 | | -+++ b/tools/palette-manager-v2/paletteManagerV2.css |
31 | | -@@ -161,18 +161,6 @@ |
32 | | - padding-bottom: 150px; |
33 | | - } |
34 | | - |
35 | | --.palette-manager-v2__source-entry { |
36 | | -- position: relative; |
37 | | -- min-width: 0; |
38 | | -- display: grid; |
39 | | -- z-index: 1; |
40 | | --} |
41 | | -- |
42 | | --.palette-manager-v2__source-entry:hover, |
43 | | --.palette-manager-v2__source-entry:focus-within { |
44 | | -- z-index: 20; |
45 | | --} |
46 | | -- |
47 | | - .palette-manager-v2__swatch-row { |
48 | | - display: grid; |
49 | | - grid-template-columns: 36px minmax(0, 1fr) 42px; |
50 | | -@@ -284,7 +272,15 @@ |
51 | | - background: var(--surface-inline, rgba(25, 12, 55, 0.74)); |
52 | | - cursor: pointer; |
53 | | - padding: 8px; |
54 | | -- overflow: hidden; |
55 | | -+ overflow: visible; |
56 | | -+ z-index: 1; |
57 | | -+} |
58 | | -+ |
59 | | -+.palette-manager-v2__source-tile:hover, |
60 | | -+.palette-manager-v2__source-tile:focus, |
61 | | -+.palette-manager-v2__source-tile:focus-within { |
62 | | -+ z-index: 20; |
63 | | -+ box-shadow: 0 0 0 2px rgba(221, 214, 254, 0.34), 0 12px 24px rgba(0, 0, 0, 0.28); |
64 | | - } |
65 | | - |
66 | | - .palette-manager-v2__source-tile:focus-visible { |
67 | | -@@ -314,6 +310,8 @@ |
68 | | - left: 0; |
69 | | - z-index: 30; |
70 | | - width: 100%; |
71 | | -+ box-sizing: border-box; |
72 | | -+ margin: 0; |
73 | | - border: 1px solid rgba(255, 255, 255, 0.24); |
74 | | - border-radius: 6px; |
75 | | - background: rgba(0, 0, 0, 0.88); |
76 | | -@@ -325,8 +323,9 @@ |
77 | | - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36); |
78 | | - } |
79 | | - |
80 | | --.palette-manager-v2__source-entry:hover .palette-manager-v2__source-details, |
81 | | --.palette-manager-v2__source-entry:focus-within .palette-manager-v2__source-details { |
82 | | -+.palette-manager-v2__source-tile:hover .palette-manager-v2__source-details, |
83 | | -+.palette-manager-v2__source-tile:focus .palette-manager-v2__source-details, |
84 | | -+.palette-manager-v2__source-tile:focus-within .palette-manager-v2__source-details { |
85 | | - display: grid; |
86 | | - } |
| 23 | + sortRows(rows, mode) { |
| 24 | +- if (!this.isValidSortMode(mode) || mode === "original") { |
| 25 | ++ if (!this.isValidSortMode(mode)) { |
| 26 | + return Array.isArray(rows) ? rows.slice() : []; |
| 27 | + } |
87 | 28 |
|
88 | | -diff --git a/docs/dev/reports/PR_26124_031_report.md b/docs/dev/reports/PR_26124_031_report.md |
| 29 | +diff --git a/tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js b/tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js |
| 30 | +index c8761215..d377ca06 100644 |
| 31 | +--- a/tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js |
| 32 | ++++ b/tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js |
| 33 | +@@ -66,7 +66,7 @@ export class SourcePaletteBrowserControl { |
| 34 | + button.type = "button"; |
| 35 | + button.className = "palette-manager-v2__sort-button"; |
| 36 | + button.dataset.sortMode = mode.value; |
| 37 | +- button.textContent = mode.value === "original" ? "Original" : mode.label; |
| 38 | ++ button.textContent = mode.label; |
| 39 | + button.addEventListener("click", () => { |
| 40 | + this.app.setSourceSortMode(mode.value); |
| 41 | + }); |
| 42 | +diff --git a/tools/palette-manager-v2/modules/PaletteManagerApp.js b/tools/palette-manager-v2/modules/PaletteManagerApp.js |
| 43 | +index 86b164c4..59180d5c 100644 |
| 44 | +--- a/tools/palette-manager-v2/modules/PaletteManagerApp.js |
| 45 | ++++ b/tools/palette-manager-v2/modules/PaletteManagerApp.js |
| 46 | +@@ -65,8 +65,8 @@ export class PaletteManagerApp { |
| 47 | + selectedUserIndex: -1, |
| 48 | + sourcePaletteId: this.sourcePaletteIds[0] || "", |
| 49 | + sourceSearch: "", |
| 50 | +- userSortMode: "original", |
| 51 | +- sourceSortMode: "original", |
| 52 | ++ userSortMode: "hue", |
| 53 | ++ sourceSortMode: "hue", |
| 54 | + errors: [], |
| 55 | + status: "Ready." |
| 56 | + }; |
| 57 | +diff --git a/docs/dev/reports/PR_26124_032_report.md b/docs/dev/reports/PR_26124_032_report.md |
89 | 58 | new file mode 100644 |
90 | | -index 00000000..5bd33718 |
| 59 | +index 00000000..83801cde |
91 | 60 | --- /dev/null |
92 | | -+++ b/docs/dev/reports/PR_26124_031_report.md |
93 | | -@@ -0,0 +1,18 @@ |
94 | | -+# PR_26124_031 Palette Hover Overlay No Layout Shift Report |
| 61 | ++++ b/docs/dev/reports/PR_26124_032_report.md |
| 62 | +@@ -0,0 +1,20 @@ |
| 63 | ++# PR_26124_032 Remove Original Sort Option Report |
95 | 64 | + |
96 | 65 | +## Scope |
97 | | -+- Updated Palette Manager V2 source swatch hover behavior only. |
98 | | -+- No schema, sample JSON, games, workspace, toolState, session, or tools/shared changes. |
| 66 | ++- Removed the `Original` source palette sort option. |
| 67 | ++- Kept Palette Manager controls class-based. |
| 68 | ++- Did not modify stored palette swatch order, schemas, sample JSON, games, or tools/shared. |
99 | 69 | + |
100 | 70 | +## Changes |
101 | | -+- Moved source hover details into the source tile DOM node so the tile is the fixed-size positioning anchor. |
102 | | -+- Removed the source-entry wrapper and related CSS so hover no longer introduces an extra layout surface. |
103 | | -+- Kept hover feedback to z-index and shadow on the existing tile box. |
104 | | -+- Kept hover details as an absolutely positioned popover below the tile, hidden outside normal document flow. |
| 71 | ++- Removed `original` from `PaletteSortService` sort modes and sort bypass checks. |
| 72 | ++- Source palette sort buttons now render directly from the remaining sort mode labels. |
| 73 | ++- Palette Manager initial sort state now uses `hue` so Hue is the default active source sort. |
105 | 74 | + |
106 | 75 | +## Validation |
107 | | -+- `node --check tools/palette-manager-v2/modules/SwatchRow.js` |
108 | | -+- `git diff --check` |
| 76 | ++- `node --check tools/common/PaletteSortService.js` |
| 77 | ++- `node --check tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js` |
| 78 | ++- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js` |
| 79 | ++- `rg "original|Original" tools/common/PaletteSortService.js tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js tools/palette-manager-v2/controls/UserPaletteControl.js tools/palette-manager-v2/modules/PaletteManagerApp.js` |
109 | 80 | + |
110 | 81 | +## Packaging |
111 | | -+- Delta ZIP: `tmp/PR_26124_031-palette-hover-overlay-no-layout-shift_delta.zip` |
| 82 | ++- Delta ZIP: `tmp/PR_26124_032-remove-original-sort-option_delta.zip` |
0 commit comments