-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(combos): align Models tab underline and stabilize layout #3328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
blackjune67
wants to merge
2
commits into
lidge-jun:dev
from
blackjune67:codex/fix-combos-tab-underline
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { expect, test } from "bun:test"; | ||
| import { effectiveDeclaration, withoutComments } from "./helpers/css-declarations"; | ||
|
|
||
| async function readStylesheet(path: string): Promise<string> { | ||
| return withoutComments(await Bun.file(new URL(path, import.meta.url)).text()); | ||
| } | ||
|
|
||
| test("Models tab strips keep their full-bleed container borders aligned", async () => { | ||
| const baseStyles = await readStylesheet("../src/styles.css"); | ||
| const workspaceStyles = await readStylesheet("../src/styles-models-workspace.css"); | ||
| const compatibilityStyles = await readStylesheet("../src/styles-compatibility-matrix.css"); | ||
|
|
||
| // The Combos workspace removes the outer container padding. Replacing the tab strip's | ||
| // padding with an equal inline margin keeps its border aligned with the tab buttons. | ||
| expect(effectiveDeclaration( | ||
| baseStyles, | ||
| ".main-inner.main-inner--combos > .page-tabs", | ||
| "margin-inline", | ||
| )).toBe("36px"); | ||
| expect(effectiveDeclaration( | ||
| baseStyles, | ||
| ".main-inner.main-inner--combos > .page-tabs", | ||
| "padding-inline", | ||
| )).toBe("0"); | ||
|
|
||
| // Every Models workspace tab uses the same column width, including loading/error states | ||
| // where the panel content itself may not have mounted yet. | ||
| for (const selector of [ | ||
| ".main-inner:has(#models-panel-catalog:not([hidden]))", | ||
| ".main-inner:has(#models-panel-routing:not([hidden]))", | ||
| ]) { | ||
| expect(effectiveDeclaration(workspaceStyles, selector, "max-width")).toBe("1200px"); | ||
| } | ||
| expect(effectiveDeclaration( | ||
| compatibilityStyles, | ||
| ".main-inner:has(#models-panel-compatibility:not([hidden]))", | ||
| "max-width", | ||
| )).toBe("1200px"); | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
Cover the shell-free Combos states in this test.
Lines 13-24 check only tab-strip spacing. Lines 28-38 check selectors that require a visible
#models-panel-*element. They do not exercise the loading, empty, or error states where the panel may be absent. A regression in the shell-free fallback rules ingui/src/styles.csscan therefore pass this test. Add assertions for the actual fallback selectors, including boxed width, padding/flow, and tab alignment.Also applies to: 26-38
🤖 Prompt for AI Agents