Skip to content

Standardize header styles for test panel - #304

Open
kumi222 wants to merge 1 commit into
sysprog21:mainfrom
kumi222:fix-test-panel-headers
Open

kumi222 wants to merge 1 commit into
sysprog21:mainfrom
kumi222:fix-test-panel-headers

Conversation

@kumi222

@kumi222 kumi222 commented Oct 14, 2026 •

Copy link
Copy Markdown

Align section header font properties and toggle indicators across both the Add a case and Test results drawers for visual consistency.

Closes #298


Summary by cubic

Standardizes header typography and toggle indicators across the Add a case and Test results drawers so both panels look and behave consistently. Closes #298.

  • Replaces the text "v" chevron with a shared CSS-drawn arrow that rotates 90° when opened and returns when closed.
  • Hides the native <details> marker and applies the same font, padding, and alignment to both headers.
  • Adds a browser test verifying both headers share marker and typography styles and that each chevron rotates on open and restores on close.

Written for commit 1a5edde. Summary will update on new commits.

View guided diff

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread web/interview.html Outdated
Comment thread web/styles.css Outdated
Comment thread web/styles.css
Comment on lines +1416 to +1419
.test-drawer summary::-webkit-details-marker,
.test-drawer summary::marker {
display: none;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display is not one of the few properties ::marker accepts, so that half of the rule does nothing. Firefox also drops the whole selector list because it does not recognize ::-webkit-details-marker. The native triangle only disappears because the summary is now display: flex, and it will come back if that ever changes. Make it explicit: keep .test-drawer summary::-webkit-details-marker { display: none; } as its own rule for Safari, and add list-style: none to the summary rule.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 15af14b to 74531f1 Compare October 14, 2026 09:22
jserv

This comment was marked as outdated.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 74531f1 to 6c8f672 Compare October 14, 2026 09:32
@kumi222
kumi222 requested a review from jserv October 14, 2026 09:37
jserv

This comment was marked as outdated.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 6c8f672 to 2d0e68e Compare October 14, 2026 09:43
jserv

This comment was marked as outdated.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch 2 times, most recently from 629262e to 8873c98 Compare October 14, 2026 09:56

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch 2 times, most recently from 544a798 to 58e0689 Compare October 14, 2026 10:11
@kumi222

kumi222 commented Oct 14, 2026

Copy link
Copy Markdown
Author

Improve git commit messages per https://cbea.ms/git-commit/ :

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how

The English writing must be improved, addressing comprehensive why vs. how.

Refined the git commit message to improve the English phrasing and comprehensively explain the underlying rationale (why), thank you!

@kumi222
kumi222 requested a review from jserv October 14, 2026 10:16
@jserv
jserv requested review from ColtenOuO and alanhc October 14, 2026 10:17
@kumi222
kumi222 force-pushed the fix-test-panel-headers branch 2 times, most recently from 5fca2fa to e671c44 Compare October 14, 2026 11:09
cubic-dev-ai[bot]

This comment was marked as resolved.

@sysprog21 sysprog21 deleted a comment from kumi222 Oct 14, 2026
@sysprog21 sysprog21 deleted a comment from cubic-dev-ai Bot Oct 14, 2026
@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from e671c44 to 4c9233a Compare October 14, 2026 13:26
cubic-dev-ai[bot]

This comment was marked as resolved.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 4c9233a to 92dac5e Compare October 14, 2026 14:01
@jserv

jserv commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

CI fails on the indent gate: interview.html has formatting drift. Run make indent, then amend and force-push. The cargo-audit failure on the same run comes from rustls on main, not from this branch, and needs nothing from you.

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase latest main branch to eliminate known vulnerabilities.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 92dac5e to ee2f6a4 Compare October 15, 2026 16:41

@ColtenOuO ColtenOuO left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not leave the commit body empty. CI will check :)

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from ee2f6a4 to d1036af Compare October 16, 2026 02:58
@jserv

jserv commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@kumi222 #298 asked for a browser test that checks both headers, and this branch changes only web/interview.html and web/styles.css. Add a test under tests/browser/ that asserts the two headers share the same marker and type styles and that the marker turns when each section opens, and amend it into the same commit.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from d1036af to 6365265 Compare October 16, 2026 15:50

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/browser/test-drawer-headers.test.js">

