-
Notifications
You must be signed in to change notification settings - Fork 25
feat: set view mode e.G tiles or table view globally, add condensed view to Spaces view #1306
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
Conversation
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.
Pull Request Overview
Globalizes folder view mode selection across routes and introduces a condensed table view for project spaces.
- Standardizes view mode query key usage (removes per-route prefix) to make selection global.
- Adds condensed table view extension to project spaces.
- Updates Projects view and related composables to consume the new global view mode.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web-pkg/src/components/ViewOptions.vue | Removes route-scoped query key for view mode persistence. |
| packages/web-app-files/tests/unit/views/spaces/Projects.spec.ts | Adjusts test mocking for view mode (introduces duplicate mock). |
| packages/web-app-files/src/views/spaces/Projects.vue | Switches to globally provided viewMode and passes it to the folder view component. |
| packages/web-app-files/src/composables/resourcesViewDefaults/useResourcesViewDefaults.ts | Uses unscoped global query key for view mode. |
| packages/web-app-files/src/composables/extensions/useFolderViews.ts | Exposes condensed table view to project spaces extension point. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } | ||
| }) | ||
|
|
||
| vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString()) |
Copilot
AI
Oct 2, 2025
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.
The second mockImplementation call immediately overrides the first, making the includeDisabled.toString() return path untestable. If you intended different sequential return values, use mockImplementationOnce twice or mockReturnValueOnce chain; if not, remove the first line.
| vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString()) |
| }) | ||
|
|
||
| vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString()) | ||
| vi.mocked(queryItemAsString).mockImplementation(() => 'resource-table') |
Copilot
AI
Oct 2, 2025
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.
[nitpick] The literal 'resource-table' should use the corresponding constant/enumeration (e.g. FolderViewModeConstants.name.table or similar) to prevent drift if the identifier changes. This keeps tests aligned with production definitions.
Description
Related Issue
How Has This Been Tested?
Types of changes