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(plugin-client-redirects): keep the query string + hash #8227

Merged
merged 6 commits into from Oct 20, 2022
Merged

feat(plugin-client-redirects): keep the query string + hash #8227

merged 6 commits into from Oct 20, 2022

Conversation

Xabilahu
Copy link
Contributor

@Xabilahu Xabilahu commented Oct 19, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Closes #8206

Test Plan

yarn test

Test Suites: 143 passed, 143 total
Tests:       1953 passed, 1953 total
Snapshots:   616 passed, 616 total
Time:        19.238 s
Ran all test suites.
Done in 19.99s.

Test links

Deploy preview: https://deploy-preview-8227--docusaurus-2.netlify.app/

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 19, 2022
@netlify
Copy link

netlify bot commented Oct 19, 2022

[V2]

Name Link
🔨 Latest commit fe7b92c
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63516d8c74dc5a00097444eb
😎 Deploy Preview https://deploy-preview-8227--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Oct 19, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 77 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 73 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber slorber changed the title feat(plugin-client-redirects): keep the query string feat(plugin-client-redirects): keep the query string + hash Oct 20, 2022
@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Oct 20, 2022
@slorber
Copy link
Collaborator

slorber commented Oct 20, 2022

Thanks, LGTM 👍

Just added support for keeping the hash too + fixed a little client redirect bug on our own site

Test URL: https://deploy-preview-8227--docusaurus-2.netlify.app/docs/introduction?qs=true#someHash

Note: this assumes that the redirect URL does not already contain a query string already, which is likely to be the case but maybe we'll need to merge(window.location.search,destinationUrl.search) later 🤷‍♂️ good enough for now 👍

@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Oct 20, 2022
@slorber slorber merged commit 5ddcbf4 into facebook:main Oct 20, 2022
@Xabilahu
Copy link
Contributor Author

Thanks @slorber for the adjustments! 😉

slorber added a commit that referenced this pull request Oct 28, 2022
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docusaurus-plugin-client-redirects does not keep the query string.
3 participants