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

Support custom routing #18

Merged
merged 3 commits into from
Jul 22, 2023
Merged

Conversation

lean-dev
Copy link
Contributor

@lean-dev lean-dev commented Jul 21, 2023

Description

Detecting whether a route is a pure layout route breaks in some cases, if the code only relies on the naming conventions. Probably it is more safe to inspect the EntryRoute properties and inspect parent routes of index routes as well.

Fixes #17

Extract the logic to determine the route type in an extra file (as it is used twice - in active page tab and in the routes tab).

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Mainly just by using the remix-app-for-testing and verifying that everything still works as intended after adding more routes, that broke the original implementation.

Checklist:

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AlemTuzlak
Copy link
Contributor

@lean-dev Thank you for doing this, I didn't have the time to check it before today, merging!

@AlemTuzlak AlemTuzlak merged commit aad4ae0 into forge-42:main Jul 22, 2023
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.

Relaying only on the naming of route.id breaks layout route detection
2 participants