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

Fix remix depreciation warnings #614

Merged
merged 7 commits into from Apr 15, 2023

Conversation

Eakam1007
Copy link
Contributor

@Eakam1007 Eakam1007 commented Apr 13, 2023

Resolves #320

Fixed our remix depreciation warnings following their guide

Changes made

  • Updated remix config to use v2 route layout
  • Rearranged the entire routes folder to use the new v2 route convention. This moves routes out of folders into just files which are easier to see
  • Renamed the layout file _index.tsx to _auth.tsx. This was needed because now the index routes are specified by _index.tsx, and it was not possible to specify the index route's layout as _index.tsx
  • Updated remix config to use v2 formMethod. I found no instance of formMethod anywhere so nothing else was changed for this
    (Summary of v1 vs v2: navigation.formMethod === "post"; should now be navigation.formMethod === "POST"; etc)
  • Updated remix config to use v2 ErrorBoundry API
  • Merged all existing CatchBoundry and ErrorBoundy into one ErrorBoundry for each file with checks to render different error layouts. CatchBoundry no longer exists in v2
  • Updated remix config to use v2 meta
  • Updated root meta function to return array of objects for meta tags instead of a single object with key value pairs

@Eakam1007 Eakam1007 added this to the Milestone 1.0a milestone Apr 13, 2023
@Eakam1007 Eakam1007 self-assigned this Apr 13, 2023
@humphd
Copy link
Contributor

humphd commented Apr 13, 2023

Discussion on Slack: based on https://remix.run/docs/en/main/file-conventions/route-files-v2#nested-layouts-without-nested-urls, we think we should use _auth.* as our pathless, layout route prefix.

humphd
humphd previously approved these changes Apr 14, 2023
@humphd humphd requested a review from sfrunza13 April 14, 2023 15:57
sfrunza13
sfrunza13 previously approved these changes Apr 14, 2023
Copy link
Contributor

@sfrunza13 sfrunza13 left a comment

Choose a reason for hiding this comment

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

Semantically I think that using _auth makes sense because we have to be authenticated for everything to do with starchart. I like it.

@Eakam1007 Eakam1007 dismissed stale reviews from sfrunza13 and humphd via 7f61405 April 15, 2023 15:43
@Eakam1007 Eakam1007 marked this pull request as ready for review April 15, 2023 15:43
@Eakam1007
Copy link
Contributor Author

Updated to fix the rest of the depreciation warnings + rebased with main

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Thanks for doing the error/catch boundary change too. This looks great.

@Eakam1007 Eakam1007 merged commit 8bb55ce into DevelopingSpace:main Apr 15, 2023
8 checks passed
@Eakam1007 Eakam1007 deleted the 320-remix-flat-routes branch April 15, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Remix deprecation warnings
3 participants