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

allow Redirect to use navigate options.replace #4704

Merged
merged 5 commits into from Mar 12, 2022

Conversation

odjhey
Copy link
Contributor

@odjhey odjhey commented Mar 9, 2022

Allow history overwrite(replace?) when using the <Redirect> component from @redwoodjs/router

<Redirect
      to={routes.somePage({ _limit: '10', _offset: '0', })}
      options={{ replace: true }}   // <--- ALLOW THIS
/>

@thedavidprice thedavidprice requested a review from Tobbe March 9, 2022 15:15
@Tobbe
Copy link
Member

Tobbe commented Mar 10, 2022

Thanks @odjhey. I like this!

Could you please try to add some tests as well? Let me know if you need any pointers. We'll also need doc updates for this.

@Tobbe Tobbe added release:feature This PR introduces a new feature next-release/update-docs labels Mar 10, 2022
@odjhey
Copy link
Contributor Author

odjhey commented Mar 10, 2022

@Tobbe , sure thing! i'll see what I can do, will reach out when I get stuck! Thank you!

@odjhey
Copy link
Contributor Author

odjhey commented Mar 10, 2022

@Tobbe, I have added a test to cover the Redirect options.replace prop, please check.
eb135c6

As for the docs, Im unable to find the right place to do the update, could you please point me to the right repo/directory, by docs, do you mean the rw website?

Thanks and cheers!

@Tobbe
Copy link
Member

Tobbe commented Mar 10, 2022

@Tobbe
Copy link
Member

Tobbe commented Mar 10, 2022

The test you added was really good. Just made a suggestion for another comment explaining what's going on

Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
@odjhey
Copy link
Contributor Author

odjhey commented Mar 10, 2022

The test you added was really good. Just made a suggestion for another comment explaining what's going on

Cool .")b Thanks! I have included your proposed changes in this PR.
The docs is on a different repo, will find my way there and do docu updates accordingly, anything else I need to update for this PR?

@Tobbe Tobbe enabled auto-merge (squash) March 12, 2022 16:53
@Tobbe Tobbe merged commit 71380ba into redwoodjs:main Mar 12, 2022
@jtoar jtoar added this to the next-release milestone Mar 12, 2022
@Tobbe
Copy link
Member

Tobbe commented Mar 12, 2022

This was a great first PR @odjhey. I'm already looking forward to the next one 😄

@odjhey
Copy link
Contributor Author

odjhey commented Mar 13, 2022

@Tobbe thanks to your awesome work :) will for sure send your way any future updates we think is godo. cheers! ".)v

dac09 added a commit to dac09/redwood that referenced this pull request Mar 13, 2022
…ecks-smoke-test

* 'main' of github.com:redwoodjs/redwood:
  allow Redirect to use navigate options.replace (redwoodjs#4704)
  Update dependency eslint to v8.11.0 (redwoodjs#4727)
  Update dependency systeminformation to v5.11.8 (redwoodjs#4726)
  Update dependency @clerk/clerk-sdk-node to v2.9.9 (redwoodjs#4720)
  Fix failing codemod test for RedwoodDevFatalErrorPage (redwoodjs#4723)
  Update dependency @clerk/clerk-js to v2.17.4 (redwoodjs#4719)
  Pretty print query in DevFatalErrorPage for better DX and readability (redwoodjs#4696)
@thedavidprice thedavidprice modified the milestones: next-release, v0.50.0 Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

None yet

4 participants