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

feat(form): Form.Item 增加 align 属性 #2492

Merged
merged 7 commits into from
Aug 2, 2024

Conversation

zhangminggeek
Copy link
Contributor

@zhangminggeek zhangminggeek commented Jul 28, 2024

🤔 这个变动的性质是?

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

🔗 相关 Issue

#2491

💡 需求背景和解决方案

方便 Form.Item 修改对齐方式

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

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

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

Summary by CodeRabbit

  • 新功能

    • 在表单组件中新增可选属性 align,允许用户配置表单项的对齐方式,从而增强布局和样式的灵活性。
  • 文档

    • 更新了表单组件的多语言文档,包含 align 属性的详细说明,帮助开发者更好地理解和使用该功能。

Copy link

coderabbitai bot commented Jul 28, 2024

Walkthrough

此次更改为 FormItem 组件引入了一个新的可选属性 align,使开发者能够灵活配置表单项的对齐方式。该属性的添加增强了组件的灵活性与可定制性,允许开发者在不改变现有逻辑的情况下,改善表单元素的布局与展示。

Changes

文件路径 更改摘要
src/packages/form/doc.md 新增 align 属性,指定表单字段的对齐方式。
src/packages/form/doc.taro.md 新增 align 属性,增强表单元素对齐的灵活性。
src/packages/form/doc.en-US.md 新增 align 属性,提供对表单元素的对齐控制。
src/packages/form/doc.zh-TW.md 新增 align 属性,支持表单元素的对齐设置。
src/packages/formitem/formitem.tsx FormItemProps 接口中新增 align 属性,更新组件以支持该属性。
src/packages/formitem/formitem.taro.tsx FormItemProps 接口中新增 align 属性,支持对齐设置。

Possibly related issues

Poem

🐰
在田野间跳跃,欢声笑语,
新增对齐,让表单更美丽。
align 属性,灵活随心,
带来变化,布局轻盈。
兔子欢舞,庆祝这时光! 🌼


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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

Copy link
Collaborator

@oasis-cloud oasis-cloud left a comment

Choose a reason for hiding this comment

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

align 的类型可以指定明确一些,string 类型,不容易知道具体应该如何设置。

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.05%. Comparing base (40daef4) to head (7a2d2a9).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2492      +/-   ##
==========================================
+ Coverage   83.01%   83.05%   +0.03%     
==========================================
  Files         217      217              
  Lines       17744    17746       +2     
  Branches     2546     2549       +3     
==========================================
+ Hits        14731    14739       +8     
+ Misses       3008     3002       -6     
  Partials        5        5              

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

@Alex-huxiyang
Copy link
Collaborator

以及另外两个语言的文档需要补充下,保持一致

@zhangminggeek
Copy link
Contributor Author

align 的类型可以指定明确一些,string 类型,不容易知道具体应该如何设置。

我是看到 Cell 组件中 align 类型是 string 才用了 string,建议同步修改一下Cell 组件

@Alex-huxiyang
Copy link
Collaborator

Alex-huxiyang commented Jul 29, 2024

align 的类型可以指定明确一些,string 类型,不容易知道具体应该如何设置。

我是看到 Cell 组件中 align 类型是 string 才用了 string,建议同步修改一下Cell 组件

ts类型确实写的是string,只是cell文档中有所说明。我补充下ts

@Alex-huxiyang Alex-huxiyang merged commit 62809a0 into jdf2e:next Aug 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants