Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

fix: prevent redirection flag #4113

Merged
merged 7 commits into from
Nov 8, 2022
Merged

fix: prevent redirection flag #4113

merged 7 commits into from
Nov 8, 2022

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Nov 8, 2022

What it solves

Preventing redirection to new deployment.

How this PR fixes it

When the no-redirect search parameter is present, redirection to the new deployment doesn't occur.

How to test it

Add ?no-redirect=true to the end of the URL and observe that the redirection is not present in the banner.

Note: the banner close flag will need to be removed from the localStorage.

@iamacook iamacook self-assigned this Nov 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@iamacook iamacook requested a review from DiogoSoaress November 8, 2022 09:54
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Nov 8, 2022

Pull Request Test Coverage Report for Build 3419349979

  • 0 of 12 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 41.796%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/PsaBanner/index.tsx 0 12 0.0%
Totals Coverage Status
Change from base Build 3408444922: -0.04%
Covered Lines: 4777
Relevant Lines: 10433

💛 - Coveralls

src/components/PsaBanner/index.tsx Outdated Show resolved Hide resolved
Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Tested, adding ?no-redirect=true does prevent the redirect.
Unfortunately, this param isn't preserved when navigating to another route.
I'd suggest to set the banner_closed LS to true if the query param is present.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Tested, works as expected. After a refresh, there's no redirect if the previous visit had no-redirect. ✅

@katspaugh katspaugh merged commit 63cca20 into dev Nov 8, 2022
@katspaugh katspaugh deleted the banner-redirect-flag branch November 8, 2022 12:35
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants