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

Mentions data driven #38630

Merged
merged 13 commits into from Nov 21, 2022
Merged

Mentions data driven #38630

merged 13 commits into from Nov 21, 2022

Conversation

heiyu4585
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English support options
🇨🇳 Chinese 支持options

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2022

Prepare preview

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (fe40c85) compared to base (fd9d689).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           feature    #38630     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files          447       544     +97     
  Lines         8314      9365   +1051     
  Branches      2531      2652    +121     
===========================================
+ Hits          8314      9365   +1051     
Impacted Files Coverage Δ
components/anchor/index.tsx 100.00% <ø> (ø)
components/auto-complete/index.tsx 100.00% <ø> (ø)
components/avatar/avatar.tsx 100.00% <ø> (ø)
components/avatar/group.tsx 100.00% <ø> (ø)
components/avatar/index.tsx 100.00% <ø> (ø)
components/back-top/index.tsx 100.00% <ø> (ø)
components/badge/Ribbon.tsx 100.00% <ø> (ø)
components/badge/ScrollNumber.tsx 100.00% <ø> (ø)
components/badge/index.tsx 100.00% <ø> (ø)
components/_util/capitalize.ts 100.00% <100.00%> (ø)
... and 222 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -28,7 +28,7 @@ export interface OptionProps {
}

export interface DataDrivenOptionProps {
label?: React.ReactNode;
label?: string | React.ReactNode;
Copy link
Member

Choose a reason for hiding this comment

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

ReactNode 里面有 string,这里不需要改。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get

@heiyu4585 heiyu4585 mentioned this pull request Nov 18, 2022
@@ -56,6 +68,7 @@ When you need to mention someone or something.
| onResize | The callback function that is triggered when textarea resize | function({ width, height }) | - | |
| onSearch | Trigger when prefix hit | (text: string, prefix: string) => void | - | |
| onSelect | Trigger when user select the option | (option: OptionProps, prefix: string) => void | - | |
| options | Option Configuration | \[Options](#Option) | \[] | 4.25.0 |
Copy link
Member

Choose a reason for hiding this comment

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

这个应该是 v5 的了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return children;
};
if (loading) {
options = [
Copy link
Member

Choose a reason for hiding this comment

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

不要直接覆盖提供的参数,额外写一个 mergedOptions 来处理~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -56,6 +68,7 @@ When you need to mention someone or something.
| onResize | The callback function that is triggered when textarea resize | function({ width, height }) | - | |
| onSearch | Trigger when prefix hit | (text: string, prefix: string) => void | - | |
| onSelect | Trigger when user select the option | (option: OptionProps, prefix: string) => void | - | |
| options | Option Configuration | \[Options](#Option) | \[] | 5.1.0 |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| options | Option Configuration | \[Options](#Option) | \[] | 5.1.0 |
| options | Option Configuration | [Options](#Option) | \[] | 5.1.0 |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


// =================== Warning =====================
if (process.env.NODE_ENV !== 'production') {
warning(
Copy link
Member

Choose a reason for hiding this comment

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

这个好像没写测试

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@zombieJ zombieJ merged commit 67ee019 into ant-design:feature Nov 21, 2022
heiyu4585 added a commit to heiyu4585/ant-design that referenced this pull request Nov 22, 2022
* feat: reset and force update

* feat: update package

* feat: reset

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* update doc

* feat: add waring

* feat: update doc

* feat: add test case
@heiyu4585 heiyu4585 deleted the Mentions-dataDriven branch November 23, 2022 01:59
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.

None yet

4 participants