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: support route index and nested url without nested layout #6020

Merged
merged 11 commits into from
Mar 9, 2023

Conversation

luhc228
Copy link
Collaborator

@luhc228 luhc228 commented Mar 6, 2023

  1. Ref: 路由 index 目录特殊规则说明 #5880
  2. 支持创建 a.b.c.tsx 扁平文件名代替 a/b/c.tsx嵌套目录 来生成 /a/b/c 嵌套 url。Ref: https://remix.run/docs/en/main/guides/routing#nested-urls-without-nesting-layouts

@luhc228 luhc228 added the need review Need Review label Mar 6, 2023
@ClarkXia
Copy link
Collaborator

ClarkXia commented Mar 6, 2023

冲突

const nextChar = i < partialRouteId.length - 1 ? partialRouteId.charAt(i + 1) : undefined;

function isNewEscapeSequence() {
Copy link
Collaborator

@ClarkXia ClarkXia Mar 6, 2023

Choose a reason for hiding this comment

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

函数声明尽量不要在循环体内,是不是直接变量声明就行了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@ClarkXia
Copy link
Collaborator

ClarkXia commented Mar 6, 2023

test case 需要覆盖新规则

}

if (isNewEscapeSequence()) {
inEscapeSequence++;
Copy link
Collaborator

Choose a reason for hiding this comment

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

建议加个例子,说明下处理的场景

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@luhc228
Copy link
Collaborator Author

luhc228 commented Mar 7, 2023

test case 需要覆盖新规则

done

@luhc228 luhc228 merged commit 71bb754 into release/next Mar 9, 2023
@luhc228 luhc228 deleted the feat/support-route-index branch March 9, 2023 02:17
@ClarkXia ClarkXia mentioned this pull request Mar 9, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need review Need Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants