appsmith
appsmith copied to clipboard
chore: optimise pages API in view mode
Description
This PR addresses issue https://github.com/appsmithorg/appsmith/issues/35881 by optimizing the pages API specifically for view mode. The primary goal is to enhance the performance and efficiency of the API, ensuring a smoother and faster user experience when viewing pages. The changes involve refactoring existing methods, introducing new ones, and updating test cases to align with the new functionality.
TL;DR It includes the following changes
- Addition of projection for the query that fetches pages by applicationId in view mode
- Removal of sorting workspaces and their resources in view mode
Fixes https://github.com/appsmithorg/appsmith/issues/35881
Automation
/ok-to-test tags="@tag.All"
:mag: Cypress test results
[!TIP] 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10584240553 Commit: 9e77c0029246f04824791a025515553668437735 Cypress dashboard. Tags:
@tag.All
Spec:
Wed, 28 Aug 2024 00:23:02 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
Summary by CodeRabbit
-
New Features
- Introduced a method to retrieve new pages by application ID with customizable field inclusion.
- Enhanced data retrieval capabilities with more granular control over returned fields.
-
Bug Fixes
- Improved logic for handling view mode in page retrieval based on application mode.
-
Documentation
- Updated tests to reflect changes in published page visibility, ensuring accurate assertions.
-
Refactor
- Streamlined methods for creating application pages and improved control flow for data retrieval.
-
Tests
- Enhanced asynchronous behavior in test methods for better execution control.