-
Notifications
You must be signed in to change notification settings - Fork 57
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(file-router): get back Flow AutoLayout #2931
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2931 +/- ##
==========================================
- Coverage 92.89% 92.79% -0.10%
==========================================
Files 83 84 +1
Lines 3137 3149 +12
Branches 757 759 +2
==========================================
+ Hits 2914 2922 +8
- Misses 171 175 +4
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Now there is at least the issue that in file-routes.ts the flowLayout
is moved from a boolean property in createRoute to be a config parameter.
This has the issue that when creating the file-routes.ts we do not have the actual config from the tsx file available and the marking is done according to the available layouts.
This is remediesd in createViewConfigJson where the file-routes.ts flowLayout was set if config.flowLayout === null | undefined
, but now it is always set so we do not set it to the user defined value at all.
So now if you have a @Layout("/")
RouterLayout and have a hilla view with the configuration flowLayout: false
it will still be shown in the layout as the file-routes definition overrides any user definitions.
I also get the exception
Which is fixed by removing the extension from the imports, but as this is a generated file it is a bit strange to get an exception. |
@caalador, thanks for the review.
Oh, thanks! I definitely need a test for that...
That's a bug, sorry. Already fixed 😅 P.S. Don't hesitate to use |
@caalador, does the latest update fix the issue with config overriding you mentioned? |
The layouts seem to work as expected (unless I forgot some combination as there are many), but now the imports get this strange full path in the middle and do not work 😓
|
That darn windows paths... 🥲 Let me fix it |
That's the reason why I've taken on the burden of a windows machine for development |
Quality Gate passedIssues Measures |
@caalador, what about now? I hope it works... |
Now it seems to work correctly. 👍 |
Great! Could you approve it, so we can merge it? |
* fix(file-router): get back the Flow AutoLayout feature * test(file-router): add tests for createRoute & extendModule * fix(file-router): address CI failures * fix(generator-utils): make extension optional * fix(file-router): address config overridding issue * fix(file-router): correct Windows paths
Fixes #2928