fix(ui): label float button from tooltip#86
Conversation
There was a problem hiding this comment.
💡 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} |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
Summary
tooltipas the default accessible name for FloatButton icon-only buttonsaria-labelas the highest-priority accessible nameValidation
CI / qualitypassed for headc0e51f0c21bcfe9ae7f84c35cab1f449a1b8862e.npm run lint:ui,npm run typecheck:ui,npm run test:ui,npm run build:ui,npm run build:docs.src/components/navigation/FloatButton/FloatButton.test.tsxcoverage for tooltip-derived names, explicitaria-label, and visible text fallback.Failed to create unified exec process: No such file or directory.Notes
codebase-memory-mcpgraph tools were not exposed in this session, so this run used repository files through GitHub as the AGENTS.md fallback.mainat41f28b8caf69b827972396c0a7450ff195373070after PR fix(ui): add carousel rotation control #82-fix(ui): describe mentions suggestions to assistive tech #85 were merged.