-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(remix-dev): flat routes #4880
Conversation
🦋 Changeset detectedLatest commit: 3f3129e The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. the .route
suffix is actually in the original spec. Is there a reason this is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. a lot of the code there was to make it easier to keep the enhanced version in sync with the core one. I think the enhancements will be a good proving ground for including in future core. By stripping all that out, I think it's going to be more difficult to extend in the future.
7e579db
to
d08c0c0
Compare
Integrates flat routes function into config
Signed-off-by: Logan McAnsh <logan@mcan.sh>
eeb06f3
to
31450e1
Compare
Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: use invariant instead of enforcing the type Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: use for...of Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: remove .route Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: use _index for index routes Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: replace magic characters with defined variable Signed-off-by: Logan McAnsh <logan@mcan.sh> fix: update default parentRoutePath Signed-off-by: Logan McAnsh <logan@mcan.sh> test: add test cases from old route convention Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: update handling of special characters Signed-off-by: Logan McAnsh <logan@mcan.sh> chore: export route convention helpers Signed-off-by: Logan McAnsh <logan@mcan.sh> chore(flat-routes): add support for optional and escape route segments Signed-off-by: Logan McAnsh <logan@mcan.sh> chore(flat-routes): add support for optional and escape route segments Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
31450e1
to
50a4393
Compare
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
@mcansh I has the same confusion, but I think its actually correct. But its very unintuitive. I'm thinking that we'll probably want to rethink how some of this stuff works at some point to align with intuitions a bit better. |
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Co-authored-by: Pedro Cattori <pcattori@gmail.com> Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Co-authored-by: Pedro Cattori <pcattori@gmail.com>
Co-authored-by: Pedro Cattori <pcattori@gmail.com> Signed-off-by: Logan McAnsh <logan@mcan.sh>
"parentId": undefined, | ||
"parentId": "root", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should double-check that parentId
wasn't intentionally undefined
for some reason. Like does parentId
get surfaced in the route meta that is available to users? Do users rely on it being undefined
? Or is this value solely used for defining routes internally?
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
🤖 Hello there, We just published version Thanks! |
Hey! I tried the nightly release which includes this PR and I think I found an issue, based on the following file structure:
What looks wrong to me is that I can see this footer directly on screen by hitting Before you ask, I did activate the future flag :) |
@manzano78 You should probably create a new issue instead of commenting on a closed PR. Anyway, yes. If you are using flat-folders convention (where routes are folder names instead of filenames), then _index.tsx should be treated as the route and everything else as colocated files. Can you run Thanks! |
note: this test is currently failing, but i believe that the "expected" result is actually wrong and should actually be":$dollabills?/.lol?/what?/$?/*"
, so i think we have a bug indefineConventionalRoutes
where this test originated from.Closes: #
Testing Strategy:
tests and
yarn playground:new