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

App routes file source tree using code analysis #375

Merged
merged 94 commits into from
Dec 4, 2024
Merged

Conversation

stephlow
Copy link
Member

@stephlow stephlow commented Nov 26, 2024

Index based keyboard navigation is broken atm in the file tree

  • Enable analysis by default
  • Tabs to switch between tree and list view
  • Searchable
  • Fixed refresh issue with query key's
  • Collapses tree nodes if there's only one child

Expanded example:

Screen.Recording.2024-11-26.at.14.18.48.mov

Single file example:

Screen.Recording.2024-11-26.at.14.17.45.mov

@flenter
Copy link
Member

flenter commented Dec 3, 2024

I've tweaked the UI a bit in order to improve the looks:
image

@mies
Copy link
Contributor

mies commented Dec 4, 2024

Looks great! How difficult would it be to fix the keyboard navigation?

@flenter
Copy link
Member

flenter commented Dec 4, 2024

I have fixed the issue where the currently active route is highlighted (though not in a pretty way). And I'm now looking at the selection. It is a bit more involved because keyboard navigation also can also go to the custom routes

@mies
Copy link
Contributor

mies commented Dec 4, 2024

sounds good! Keyboard Navigation would still be a nice to have for today's release 🚀

@flenter
Copy link
Member

flenter commented Dec 4, 2024

I've got a basic version of it working. However when switching between different views, all collapsed/expanded state gets reset and also: keyboard navigation does not take into consideration that you can collapse tree items. So it could benefit from a refactor

@flenter flenter force-pushed the source-tree branch 2 times, most recently from 7fc61ff to 4106965 Compare December 4, 2024 09:24
And fix filtered keyboard navigation
@@ -47,7 +47,7 @@ export const ProbedRouteSchema = z.object({
currentlyRegistered: z.boolean(),
registrationOrder: z.number().default(-1),
routeOrigin: z.enum(["discovered", "custom", "open_api"]),
openApiSpec: z.string().optional(),
openApiSpec: z.string().nullish().optional(),
Copy link
Member

Choose a reason for hiding this comment

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

This the second definition of the app route we should investigate if we can delete one of them. But given the deadline, i haven't done this for this PR

@flenter
Copy link
Member

flenter commented Dec 4, 2024

Keyboard navigation should be fixed now

keturiosakys
keturiosakys approved these changes Dec 4, 2024
@keturiosakys keturiosakys merged commit 8499b16 into main Dec 4, 2024
4 checks passed
@keturiosakys keturiosakys deleted the source-tree branch December 4, 2024 15:43
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.

5 participants