Skip to content

fix(ui): label float button from tooltip#86

Merged
wyf027 merged 4 commits into
mainfrom
codex/float-button-label-2026-07-07
Jul 7, 2026
Merged

fix(ui): label float button from tooltip#86
wyf027 merged 4 commits into
mainfrom
codex/float-button-label-2026-07-07

Conversation

@wyf027

@wyf027 wyf027 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • use tooltip as the default accessible name for FloatButton icon-only buttons
  • keep explicit aria-label as the highest-priority accessible name
  • add FloatButton accessible-name tests
  • replace the docs demo container with Tailwind classes and document labelling behavior

Validation

  • GitHub Actions CI / quality passed for head c0e51f0c21bcfe9ae7f84c35cab1f449a1b8862e.
  • Passed steps: npm run lint:ui, npm run typecheck:ui, npm run test:ui, npm run build:ui, npm run build:docs.
  • Test run included new src/components/navigation/FloatButton/FloatButton.test.tsx coverage for tooltip-derived names, explicit aria-label, and visible text fallback.
  • Not run locally: the Codex shell executor is currently failing with Failed to create unified exec process: No such file or directory.

Notes

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0e51f0c21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ref={ref}
type="button"
title={tooltip}
aria-label={accessibleLabel}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Wire the label fix into the exported FloatButton

This updates only the nested implementation, but the package barrel still exports ./FloatButton from packages/ui/src/components/navigation/index.ts:31 while a sibling packages/ui/src/components/navigation/FloatButton.tsx still exists. With normal TS/bundler resolution that import resolves to the sibling file first, so consumers importing FloatButton from @wuyangfan/nova-ui (and the docs playground, which imports the package) still get the stale component with no tooltip-derived aria-label; the new tests import this nested file directly and miss the public export path.

Useful? React with 👍 / 👎.

tooltip='添加'
style={{position:'absolute'}}
aria-label='添加项目'
className='!absolute'

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 Badge Keep the docs override in generated CSS

The docs site only imports the built UI stylesheet (docs/.vitepress/theme/index.ts:4), and the UI Tailwind config scans only ./src/**/*.{ts,tsx} (packages/ui/tailwind.config.cjs:4), so this docs-only !absolute utility is not generated. As a result it will not override FloatButton's built-in fixed class, and the playground button stays fixed to the viewport instead of being positioned inside the demo container; keep an inline style={{ position: 'absolute' }} or include docs content in Tailwind generation.

Useful? React with 👍 / 👎.

@ecc-tools

ecc-tools Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@wyf027
wyf027 merged commit f09dd1f into main Jul 7, 2026
1 check passed
@wyf027
wyf027 deleted the codex/float-button-label-2026-07-07 branch July 7, 2026 19:15
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.

1 participant