<violation number="1" location="tests/browser/test-drawer-headers.test.js:108">
P2: The chevron has a 120ms transform transition, and this test reads the computed transform immediately after toggling. The restore assertion will compare a mid-transition matrix against `none` and fail. Wait for the transition to finish before reading, and assert the open state is the 90deg rotation.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

);

await header.close();
const restoredTransform = await marker.evaluate(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The chevron has a 120ms transform transition, and this test reads the computed transform immediately after toggling. The restore assertion will compare a mid-transition matrix against none and fail. Wait for the transition to finish before reading, and assert the open state is the 90deg rotation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At tests/browser/test-drawer-headers.test.js, line 108:

<comment>The chevron has a 120ms transform transition, and this test reads the computed transform immediately after toggling. The restore assertion will compare a mid-transition matrix against `none` and fail. Wait for the transition to finish before reading, and assert the open state is the 90deg rotation.</comment>

<file context>
@@ -0,0 +1,121 @@
+      );
+
+      await header.close();
+      const restoredTransform = await marker.evaluate(
+        (el) => getComputedStyle(el).transform,
+      );
</file context>

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 6365265 to 675bc19 Compare October 16, 2026 16:00

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 675bc19 to 9660f24 Compare October 17, 2026 06:09
@jserv
jserv requested a review from ColtenOuO October 17, 2026 06:41
jserv added a commit that referenced this pull request Oct 17, 2026
Several review answers on the tracker had no home in the skills, so
agents kept getting them wrong. Retests now ask for a build from source
and its cargo run -- --version line ("Always build from source.",
#216), maintainers may close a silent report before its reminder date,
a contract bundle in a saved report bounds the build only from below,
and a merged PR that cites an issue as an example is a mention, not a
fix. The PR guide gains a recipe for reading a failed or timed-out
Actions job from statusCheckRollup, the cargo-audit stale-base rule
from #304, #305 and #331, and a stricter reading of what authorizes a
PR sweep. The collaboration guide adds updating the description after
folding changes and answering on GitHub rather than by email.

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run git config to specify your name properly and do git commit --amend.

The test panel drawer headers display inconsistent typography and
toggle indicators between the case creation form and test execution
status. This change aligns font properties and stateful indicator
styles across both sections to establish visual continuity in the
interview view.

Add a browser test under tests/browser/ to verify that both headers
share the same marker and typography styles, and that each marker
rotates when its section opens.
@kumi222
kumi222 force-pushed the fix-test-panel-headers branch from 9660f24 to 1a5edde Compare October 17, 2026 16:00

@ColtenOuO ColtenOuO left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the commit message is still not quite right.

Match the two test drawer headers

Add a case used the browser's native disclosure triangle on the left,
while Test results drew a "v" character at the right edge, so two
headers in one drawer looked like different controls. Both now draw
the same chevron before the label with the same font and padding, and
it turns with the state each header already has: the open attribute
on the details element and the open class on the results toggle.

Closes #298

Would it be better this way? A commit message shouldn't explain the changes file by file; instead, it should give a clear, high-level summary that lets people quickly understand what changed.

Comment thread web/styles.css
Comment on lines +1460 to +1461
.test-drawer details[open] .drawer-chevron,
#results-toggle.open .drawer-chevron {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing ever adds open to #results-toggle, so this rule never applies on the real page. The click handler at web/interview.js:848-851 still flips resultsBody.hidden and writes ^/v into #results-chevron, which is now the CSS triangle. Clicking the toggle on this branch in Chromium:

chevron text transform body
load "" none shown
1st click ^ none hidden
2nd click v none shown

So Test results starts open with its chevron pointing right, as if closed, and a click adds a stray character instead of turning it. The new test doesn't catch this because it adds the class itself (tests/browser/test-drawer-headers.test.js:72) rather than clicking. It also means the commit body's "each marker rotates when its section opens" isn't true yet for Test results.

The handler could toggle the class in place of the text, e.g. nodes.resultsToggle.classList.toggle("open", !nodes.resultsBody.hidden). runTests also shows the body at web/interview.js:2538, so that path needs the same sync, and the toggle should start with open in the markup since the body starts visible. Could the test click #results-toggle instead of setting the class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize section header and toggle indicator styles for test panel

3 participants