Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: calender footer button css #2971

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

xiaoyatong
Copy link
Collaborator

@xiaoyatong xiaoyatong commented Feb 7, 2025

🤔 这个变动的性质是?

修订bug,样式调整为最新V15版本,优化部分样式的写法。

#2909

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

🔗 相关 Issue

💡 需求背景和解决方案

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

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

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

  • 新功能
    • 数据录入组件全面升级:Calendar已更新至3.0.0,并推出全新CalendarCard、CheckboxGroup,同时Input、InputNumber及Checkbox组件均实现版本升级和文档完善。
    • 特色组件新增:新增Card、TimeDetail、TimeSelect和TrendArrow,均更新至3.0.0版本。
  • 样式
    • 优化了日历组件的视觉表现,调整了头部按钮、月份标题以及确认按钮的尺寸、间距、圆角和字体加粗效果。
  • 重构
    • 精简了日历组件配置,移除不再需要的标题显示、关闭图标和冗余样式,以提升整体结构清晰度。

Copy link

coderabbitai bot commented Feb 7, 2025

Walkthrough

本次变更主要涉及对多个组件配置和样式的调整。在 src/config.json 中,将 Calendar、Checkbox、Input、InputNumber 等组件的版本更新至 3.0.0,并调整了其文档标识,同时新增了 CalendarCard、CheckboxGroup、Card、TimeDetail、TimeSelect 和 TrendArrow 组件。另外,在 calendar.scss 中对日历相关样式进行了修改,调整和重命名了部分 CSS 类;在 demo1.tsx 和 calendaritem.taro.tsx 中分别移除了部分属性和 CSS 类名称。

Changes

文件 变更摘要
src/config.json 更新组件版本及文档状态:Calendar 升级至 3.0.0(dd: false → true);新增 CalendarCard(3.0.0);Checkbox 升级至 3.0.0;新增 CheckboxGroup(3.0.0);Input、InputNumber 升级至 3.0.0;在“特色组件”中新增 Card、TimeDetail、TimeSelect、TrendArrow(均 3.0.0,dd: true)。
src/.../calendar/calendar.scss 新增 .nut-calendar-header-buttons;重命名 .nut-calendar-month-title 为 .nut-calendar-month-title-title;将 .nut-calendar-day-choose-disabled 样式整合入 .nut-calendar-day-choose;调整 .calendar-confirm-btn 的尺寸、边距、border-radius 与字体属性。
src/.../calendar/demos/taro/demo1.tsx 移除 Calendar 组件的 showTitle 和 closeIcon 属性。
src/.../calendaritem/calendaritem.taro.tsx 在 renderFooter 函数中移除确认按钮的 className(calendar-confirm-btn)。

Possibly related PRs

Suggested reviewers

  • oasis-cloud

Poem

嗨,我是一只快乐的小兔子,
跳跃在代码的草原间。
组件升级齐齐登场,
样式调整闪闪发亮✨。
新增与移除各就其位,
我用 ASCII 跳个舞 ─( ̄▽ ̄)/!
变更路上,一路欢歌。


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 61955b9 and 0501e2d.

📒 Files selected for processing (4)
  • src/config.json (2 hunks)
  • src/packages/calendar/calendar.scss (5 hunks)
  • src/packages/calendar/demos/taro/demo1.tsx (0 hunks)
  • src/packages/calendaritem/calendaritem.taro.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • src/packages/calendar/demos/taro/demo1.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/packages/calendaritem/calendaritem.taro.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
🔇 Additional comments (5)
src/packages/calendar/calendar.scss (4)

39-42: 头部按钮样式新增
在 .nut-calendar-header 内新增了嵌套类 &-buttons,并设定高度为 $calendar-header-height,符合新版设计对头部按钮区域的要求。请确认变量 $calendar-header-height 已在全局或相关文件中正确定义。


107-111: 月标题样式命名疑问
在 &-month 内定义了 &-title,生成的类名为 .nut-calendar-month-title,但文档说明提到应重命名为 .nut-calendar-month-title-title。请检查是否存在命名上的不一致,或者这是预期行为,如非意图,则需要调整类名以确保一致性。


189-197: 整合禁用状态样式
将原有 .nut-calendar-day-choose-disabled 的样式合并到 .nut-calendar-day-choose 下的子类 &-disabled,这样可以避免样式重复定义,代码更加简洁。建议测试禁用状态下的视觉效果是否达到预期。


208-217: 日历确认按钮CSS调整
对 .calendar-confirm-btn 的样式进行了更新:高度调整为40px、行高设置为40px、边距由原先的10px 18px改为6px 16px,同时采用了变量 $radius-base 来设置圆角,并添加了 font-weight 的属性。请与设计稿确认新的按钮样式与新版 V15 标准无缝衔接。

src/config.json (1)

502-512: 日历组件版本及文档更新
将 Calendar 组件的版本升级到 "3.0.0",同时将 "dd" 字段设为 true,表明该组件现已完善文档。该更新应与日历样式和交互的调整保持一致,请确认组件实现部分也已同步升级。


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.

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. (Beta)
  • @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.

@github-actions github-actions bot added the 3.x Target branch 3.x label Feb 7, 2025
@xiaoyatong xiaoyatong linked an issue Feb 7, 2025 that may be closed by this pull request
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.74%. Comparing base (d7fa3fd) to head (0501e2d).
Report is 2 commits behind head on feat_v3.x.

Additional details and impacted files
@@              Coverage Diff              @@
##           feat_v3.x    #2971      +/-   ##
=============================================
- Coverage      85.74%   85.74%   -0.01%     
=============================================
  Files            277      277              
  Lines          18110    18105       -5     
  Branches        2745     2745              
=============================================
- Hits           15529    15524       -5     
  Misses          2576     2576              
  Partials           5        5              

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

@Alex-huxiyang Alex-huxiyang merged commit 3b442a5 into jdf2e:feat_v3.x Feb 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Target branch 3.x size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar 底部确认按钮样式错位
2 participants