Skip to content

feat: ✨ 移除 keyboard 虚拟键盘车牌号模式下不可用的 I、O 键 - #1037

Merged
Moonofweisheng merged 1 commit into
masterfrom
feat/keyboard/car-remove-I-O
May 7, 2025
Merged

feat: ✨ 移除 keyboard 虚拟键盘车牌号模式下不可用的 I、O 键#1037
Moonofweisheng merged 1 commit into
masterfrom
feat/keyboard/car-remove-I-O

Conversation

@Moonofweisheng

@Moonofweisheng Moonofweisheng commented May 6, 2025

Copy link
Copy Markdown
Owner

Closes: #1005

🤔 这个 PR 的性质是?(至少选择一个)

  • 日常 bug 修复
  • 新特性提交
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • CI/CD 改进
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 代码重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

#1005

💡 需求背景和解决方案

移除 keyboard 虚拟键盘车牌号模式下不可用的 I、O 键

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充

Summary by CodeRabbit

  • 样式
    • 车牌输入键盘去除了字母 I 和 O,符合车牌规则,优化了键盘按键显示。
  • 文档
    • 更新了相关注释,更清晰地说明了键盘布局及按键数量。

@vercel

vercel Bot commented May 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wot-design-uni ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 3:54pm

@coderabbitai

coderabbitai Bot commented May 6, 2025

Copy link
Copy Markdown

Walkthrough

本次变更更新了车牌号虚拟键盘的常量定义和相关测试注释,明确说明并实现了字母 I 和 O 不再出现在车牌号键盘的字母区。仅涉及常量数组内容和注释的调整,未修改导出接口或其他逻辑。

Changes

文件/文件组 变更摘要
src/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts 更新注释,移除 CAR_KEYBOARD_KEYS 数组中的字母 I 和 O。
tests/components/wd-keyboard.test.ts 更新测试注释,明确键盘两种状态及对应键数,无实际测试逻辑变更。

Assessment against linked issues

Objective Addressed Explanation
车牌号键盘禁用或不显示英文字母 I 和 O(#1005

Poem

兔子敲键盘,车牌新规则,
I 与 O 不见,输入更靠谱。
常量已更新,测试也标注,
车牌更规范,兔耳朵点赞!
🚗🔠🐰

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify

netlify Bot commented May 6, 2025

Copy link
Copy Markdown

Deploy Preview for wot-design-uni ready!

Name Link
🔨 Latest commit ee4f20d
🔍 Latest deploy log https://app.netlify.com/sites/wot-design-uni/deploys/681a3099ba777c0008908ae5
😎 Deploy Preview https://deploy-preview-1037--wot-design-uni.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@petercat-assistant

Copy link
Copy Markdown

Walkthrough

此PR重构了虚拟键盘的车牌号模式,移除了不符合车牌号规则的字母I和O。更新了键盘布局的注释和测试用例,以反映这些更改。

Changes

文件 概要
src/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts 移除了车牌号键盘中不使用的字母I和O。
tests/components/wd-keyboard.test.ts 更新了测试用例以反映新的键盘布局和按键数量。


/**
* 车牌号键盘-数字和字母
* 车牌号键盘-数字和字母(不包含I和O,因为车牌号规则中不使用这两个字母)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

移除字母I和O是为了符合车牌号的规则,这样的更改是合理的。

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.70%. Comparing base (7f2ccb2) to head (ee4f20d).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1037      +/-   ##
==========================================
- Coverage   91.05%   89.70%   -1.35%     
==========================================
  Files          10       15       +5     
  Lines         380      641     +261     
  Branches       61       81      +20     
==========================================
+ Hits          346      575     +229     
- Misses         34       66      +32     
Flag Coverage Δ
h5 89.70% <ø> (-1.35%) ⬇️
wd-badge ?
wd-keyboard 89.70% <ø> (?)
wd-tabbar ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 6, 2025

Copy link
Copy Markdown

组件测试摘要 (H5 平台)

测试时间: Tue May 6 15:55:53 UTC 2025

测试结果

组件 状态 覆盖率
wd-keyboard ✅ 通过 89.54%

@coderabbitai coderabbitai 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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/components/wd-keyboard.test.ts (1)

258-271: 测试注释已更新,明确区分中文模式与字母模式
注释清楚描述了车牌模式下的两种状态,且指出字母模式下字母总数为 24(去除了 I、O),与常量定义保持一致。

建议在测试中增加对切换到字母模式后按键数量(36 个)的断言,以进一步验证字母模式下键位渲染逻辑。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73fae20 and ee4f20d.

📒 Files selected for processing (2)
  • src/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts (1 hunks)
  • tests/components/wd-keyboard.test.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Test Components (wd-keyboard)
  • GitHub Check: Redirect rules - wot-design-uni
  • GitHub Check: Header rules - wot-design-uni
  • GitHub Check: Pages changed - wot-design-uni
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
src/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts (1)

44-44: 更新注释,清晰说明不包含 I 和 O 键
注释已准确说明车牌号键盘在字母模式下不使用字母 I 和 O,提高了可读性和维护性,与常量数组内容保持一致。

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.

[新功能需求] 车牌号键盘是否能将字母 I 和 O 禁用了,车牌号规则里就没有这两个字母

2 participants