From d152cd48dcbe7a5b4f4b7a7c14addf61e7dbb9b4 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 8 Oct 2026 00:00:11 -0400 Subject: [PATCH 01/16] fix(bulma-ui): keep a hasName File's CTA corners rounded while there is no name With hasName and nothing to show yet (before a pick, or an empty fileName), File rendered .file.has-name with no .file-name. Bulma squares the CTA's inner corners under has-name to meet the name area, so the button sat alone with two flat corners. - The root takes Bulma's is-empty while hasName has no name to show, which rounds the CTA again in the default and isRight layouts. The markup with a name is unchanged. - Bulma's is-boxed rules come after its is-empty rule and square a boxed CTA's bottom corners again, so _file.scss gives them back with a selector that outranks Bulma's in either order. - The conformance check's rule that a partial registers its own variables asked _file.scss to register --bulma-file-radius, which Bulma registers itself. It now skips a key Bulma registers, and is a pure function held by fixture tests. --- bestax-mcp/data/components/File.json | 2 +- bulma-ui/src/form/CLAUDE.md | 6 +- bulma-ui/src/form/File.stories.tsx | 28 +++ bulma-ui/src/form/File.tsx | 6 +- .../src/form/__tests__/File.styles.test.tsx | 178 ++++++++++++++++++ bulma-ui/src/form/__tests__/File.test.tsx | 45 +++++ bulma-ui/src/scss/form/_file.scss | 9 + docs/docs/api/form/file.md | 54 +++--- scripts/check-conformance.mjs | 89 +++++++-- scripts/scss-conformance.test.mjs | 69 ++++++- 10 files changed, 440 insertions(+), 46 deletions(-) diff --git a/bestax-mcp/data/components/File.json b/bestax-mcp/data/components/File.json index f3895a58e..da72346b0 100644 --- a/bestax-mcp/data/components/File.json +++ b/bestax-mcp/data/components/File.json @@ -173,7 +173,7 @@ "name": "hasName", "type": "boolean", "default": "false", - "description": "Show a file name area. Without `fileName` it shows what the user picked: the file's name, or a count when `multiple` lets them pick several (see `pickedFilesLabel`). Before a pick there is no name area. A reset of the input's form clears the name, but clearing the input from code fires no change event and leaves it showing, so pass `fileName` to control the text then.", + "description": "Show a file name area. Without `fileName` it shows what the user picked: the file's name, or a count when `multiple` lets them pick several (see `pickedFilesLabel`). Before a pick there is no name area, and the root takes Bulma's `is-empty`, which keeps the CTA's corners rounded. A reset of the input's form clears the name, but clearing the input from code fires no change event and leaves it showing, so pass `fileName` to control the text then.", "required": false, "inherited": false, "deprecated": false diff --git a/bulma-ui/src/form/CLAUDE.md b/bulma-ui/src/form/CLAUDE.md index a332e1fca..99f3e6c41 100644 --- a/bulma-ui/src/form/CLAUDE.md +++ b/bulma-ui/src/form/CLAUDE.md @@ -31,8 +31,8 @@ Conventions: as escape hatches, so they are public API too. - Basic inputs (Input, Select, TextArea, …) ship no CSS, but more of this folder has SCSS than you'd guess: even Checkbox and Radio have themed partials, File has one for its keyboard - focus ring, and every extended input (Autocomplete, DateInput, Numberinput, Rate, Slider, - Switch, Taginput, …) does too. Check `../scss/form/_index.scss` for the authoritative list - before changing visuals. + focus ring and a boxed CTA's corners, and every extended input (Autocomplete, DateInput, + Numberinput, Rate, Slider, Switch, Taginput, …) does too. Check `../scss/form/_index.scss` for + the authoritative list before changing visuals. Follow the anatomy rule in `bulma-ui/CLAUDE.md` (test + story + docs page + export + catalog). diff --git a/bulma-ui/src/form/File.stories.tsx b/bulma-ui/src/form/File.stories.tsx index 95b07bb9b..676dd2b76 100644 --- a/bulma-ui/src/form/File.stories.tsx +++ b/bulma-ui/src/form/File.stories.tsx @@ -39,6 +39,34 @@ export const PickedFileName: Story = { ), }; +/** + * Before a pick, a `hasName` File carries Bulma's `is-empty`, so its button + * keeps all four corners rounded in each layout until a name sits beside it. + */ +export const NoNameYet: Story = { + render: () => ( + <> +