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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Breadcrumb): when route.children exist, the path of children is wrong #16885

Merged
merged 4 commits into from Jun 3, 2019

Conversation

Projects
None yet
3 participants
@haianweifeng
Copy link
Contributor

commented May 30, 2019

馃 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?)

馃懟 What's the background?

馃挕 Solution

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

  • 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

haianweifeng added some commits May 30, 2019

淇Breadcrumb.tsx 涓鐞唕oute.children 璺緞涓嶅
<Menu.Item key={child.breadcrumbName || child.path}>
                {itemRender(child, params, routes, [...paths, this.getPath(child.path, params)])}
</Menu.Item>
itemRender(...args) 涓矾寰勫簲璇ュ埌鎷兼帴褰撳墠child.path
fix Breadcrumb.tsx
getPath() 鍙傛暟璧嬮粯璁ゅ

@pr-triage pr-triage bot added the PR: unreviewed label May 30, 2019

@afc163

This comment has been minimized.

Copy link
Member

commented May 30, 2019

Any reproduce.

@haianweifeng

This comment has been minimized.

Copy link
Contributor Author

commented May 30, 2019

const routes = [
  {
    path: 'first',
    breadcrumbName: 'first:name',
    children: [
      {
          path: '/general',
          breadcrumbName: 'General',
      },
      {
          path: '/layout',
          breadcrumbName: 'Layout',
      },
      {
          path: '/navigation',
          breadcrumbName: 'Navigation',
      }
    ]
  }
];

<Breadcrumb routes={routes} params={{ name: '娴嬭瘯' }} />

鍦ㄨ繖绉嶆儏褰笅娓叉煋鐨

<a href="#/first">General</a>

璺緞搴旇鏄'#/first/general'

fix Breadcrumb.tsx
瀵逛簬瀛愯矾寰勬槸鍚︿负绌鸿繘琛屽垽鏂
@codecov

This comment has been minimized.

Copy link

commented May 30, 2019

Codecov Report

Merging #16885 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16885      +/-   ##
==========================================
+ Coverage   95.96%      96%   +0.04%     
==========================================
  Files         263      263              
  Lines        7329     7337       +8     
  Branches     2048     2050       +2     
==========================================
+ Hits         7033     7044      +11     
+ Misses        294      291       -3     
  Partials        2        2
Impacted Files Coverage 螖
components/breadcrumb/Breadcrumb.tsx 96.61% <100%> (+0.53%) 猬嗭笍
components/_util/wave.tsx 88.67% <0%> (+2.83%) 猬嗭笍

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 abb8692...c6ea0aa. Read the comment docs.

@afc163

This comment has been minimized.

Copy link
Member

commented May 30, 2019

Could you create a codesandbox: http://u.ant.design/codesandbox-repro

@ycjcl868

This comment has been minimized.

Copy link
Member

commented May 31, 2019

ci broken.

@haianweifeng

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2019

https://codesandbox.io/embed/antd-reproduction-template-m3qsw
image
褰撴垜鐐瑰嚮first-Layout 鏃 娴忚鍣ㄥ湴鍧娌℃湁鏄剧ず鍒#/index/first/layout

@haianweifeng

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

@afc163

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

image

@haianweifeng haianweifeng changed the title Fix breadcrumb fix(Breadcrumb): when route.children exist, the path of children is wrong Jun 3, 2019

@haianweifeng

This comment has been minimized.

Copy link
Contributor Author

commented on c6ea0aa Jun 3, 2019

let鏀规垚const

@afc163 afc163 merged commit c2b1384 into ant-design:master Jun 3, 2019

24 of 26 checks passed

packtracker/css Awaiting your base commit report...
Details
packtracker/javascript Awaiting your base commit report...
Details
CodeFactor No issues found.
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No significant change
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 95.96%)
Details
codecov/project 96% (+0.04%) compared to abb8692
Details
security/snyk - package.json (paranoidjk) No new issues
Details

@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Jun 3, 2019

@ikobe ikobe referenced this pull request Jun 6, 2019

Merged

docs: 3.19.3 change-log #16998

1 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.