Skip to content

Commit da8bfdf

Browse files
committed
Fix Audio SFX right accordion folding behavior - PR_26144_008-fix-audio-sfx-right-accordion-folding
1 parent 79525fa commit da8bfdf

4 files changed

Lines changed: 86 additions & 6 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Audio / SFX Playground V2 Right Accordion Folding Validation
2+
3+
PR: `PR_26144_008-fix-audio-sfx-right-accordion-folding`
4+
5+
## Scope
6+
7+
- Updated only `tools/audio-sfx-playground-v2` plus required reports.
8+
- Preserved the shared/template accordion pattern.
9+
- Kept Wave Preview, Output Summary, and Status as accordion sections.
10+
- Changed the Status accordion header from a non-button wrapper to a real accordion header button.
11+
- Moved the Clear button into the Status accordion content so it no longer sits inside the header toggle area.
12+
- Updated the accordion control to bind only direct child header/content elements for each section.
13+
- Restored right-column collapsed accordions to `flex: 0 0 auto` so closed sections release body height.
14+
- Did not modify `start_of_day` folders.
15+
16+
## Static Validation
17+
18+
PASS:
19+
20+
- HTML/CSS accordion validation:
21+
- no `<style>` blocks
22+
- no inline event handlers
23+
- no script tags without `src`
24+
- linked stylesheets resolve
25+
- right-column Wave Preview, Output Summary, and Status sections each have a direct accordion header button
26+
- Clear button is not nested inside the Status accordion header
27+
- CSS contains the closed right-column flex release rule
28+
- CSS braces are balanced
29+
- Audio / SFX Playground V2 JavaScript syntax check:
30+
- `node --check` over `tools/audio-sfx-playground-v2/js/**/*.js`
31+
- Changed runtime module import check:
32+
- `AccordionSection.js`
33+
- Accordion behavior check:
34+
- `AccordionSection` collapses and expands a section, updates `is-open`, `hidden`, and `aria-expanded`
35+
- Whitespace validation:
36+
- `git diff --check -- tools/audio-sfx-playground-v2`
37+
- JSON validation:
38+
- No JSON files changed in this PR.
39+
40+
## Playwright Impact
41+
42+
Playwright impacted: Yes.
43+
44+
Expected validation:
45+
46+
- Workspace V2 launches Audio / SFX Playground V2 with no console errors.
47+
- Wave Preview accordion collapses and expands.
48+
- Output Summary accordion collapses and expands.
49+
- Status accordion collapses and expands.
50+
- Clicking a right-column accordion header toggles only that section.
51+
- Collapsed right-column sections release vertical body space.
52+
- Clicking Clear inside the expanded Status body does not toggle the Status accordion.
53+
54+
Local command results:
55+
56+
- `npm run test:workspace-v2`
57+
- FAIL: PowerShell blocked `npm.ps1` because script execution is disabled on this system.
58+
- `npm.cmd run test:workspace-v2`
59+
- FAIL: package script started, but `playwright` is not installed or not available on PATH.
60+
61+
Because Playwright is unavailable in this local environment, browser launch validation and V8 coverage could not be completed here.
62+
63+
## Coverage
64+
65+
WARN: Runtime JavaScript changed, but Playwright V8 coverage could not be generated because the local Playwright command is unavailable.
66+
67+
- `(WARN) tools/audio-sfx-playground-v2/js/controls/AccordionSection.js - Playwright unavailable`
68+
69+
## Full Samples Smoke Test
70+
71+
Skipped. This PR only impacts Audio / SFX Playground V2 right-column UI behavior.

tools/audio-sfx-playground-v2/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
154154
</section>
155155

156156
<section class="accordion-v2 tool-starter__accordion is-open" data-accordion-v2-open="true">
157-
<div class="accordion-v2__header tool-starter__status-accordion-header" aria-expanded="true" aria-controls="statusLogContent">
157+
<button class="accordion-v2__header tool-starter__status-accordion-header" type="button" aria-expanded="true" aria-controls="statusLogContent">
158158
<span>Status</span>
159+
<span class="accordion-v2__icon" aria-hidden="true">+</span>
160+
</button>
161+
<div id="statusLogContent" class="accordion-v2__content">
159162
<div class="tool-starter__status-header-actions">
160163
<button id="clearStatusButton" class="tool-starter__status-clear-button" type="button">Clear</button>
161-
<span class="accordion-v2__icon" aria-hidden="true">+</span>
162164
</div>
163-
</div>
164-
<div id="statusLogContent" class="accordion-v2__content">
165165
<textarea id="statusLog" readonly rows="10" aria-label="Status log"></textarea>
166166
</div>
167167
</section>

tools/audio-sfx-playground-v2/js/controls/AccordionSection.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
export class AccordionSection {
22
constructor(section) {
33
this.section = section;
4-
this.header = section?.querySelector(".accordion-v2__header") || null;
5-
this.content = section?.querySelector(".accordion-v2__content") || null;
4+
const children = Array.from(section?.children || []);
5+
this.header = children.find((child) => child.classList.contains("accordion-v2__header")) || null;
6+
this.content = children.find((child) => child.classList.contains("accordion-v2__content")) || null;
67
this.icon = this.header?.querySelector(".accordion-v2__icon") || null;
78
}
89

tools/audio-sfx-playground-v2/styles/audioSfxLayoutDensity.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,20 @@ body[data-tool-id="audio-sfx-playground-v2"] .tool-starter__panel--right > .acco
155155
flex: 1 1 0;
156156
}
157157

158+
body[data-tool-id="audio-sfx-playground-v2"] .tool-starter__panel--right > .accordion-v2:not(.is-open) {
159+
flex: 0 0 auto;
160+
}
161+
158162
body[data-tool-id="audio-sfx-playground-v2"] .tool-starter__panel--right .accordion-v2__content {
159163
flex: 1 1 auto;
160164
min-height: 0;
161165
overflow: auto;
162166
}
163167

168+
body[data-tool-id="audio-sfx-playground-v2"] .tool-starter__panel--right .accordion-v2__content[hidden] {
169+
display: none;
170+
}
171+
164172
body[data-tool-id="audio-sfx-playground-v2"] .audio-sfx__preview {
165173
height: 100%;
166174
min-height: 0;

0 commit comments

Comments
 (0)