Skip to content

feat(module:anchor): url fragment change on click - nzReplace#8464

Open
ParsaArvanehPA wants to merge 36 commits intoNG-ZORRO:masterfrom
ParsaArvanehPA:feature/anchor-navigation-without-location-change
Open

feat(module:anchor): url fragment change on click - nzReplace#8464
ParsaArvanehPA wants to merge 36 commits intoNG-ZORRO:masterfrom
ParsaArvanehPA:feature/anchor-navigation-without-location-change

Conversation

@ParsaArvanehPA
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[✔] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

  • Unlike Ant's Anchor, click on an anchor's link does'nt update the fragment of the current URL.
  • We lack the replace option that Ant provides.

What is the new behavior?

  1. In contrast to the Ant's Anchor, the URL fragment now updates accordingly when an anchor link is activated.
  2. The addition of nzReplace provides an option that, when enabled, replaces the current history state without adding a new state to the browser's history stack.

Does this PR introduce a breaking change?

[ ] Yes
[✔] No

Other information

@ParsaArvanehPA ParsaArvanehPA requested a review from cipchk as a code owner March 24, 2024 20:14
@zorro-bot
Copy link
Copy Markdown

zorro-bot bot commented Mar 24, 2024

This preview will be available after the AzureCI is passed.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.81%. Comparing base (cb013f0) to head (49ecf10).
Report is 192 commits behind head on master.

Files with missing lines Patch % Lines
components/anchor/anchor.component.ts 60.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8464      +/-   ##
==========================================
- Coverage   91.83%   91.81%   -0.02%     
==========================================
  Files         548      548              
  Lines       19310    19320      +10     
  Branches     2862     2865       +3     
==========================================
+ Hits        17733    17739       +6     
- Misses       1261     1262       +1     
- Partials      316      319       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@Laffery Laffery left a comment

Choose a reason for hiding this comment

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

LGTM

@Laffery
Copy link
Copy Markdown
Collaborator

Laffery commented Jun 4, 2024

unit tests failed with error, please solve this issue first @ParsaArvanehPA

anchor property (nzChange) should emit nzChange when scrolling to the anchor

@Laffery
Copy link
Copy Markdown
Collaborator

Laffery commented Nov 26, 2024

unit tests failed with error, please solve this issue first @ParsaArvanehPA

anchor property (nzChange) should emit nzChange when scrolling to the anchor

@ParsaArvanehPA I had tried to fix this CI issue, but all my efforts didn't work.

Your previous workaround which is to multiply the throttleTime by 20 FAILs.
We should make it passed in a right way. Please take a look.

@Laffery Laffery removed this from the v19 milestone Nov 26, 2024
@Laffery Laffery added the PR: need-test Test is necessary for code changes. label Nov 26, 2024
@ParsaArvanehPA
Copy link
Copy Markdown
Contributor Author

unit tests failed with error, please solve this issue first @ParsaArvanehPA

anchor property (nzChange) should emit nzChange when scrolling to the anchor

@ParsaArvanehPA I had tried to fix this CI issue, but all my efforts didn't work.

Your previous workaround which is to multiply the throttleTime by 20 FAILs. We should make it passed in a right way. Please take a look.

Thanks @Laffery
I'm on it 👍

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