-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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: load fields from composable instead of fields menu #8519
Conversation
WalkthroughWalkthroughThe recent updates aim to improve the functionality and performance of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/nc-gui/components/smartsheet/grid/Table.vue (1 hunks)
- packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue (3 hunks)
- packages/nc-gui/components/tabs/Smartsheet.vue (3 hunks)
- packages/nc-gui/composables/useViewColumns.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/nc-gui/components/smartsheet/grid/Table.vue
Additional comments not posted (1)
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue (1)
Line range hint
1-1
: The removal ofrootFields
andsortedAndFilteredFields
fromFieldsMenu.vue
aligns with the PR's objective to centralize field management. Ensure that this component now correctly uses the data provided from the composable and that there are no references to the removed variables left in the component.Verification successful
The
FieldsMenu.vue
component no longer referencesrootFields
andsortedAndFilteredFields
, and it now uses several composables (useGlobal
,useNuxtApp
,useViewColumnsOrThrow
,useSmartsheetStoreOrThrow
,useUndoRedo
, anduseMenuCloseOnEsc
). This aligns with the PR's objective to centralize field management and simplify the component.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `FieldsMenu.vue` does not reference the removed variables and uses the data from the composable correctly. # Test: Search for the usage of `rootFields` and `sortedAndFilteredFields` in `FieldsMenu.vue`. Expect: No occurrences. rg --type vue $'rootFields|sortedAndFilteredFields' packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vueLength of output: 141
Script:
#!/bin/bash # Description: Verify that `FieldsMenu.vue` does not reference the removed variables and uses the data from the composable correctly. # Test: Search for the usage of `rootFields` and `sortedAndFilteredFields` in `FieldsMenu.vue`. Expect: No occurrences. rg 'rootFields|sortedAndFilteredFields' packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vueLength of output: 102
Script:
#!/bin/bash # Description: Verify that `FieldsMenu.vue` uses the centralized composable for data management. # Test: Search for the usage of the composable in `FieldsMenu.vue`. Expect: At least one occurrence. rg 'useComposable' packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vueLength of output: 79
Script:
#!/bin/bash # Description: List all imports in `FieldsMenu.vue` to identify any composables being used. # Test: List all import statements in `FieldsMenu.vue`. rg '^import' packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vueLength of output: 308
Script:
#!/bin/bash # Description: Search for any other composables or methods being used within `FieldsMenu.vue`. # Test: Search for the usage of any composables or methods in `FieldsMenu.vue`. rg 'use[A-Za-z]+' packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vueLength of output: 388
Uffizzi Preview |
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- packages/nc-gui/components/smartsheet/grid/Table.vue (1 hunks)
- packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue (3 hunks)
- packages/nc-gui/components/tabs/Smartsheet.vue (2 hunks)
- packages/nc-gui/composables/useViewColumns.ts (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- packages/nc-gui/components/smartsheet/grid/Table.vue
- packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
- packages/nc-gui/components/tabs/Smartsheet.vue
- packages/nc-gui/composables/useViewColumns.ts
Signed-off-by: mertmit <mertmit99@gmail.com>
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- packages/nc-gui/components/shared-view/Calendar.vue (1 hunks)
- packages/nc-gui/components/shared-view/Gallery.vue (1 hunks)
- packages/nc-gui/components/shared-view/Grid.vue (1 hunks)
- packages/nc-gui/components/shared-view/Kanban.vue (1 hunks)
- packages/nc-gui/components/shared-view/Map.vue (1 hunks)
- packages/nc-gui/components/smartsheet/grid/Table.vue (1 hunks)
- packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue (3 hunks)
- packages/nc-gui/components/tabs/Smartsheet.vue (3 hunks)
- packages/nc-gui/composables/useViewColumns.ts (2 hunks)
Files skipped from review due to trivial changes (2)
- packages/nc-gui/components/shared-view/Calendar.vue
- packages/nc-gui/components/shared-view/Map.vue
Files skipped from review as they are similar to previous changes (4)
- packages/nc-gui/components/smartsheet/grid/Table.vue
- packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
- packages/nc-gui/components/tabs/Smartsheet.vue
- packages/nc-gui/composables/useViewColumns.ts
Additional comments not posted (3)
packages/nc-gui/components/shared-view/Gallery.vue (1)
Line range hint
1-1
: Ensure that the removal ofFieldsInj
provider does not break dependent components.Verification successful
The verification confirms that no components are trying to inject
FieldsInj
, indicating that the removal of theFieldsInj
provider does not break any dependent components.
- No occurrences of
inject(FieldsInj)
were found in the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Test: Search for `inject(FieldsInj)` in Vue components. Expect: No occurrences. rg --type vue $'inject(FieldsInj)'Length of output: 63
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Test: Search for `inject(FieldsInj)` in Vue components. Expect: No occurrences. rg 'inject(FieldsInj)' --glob '*.vue'Length of output: 39
packages/nc-gui/components/shared-view/Kanban.vue (1)
Line range hint
1-1
: Ensure that the removal ofFieldsInj
provider does not break dependent components.Verification successful
The verification confirms that no components are dependent on the
FieldsInj
injection.
- No occurrences of
inject(FieldsInj)
were found in the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Test: Search for `inject(FieldsInj)` in Vue components. Expect: No occurrences. rg --type vue $'inject(FieldsInj)'Length of output: 63
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Test: Search for `inject(FieldsInj)` in Vue components. Expect: No occurrences. rg --glob '*.vue' $'inject(FieldsInj)'Length of output: 39
packages/nc-gui/components/shared-view/Grid.vue (1)
Line range hint
1-1
: Ensure that the removal ofFieldsInj
provider does not break dependent components.Verification successful
Ensure no components are injecting
FieldsInj
The previous script did not produce any output, indicating that no components are injecting
FieldsInj
. This suggests that the removal ofprovide(FieldsInj, columns)
fromGrid.vue
should not break any dependent components.
- No occurrences of
inject(FieldsInj)
were found in the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Test: Search for `inject(FieldsInj)` in Vue components. Expect: No occurrences. rg --type vue $'inject(FieldsInj)'Length of output: 63
Script:
#!/bin/bash # Description: Check for any component still trying to inject `FieldsInj`. # Find all Vue files and search for `inject(FieldsInj)` within them. fd -e vue -x rg 'inject(FieldsInj)' {}Length of output: 42
Change Summary
Change type