fix(ui): 修复粘贴创建器5个UI/UX问题#22
Merged
Merged
Conversation
- 修复语言选择器重复key错误 (apex, bicep) - 添加自定义滚动条样式匹配暗色主题 - 重新设计选项面板,添加图标、标签和说明文字 - 优化编辑器布局,固定高度避免页面滚动 - 保持创建按钮始终可见 Closes #5 (UI优化部分)
- 添加缺失的 CSS 变量 --text-muted, --text-tertiary, --border-default, --border-strong - 修复 label 与 input 的可访问性关联 (htmlFor/id, aria-labelledby) - 将滚动条硬编码颜色改为 CSS 变量引用
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概述
修复粘贴创建器 Epic (#5) 完成后发现的5个UI/UX问题,提升用户体验和视觉一致性。
问题与修复
1. 语言选择器重复Key错误 ❌→✅
问题: 点击语言选择器时控制台报错
Encountered two children with the same key原因:
lib/languages.ts中apex和bicep各出现两次apex: 行82 和 行212bicep: 行106 和 行216修复: 删除重复条目 (行212, 216)
2. 滚动条样式优化 🎨
问题: Select下拉框和编辑器的滚动条使用浏览器默认样式,与暗色主题不协调
修复: 在
globals.css添加自定义滚动条样式3. 选项面板重新设计 📝
问题: 密码、过期时间、阅后即焚选项缺乏上下文,用户不理解其含义
修复:
grid-cols-3)Before:
After:
4. 编辑器滚动条样式 🎨
问题: 编辑器区域滚动条同样使用默认样式
修复: 通过全局滚动条样式统一解决
5. 页面布局优化 📐
问题:
修复:
h-[300px] sm:h-[350px] max-h-[50vh]h-screen overflow-hidden修改文件
lib/languages.tsapp/globals.cssapp/page.tsxcomponents/paste/code-editor.tsxcomponents/paste/options-panel.tsx测试
pnpm build构建通过相关Issue