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(module:anchor): url fragment change on click - nzReplace #8464

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

ParsaArvanehPA
Copy link
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
Copy link

zorro-bot bot commented Mar 24, 2024

This preview will be available after the AzureCI is passed.

Copy link

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).

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.

Copy link
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
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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants