From bc8e77be9a4e17b52ad59a148084dfd051a1210c Mon Sep 17 00:00:00 2001 From: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:44:41 +0530 Subject: [PATCH] feat: Queries and JS tabs redesign (#31006) ## Description This PR introduces significant enhancements to the queries and JS tabs design, aimed at improving user experience. #### PR fixes following issue(s) Fixes https://github.com/appsmithorg/appsmith/issues/30862 #### Media https://github.com/appsmithorg/appsmith/assets/87797149/8453de14-ee78-4835-8528-8a94cd84d660 #### Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed ## Summary by CodeRabbit - **New Features** - Enhanced UI with a new icon and tooltip for better visual cues in the editor tabs. - Introduced a styled icon container in the `QueryTab` for displaying the current plugin icon next to the tab title. - Added a new constant for default split screen width, improving layout responsiveness. - **Style** - Updated styling properties across various components for improved alignment, background color, and overall aesthetics. - Introduced a `StyledButton` component for a more customized button appearance in split-screen tabs. - Adjusted tab width and styling for a cleaner, more organized tab display. - **Refactor** - Improved layout behavior of editor tabs by adjusting height properties and removing unnecessary overflow and padding. --- app/client/package.json | 2 +- app/client/src/constants/AppConstants.ts | 1 + .../EditorPane/components/SegmentedHeader.tsx | 3 +- .../pages/Editor/IDE/EditorTabs/Container.tsx | 7 ++- .../pages/Editor/IDE/EditorTabs/FileTabs.tsx | 8 +--- .../Editor/IDE/EditorTabs/FullScreenTabs.tsx | 3 +- .../src/pages/Editor/IDE/EditorTabs/JSTab.tsx | 9 +++- .../pages/Editor/IDE/EditorTabs/QueryTab.tsx | 34 +++++++++++++- .../Editor/IDE/EditorTabs/SplitScreenTabs.tsx | 3 +- .../IDE/EditorTabs/StyledComponents.tsx | 47 ++++++++++++++++++- app/client/src/pages/Editor/IDE/hooks.ts | 7 ++- app/client/yarn.lock | 10 ++-- 12 files changed, 108 insertions(+), 26 deletions(-) diff --git a/app/client/package.json b/app/client/package.json index 0611820c77..70558ca525 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -108,7 +108,7 @@ "cypress-log-to-output": "^1.1.2", "dayjs": "^1.10.6", "deep-diff": "^1.0.2", - "design-system": "npm:@appsmithorg/design-system@2.1.31", + "design-system": "npm:@appsmithorg/design-system@2.1.32", "design-system-old": "npm:@appsmithorg/design-system-old@1.1.14", "downloadjs": "^1.4.7", "echarts": "^5.4.2", diff --git a/app/client/src/constants/AppConstants.ts b/app/client/src/constants/AppConstants.ts index 7d20257c3b..74000e26d9 100644 --- a/app/client/src/constants/AppConstants.ts +++ b/app/client/src/constants/AppConstants.ts @@ -13,6 +13,7 @@ export const DEFAULT_ENTITY_EXPLORER_WIDTH = 256; export const DEFAULT_PROPERTY_PANE_WIDTH = 288; export const APP_SETTINGS_PANE_WIDTH = 525; export const DEFAULT_EDITOR_PANE_WIDTH = 255; +export const DEFAULT_SPLIT_SCREEN_WIDTH = "40.4vw"; const APP_STORE_NAMESPACE = "APPSMITH_LOCAL_STORE"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentedHeader.tsx b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentedHeader.tsx index d8046220bb..52e01783da 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentedHeader.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentedHeader.tsx @@ -81,12 +81,13 @@ const SegmentedHeader = () => { ) : null} {isSideBySideEnabled && editorMode === EditorViewMode.SplitScreen ? (