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

refactor(timeline): rewrite with hook #23631

merged 6 commits into from May 2, 2020

refactor(timeline): rewrite with hook #23631

merged 6 commits into from May 2, 2020


Copy link

@hengkx hengkx commented Apr 26, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English refactor with hook
🇨🇳 Chinese 用 react hook 重构

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

@hengkx hengkx added this to WIP in Refactor with React Hooks via automation Apr 26, 2020
Copy link

@ant-design-bot ant-design-bot commented Apr 26, 2020

Copy link

@codesandbox-ci codesandbox-ci bot commented Apr 26, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4b9648d:

Sandbox Source
antd reproduction template Configuration

Copy link

@codecov codecov bot commented Apr 26, 2020

Codecov Report

Merging #23631 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23631      +/-   ##
+ Coverage   98.50%   98.51%   +0.01%     
  Files         363      363              
  Lines        7209     7205       -4     
  Branches     2000     2000              
- Hits         7101     7098       -3     
+ Misses        108      107       -1     
Impacted Files Coverage Δ
components/timeline/Timeline.tsx 100.00% <100.00%> (ø)
components/timeline/TimelineItem.tsx 100.00% <100.00%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dabec4c...4b9648d. Read the comment docs.

Copy link
Member Author

@hengkx hengkx commented Apr 27, 2020

这一行我加了color 为什么还覆盖不到...

Copy link
Member Author

@hengkx hengkx commented Apr 27, 2020

color 有defaultProps

Copy link
Member Author

@hengkx hengkx commented Apr 28, 2020

@afc163 请教个问题

it('should keepAlign by calling forcePopupAlign', async () => {
const wrapper = mount(<Slider defaultValue={30} tooltipVisible />);
wrapper.find('Tooltip').instance().tooltip.forcePopupAlign = jest.fn();
await sleep(20);

Tooltip 改为func的话,没有instance方法了,设置属性好像也不能给子组件设置,有什么好的方法吗?单独测试SliderTooltip?

Copy link

@afc163 afc163 commented Apr 28, 2020


@hengkx hengkx merged commit 3d355fd into master May 2, 2020
33 checks passed
Refactor with React Hooks automation moved this from WIP to Done May 2, 2020
@hengkx hengkx deleted the refactor/timeline branch May 2, 2020
@ycjcl868 ycjcl868 mentioned this pull request May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants