chore: Moving the util for grouping & sorting entity list to a common folder#39440
Conversation
WalkthroughThe pull request introduces a new utility module that provides a function for grouping and sorting entity items. Existing selectors have been refactored to import and use this centralized function instead of implementing it locally. Additionally, the PR updates the component spacing in both JS and Query explorers and adjusts the import/export of the ListQuery component. Overall, the changes reorganize the code into more modular and maintainable units without altering the external behavior. Changes
Sequence Diagram(s)sequenceDiagram
participant Selector as Selector/Component
participant Util as groupAndSortEntitySegmentList
participant Lodash as Lodash Utilities
Selector->>Util: Call groupAndSortEntitySegmentList(items)
Util->>Lodash: groupBy(items, group property)
Lodash-->>Util: Return grouped items
Util->>Lodash: sortBy(items, title)
Lodash-->>Util: Return sorted items
Util-->>Selector: Return grouped & sorted list
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (7)
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
… folder (appsmithorg#39440) ## Description Moving the util for grouping & sorting entity list to a common folder so that it can be re-used in other IDEs. Fixes [appsmithorg#38906](appsmithorg#38906) ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13527015959> > Commit: cab5b52 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13527015959&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 25 Feb 2025 18:29:03 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Introduced a utility function for grouping and sorting entity items, improving organization and maintainability. - Updated selectors to utilize the new grouping and sorting utility, enhancing code structure. - **Style** - Adjusted spacing between list items in both the JavaScript and Query explorers for a more balanced layout. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Moving the util for grouping & sorting entity list to a common folder so that it can be re-used in other IDEs.
Fixes #38906
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13527015959
Commit: cab5b52
Cypress dashboard.
Tags:
@tag.AllSpec:
Tue, 25 Feb 2025 18:29:03 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit