Skip to content
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

feat: Variable width for property pane size and side by side editor #30550

Merged
merged 22 commits into from
Feb 5, 2024

Conversation

albinAppsmith
Copy link
Collaborator

@albinAppsmith albinAppsmith commented Jan 23, 2024

Description

This PR adds adaptive width to property pane and side by side editor if screen size if bigger than 1440.
https://www.notion.so/appsmith/IDE-Solution-behaviour-8607a3b4df254970a77bd077290d3690#05be7aee530e4669ab6c79bb34ffadc7

PR fixes following issue(s)

Fixes #30086

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

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Speedbreak features have been covered
  • Test plan covers all impacted features and 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
    • Introduced flexibility in property pane width settings, allowing both number and string inputs.
    • Added side-by-side mode for improved layout management.
    • Implemented new constants for default sidebar, editor pane, and design base widths.
    • Enhanced editor pane with transition effects and dynamic width adjustments based on editor mode.
    • Added UI control for canvas scaling, allowing users to adjust the canvas size.
  • Enhancements
    • Updated PropertyPaneWrapper to use new hooks for dynamic width management.
    • Improved device detection with new functions for better layout responsiveness.
  • Refactor
    • Renamed useEditorPaneWidth hook to useIDEWidths for clearer purpose and functionality.
  • Style
    • Added CSS rule to limit maximum width of segmented header elements for better layout control.

Copy link
Contributor

coderabbitai bot commented Jan 23, 2024

Walkthrough

The changes primarily aim at enhancing user experience by making the widths of the Editor Segments and Property Pane adapt to the user's screen size. This adjustment ensures a more spacious and flexible code area, especially for users with larger screens, and improves the interface when using the application in split-screen mode. The modifications span across various components and hooks, introducing new constants for default widths, updating type definitions to accommodate flexible sizing, and refining the logic for dynamic layout adjustments based on the editor mode and device characteristics.

Changes

File Path Change Summary
app/client/src/actions/propertyPaneActions.ts Updated setPropertyPaneWidthAction to accept `number
app/client/src/components/editorComponents/PropertyPaneSidebar.tsx Introduced new import, updated Props interface, made onDragEnd mandatory, and added conditional rendering based on isSideBySideEnabled.
app/client/src/constants/AppConstants.ts Added constants for default sidebar, editor pane widths, and design base width.
app/client/src/pages/Editor/IDE/EditorPane/index.tsx Renamed hook and updated return value structure; added transition effect to class name.
app/client/src/pages/Editor/IDE/hooks.ts & app/client/src/utils/hooks/useDeviceDetect.ts Introduced new hooks and constants for dynamic layout management.
app/client/src/pages/Editor/WidgetsEditor/PropertyPaneWrapper.tsx Utilized new hooks for property pane width management; revised logic for side-by-side mode.
app/client/src/reducers/uiReducers/propertyPaneReducer.tsx Added a new constant and updated logic for setting property pane width.
app/client/src/utils/hooks/useDynamicAppLayout.tsx Updated to import and use useCurrentEditorState hook and EditorEntityTab constant.

Assessment against linked issues

Objective Addressed Explanation
Proportional Entity Explorer and Property Pane Widths (#30086) The changes introduce dynamic width management for the Editor Segments and Property Pane, making them proportional to the screen size without specific explanation needed.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added IDE Navigation Issues/feature requests related to IDE navigation, and context switching New Developers Pod Issues that new developers face while exploring the IDE Task A simple Todo Enhancement New feature or request labels Jan 23, 2024
@albinAppsmith
Copy link
Collaborator Author

/ok-to-test tags="@tag.All"

Copy link

Whoa, @tag.All spotted in your test suite! 🚀
While @tag.All is cool, like a catch-all net, why not try specific tags? 🏷️
Narrow down your suite with specific tags for quicker and more accurate tests! 🚀 Less waiting, more zipping through tests like a ninja!
Explore the tags documentation here

Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7624073436.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7624082814.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 30550.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-30550.dp.appsmith.com

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7624073436.
Commit: ``.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/ActionExecution/ClearStore_spec.ts

  2. cypress/e2e/Regression/ClientSide/ActionExecution/Error_handling_spec.ts
  3. cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo1_spec.ts
  4. cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo2_spec.ts
  5. cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo3_spec.ts
  6. cypress/e2e/Regression/ClientSide/ActionExecution/PostWindowMessage_spec.ts
  7. cypress/e2e/Regression/ClientSide/ActionExecution/RemoveValue_spec.ts
  8. cypress/e2e/Regression/ClientSide/ActionExecution/StoreValue_spec.ts
  9. cypress/e2e/Regression/ClientSide/ActionExecution/setInterval_spec.js
  10. cypress/e2e/Regression/ClientSide/Binding/ButtonGroup_binding_spec.js
  11. cypress/e2e/Regression/ClientSide/Binding/ButtonWidgets_NavigateTo_validation_spec.js
  12. cypress/e2e/Regression/ClientSide/Binding/ChartText_spec.js
  13. cypress/e2e/Regression/ClientSide/Binding/DatePicker_Text_spec.js
  14. cypress/e2e/Regression/ClientSide/Binding/JSObjectToInput_Spec.ts
  15. cypress/e2e/Regression/ClientSide/Binding/LoadashBasic_Spec.ts
  16. cypress/e2e/Regression/ClientSide/Binding/MomentBasic_Spec.ts
  17. cypress/e2e/Regression/ClientSide/Binding/MultiSelect_Button_Text_spec.js
  18. cypress/e2e/Regression/ClientSide/Binding/NavigateToFeatureValidation_spec.js
  19. cypress/e2e/Regression/ClientSide/Binding/Promises_1_Spec.ts
  20. cypress/e2e/Regression/ClientSide/Binding/Promises_2_Spec.ts
  21. cypress/e2e/Regression/ClientSide/Binding/SelectWidget_Spec.ts
  22. cypress/e2e/Regression/ClientSide/Binding/SmartSubstitutionWidgets_spec.js
  23. cypress/e2e/Regression/ClientSide/Binding/TabWidget_Input_spec.js
  24. cypress/e2e/Regression/ClientSide/Binding/TableV2Widgets_NavigateTo_Validation_spec.js
  25. cypress/e2e/Regression/ClientSide/Binding/TableWidgets_NavigateTo_Validation_spec.js
  26. cypress/e2e/Regression/ClientSide/Binding/TextTableV2_spec.js
  27. cypress/e2e/Regression/ClientSide/Binding/TextTable_spec.js
  28. cypress/e2e/Regression/ClientSide/Binding/Widgets_Dependancy_validation_spec.js
  29. cypress/e2e/Regression/ClientSide/Binding/aTobAndbToaBasic_Spec.ts
  30. cypress/e2e/Regression/ClientSide/Binding/xmlParser_spec.js
  31. cypress/e2e/Regression/ClientSide/BugTests/AllWidgets_Reset_Spec.ts
  32. cypress/e2e/Regression/ClientSide/BugTests/Moment_Spec.ts
  33. cypress/e2e/Regression/ClientSide/BugTests/Widget_Bug27119_Spec.ts
  34. cypress/e2e/Regression/ClientSide/DynamicHeight/Container_Scroll_spec.js
  35. cypress/e2e/Regression/ClientSide/DynamicHeight/DynamicHeight_Visibility_spec.ts
  36. cypress/e2e/Regression/ClientSide/DynamicHeight/Invisible_Widgets_spec.ts
  37. cypress/e2e/Regression/ClientSide/DynamicHeight/Tab_spec.ts
  38. cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts
  39. cypress/e2e/Regression/ClientSide/EmbedSettings/EmbedSettings_spec.js
  40. cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js
  41. cypress/e2e/Regression/ClientSide/FormNativeToRawTests/MongoConversion_spec.ts
  42. cypress/e2e/Regression/ClientSide/Git/GitSync/GitBugs_spec.js
  43. cypress/e2e/Regression/ClientSide/Git/GitWithTheming/GitWithTheming_spec.js
  44. cypress/e2e/Regression/ClientSide/Linting/BasicLint_spec.ts
  45. cypress/e2e/Regression/ClientSide/Linting/ErrorReporting_spec.ts
  46. cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ValidateAutoFillContainerWidgets_spec.js
  47. cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ValidateAutoFillContainerWithInput_spec.js
  48. cypress/e2e/Regression/ClientSide/OneClickBinding/JSONFormWidget/mongoDb_spec.ts
  49. cypress/e2e/Regression/ClientSide/OneClickBinding/JSONFormWidget/postgres_spec.ts
  50. cypress/e2e/Regression/ClientSide/OtherUIFeatures/ViewMode_spec.js
  51. cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts
  52. cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
  53. cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js
  54. cypress/e2e/Regression/ClientSide/ThemingTests/Theme_FormWidget_spec.js
  55. cypress/e2e/Regression/ClientSide/Widgets/Audio/Audio1_spec.ts
  56. cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts
  57. cypress/e2e/Regression/ClientSide/Widgets/Button/Button2_spec.ts
  58. cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonGroup2_spec.ts
  59. cypress/e2e/Regression/ClientSide/Widgets/Button/ButtonLintErrorValidation_spec.js
  60. cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js
  61. cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js
  62. cypress/e2e/Regression/ClientSide/Widgets/Button/Button_tooltip_spec.js
  63. cypress/e2e/Regression/ClientSide/Widgets/Camera/Image_Spec.ts
  64. cypress/e2e/Regression/ClientSide/Widgets/Camera/Video_Spec.ts
  65. cypress/e2e/Regression/ClientSide/Widgets/Chart/ChartDataPoint_Spec.ts
  66. cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_1.ts
  67. cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_2.ts
  68. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxGroupTest.ts
  69. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxLintErrorMultipleRowValidation_spec.js
  70. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBoxMultipleLintError_spec.js
  71. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js
  72. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.js
  73. cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts
  74. cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner2_spec.ts
  75. cypress/e2e/Regression/ClientSide/Widgets/ContainerTest2_spec.ts
  76. cypress/e2e/Regression/ClientSide/Widgets/Container_spec.js
  77. cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputDynamicCurrencyCode_spec.js
  78. cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInputTest.ts
  79. cypress/e2e/Regression/ClientSide/Widgets/Custom/CustomWidgetDefaultComponent_spec.ts
  80. cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker1_spec.js
  81. cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js
  82. cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker3_spec.ts
  83. cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePickerV2Updated_spec.js
  84. cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_Toggle_js_spec.js
  85. cypress/e2e/Regression/ClientSide/Widgets/Divider/Divider_spec.ts
  86. cypress/e2e/Regression/ClientSide/Widgets/DocumentViewer/DocumentViewer_spec.ts
  87. cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js
  88. cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js
  89. cypress/e2e/Regression/ClientSide/Widgets/Filepicker/FilePicker3_spec.ts
  90. cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js
  91. cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js
  92. cypress/e2e/Regression/ClientSide/Widgets/Image/Image2_Spec.ts
  93. cypress/e2e/Regression/ClientSide/Widgets/Image/Image3_Spec.ts
  94. cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js
  95. cypress/e2e/Regression/ClientSide/Widgets/Input/Input2_Spec.ts
  96. cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts
  97. cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js
  98. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js
  99. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormDisabled_spec.js
  100. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js
  101. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_Basic_spec.js
  102. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CurrencyField_spec.ts
  103. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_CustomField_spec.js
  104. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldChange_spec.js
  105. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_1_spec.js
  106. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldEvents_2_spec.js
  107. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js
  108. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js
  109. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FilterText_spec.js
  110. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js
  111. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js
  112. cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONFrom_Modal_spec.js
  113. cypress/e2e/Regression/ClientSide/Widgets/List/List3_spec.js
  114. cypress/e2e/Regression/ClientSide/Widgets/List/List4_1_spec.ts
  115. cypress/e2e/Regression/ClientSide/Widgets/List/List4_2_spec.js
  116. cypress/e2e/Regression/ClientSide/Widgets/List/List5_spec.js
  117. cypress/e2e/Regression/ClientSide/Widgets/List/List6_spec.js
  118. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/List_Inputs_spec.js
  119. cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_SerververSide_spec.js
  120. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js
  121. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ClientSide_spec.js
  122. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_regression_fix_spec.js
  123. cypress/e2e/Regression/ClientSide/Widgets/ListV2/PropertyPane_spec.ts
  124. cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_background_spec.ts
  125. cypress/e2e/Regression/ClientSide/Widgets/Modal/Modal_spec.ts
  126. cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js
  127. cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiTreeSelect_2_spec.ts
  128. cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js
  129. cypress/e2e/Regression/ClientSide/Widgets/Others/Canvas_scrolling_spec.js
  130. cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_spec.js
  131. cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts
  132. cypress/e2e/Regression/ClientSide/Widgets/Others/MenuButtonTest.ts
  133. cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js
  134. cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInputDynamicValue_spec.js
  135. cypress/e2e/Regression/ClientSide/Widgets/PhoneInput/PhoneInput_Part2_spec.ts
  136. cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js
  137. cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio2_spec.ts
  138. cypress/e2e/Regression/ClientSide/Widgets/Radio/Radio_spec.js
  139. cypress/e2e/Regression/ClientSide/Widgets/Rating/Rating_Widget_spec.ts
  140. cypress/e2e/Regression/ClientSide/Widgets/Select/Select2_Spec.ts
  141. cypress/e2e/Regression/ClientSide/Widgets/Select/Select_Validation_spec.js
  142. cypress/e2e/Regression/ClientSide/Widgets/Select/select_Widget_Bug_spec.js
  143. cypress/e2e/Regression/ClientSide/Widgets/Sliders/CategorySlider_spec.ts
  144. cypress/e2e/Regression/ClientSide/Widgets/Sliders/NumberSlider_spec.ts
  145. cypress/e2e/Regression/ClientSide/Widgets/Sliders/RangeSlider_spec.ts
  146. cypress/e2e/Regression/ClientSide/Widgets/Statbox/Statbox_spec.ts
  147. cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch2_spec.ts
  148. cypress/e2e/Regression/ClientSide/Widgets/Switch/SwitchGroup1_spec.ts
  149. cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js
  150. cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_OnEvent_Navigation_spec.js
  151. cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js
  152. cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js
  153. cypress/e2e/Regression/ClientSide/Widgets/Tab/Tabs_2_spec.ts
  154. cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts
  155. cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts
  156. cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts
  157. cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts
  158. cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts
  159. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js
  160. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js
  161. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js
  162. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js
  163. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js
  164. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js
  165. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js
  166. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts
  167. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_2_Spec.ts
  168. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_1_Spec.ts
  169. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts
  170. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js
  171. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Column_Resize_spec.js
  172. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_GeneralProperty_spec.js
  173. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_1_spec.js
  174. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_PropertyPane_2_spec.js
  175. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Url_Column_spec.ts
  176. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_header_menu_visibility_spec.ts
  177. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_spec.js
  178. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_tabledata_schema_spec.js
  179. cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column1_spec.js
  180. cypress/e2e/Regression/ClientSide/Widgets/TableV2/freeze_column2_spec.js
  181. cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts
  182. cypress/e2e/Regression/ClientSide/Widgets/Text/Text2_Spec.ts
  183. cypress/e2e/Regression/ClientSide/Widgets/Text/TextWidget_LintErrorValidation_spec.js
  184. cypress/e2e/Regression/ClientSide/Widgets/Text/Text_new_feature_spec.js
  185. cypress/e2e/Regression/ClientSide/Widgets/Text/Text_spec.js
  186. cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts
  187. cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_2_spec.ts
  188. cypress/e2e/Regression/ClientSide/Widgets/Video/Video2_Spec.ts
  189. cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
  190. cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts
  191. cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL1_Spec.ts
  192. cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts
  193. cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres1_Spec.ts
  194. cypress/e2e/Regression/ServerSide/GenerateCRUD/Postgres2_Spec.ts
  195. cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts
  196. cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad1_Spec.ts
  197. cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts
  198. cypress/e2e/Regression/ServerSide/QueryPane/EvaluatedValuePopUp_spec.ts
  199. cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts
  200. cypress/e2e/Regression/ServerSide/QueryPane/Mongo_Spec.js
  201. cypress/e2e/Regression/ServerSide/QueryPane/S3_2_spec.ts
  202. cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts
To know the list of identified flaky tests - Refer here

Copy link
Member

@hetunandu hetunandu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a variable name change required

@@ -44,6 +46,7 @@ export const MOBILE_MAX_WIDTH = 767;
export const TABLET_MIN_WIDTH = 768;
export const TABLET_MAX_WIDTH = 991;
export const DESKTOP_MIN_WIDTH = 992;
export const DESIGN_BASE_WIDTH = 1440;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design base width feels ambiguous. Can we call it App or Editor instead?

Suggested change
export const DESIGN_BASE_WIDTH = 1440;
export const EDITOR_BASE_WIDTH = 1440;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even desktop

@albinAppsmith albinAppsmith requested a review from a team as a code owner January 25, 2024 19:21
@albinAppsmith albinAppsmith requested review from marks0351 and removed request for a team January 25, 2024 19:21
Comment on lines 21 to 24
width:
window.innerWidth > 1440
? DEFAULT_PP_LARGE_WIDTH
: DEFAULT_PROPERTY_PANE_WIDTH,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for setting the width of the property pane based on the window width is straightforward and correctly implements the feature enhancement described. However, directly accessing window.innerWidth in the reducer's initial state is not ideal for server-side rendering (SSR) scenarios or testing environments where window might not be available.

Consider using a more SSR-friendly approach, such as injecting the window width into the reducer through an action dispatched on the client side after the application mounts.

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7692411357.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 30550.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-30550.dp.appsmith.com

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7706202058.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 30550.
recreate: .

}

const Wrapper = styled.section<{
background: string;
width: number;
$enableMainCanvasResizer: boolean;
$scale?: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $scale property added to the Wrapper styled component is correctly implemented, enabling CSS-based scaling of the canvas. Ensure that the scale value is always within a reasonable range to prevent UI distortion.

Consider adding validation to ensure scale is within a predefined range (e.g., 0.5 to 2) to prevent extreme scaling that could distort the UI.

Comment on lines 258 to 292
<Flex
backgroundColor="var(--ads-v2-color-bg)"
border="1px solid var(--ads-v2-color-border)"
borderRadius="var(--ads-v2-border-radius)"
bottom="var(--ads-v2-spaces-4)"
left="var(--ads-v2-spaces-5)"
position="sticky"
px="spaces-3"
py="spaces-2"
style={{ boxShadow: "var(--ads-v2-shadow-popovers)" }}
width="120px"
>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(scale - 0.1)}
size="sm"
startIcon="subtract-line"
/>
<Flex
alignItems="center"
flex="1"
justifyContent="center"
px="spaces-2"
>
{Math.round(scale * 100)}%
</Flex>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(scale + 0.1)}
size="sm"
startIcon="add-line"
/>
</Flex>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of UI controls for adjusting the scale state is correctly done, using Button components for incrementing and decrementing the scale value. However, consider adding bounds checking to prevent the scale from going below a minimum or above a maximum value.

Consider adding bounds checking to the setScale calls to ensure the scale value remains within a reasonable range (e.g., between 0.5 and 2) to prevent extreme scaling.

- onClick={() => setScale(scale - 0.1)}
+ onClick={() => setScale(prevScale => Math.max(0.5, prevScale - 0.1))}
- onClick={() => setScale(scale + 0.1)}
+ onClick={() => setScale(prevScale => Math.min(2, prevScale + 0.1))}

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
<Flex
backgroundColor="var(--ads-v2-color-bg)"
border="1px solid var(--ads-v2-color-border)"
borderRadius="var(--ads-v2-border-radius)"
bottom="var(--ads-v2-spaces-4)"
left="var(--ads-v2-spaces-5)"
position="sticky"
px="spaces-3"
py="spaces-2"
style={{ boxShadow: "var(--ads-v2-shadow-popovers)" }}
width="120px"
>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(scale - 0.1)}
size="sm"
startIcon="subtract-line"
/>
<Flex
alignItems="center"
flex="1"
justifyContent="center"
px="spaces-2"
>
{Math.round(scale * 100)}%
</Flex>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(scale + 0.1)}
size="sm"
startIcon="add-line"
/>
</Flex>
<Flex
backgroundColor="var(--ads-v2-color-bg)"
border="1px solid var(--ads-v2-color-border)"
borderRadius="var(--ads-v2-border-radius)"
bottom="var(--ads-v2-spaces-4)"
left="var(--ads-v2-spaces-5)"
position="sticky"
px="spaces-3"
py="spaces-2"
style={{ boxShadow: "var(--ads-v2-shadow-popovers)" }}
width="120px"
>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(prevScale => Math.max(0.5, prevScale - 0.1))}
size="sm"
startIcon="subtract-line"
/>
<Flex
alignItems="center"
flex="1"
justifyContent="center"
px="spaces-2"
>
{Math.round(scale * 100)}%
</Flex>
<Button
isIconButton
kind="tertiary"
onClick={() => setScale(prevScale => Math.min(2, prevScale + 0.1))}
size="sm"
startIcon="add-line"
/>
</Flex>

Copy link

Deploy-Preview-URL: https://ce-30550.dp.appsmith.com

@@ -12,6 +12,9 @@ export const CANVAS_BACKGROUND_COLOR = "#FFFFFF";
export const DEFAULT_ENTITY_EXPLORER_WIDTH = 256;
export const DEFAULT_PROPERTY_PANE_WIDTH = 288;
export const APP_SETTINGS_PANE_WIDTH = 525;
export const DEFAULT_APP_SIDEBAR_WIDTH = 50;
export const DEFAULT_EDITOR_PANE_WIDTH = 255;
export const DEFAULT_PP_LARGE_WIDTH = window.innerWidth * 0.404 - 255; // 40.4% - 255px
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add comments explaining the rationale here.

}>`
background: ${({ background }) => background};
width: ${({ $enableMainCanvasResizer, width }) =>
$enableMainCanvasResizer ? `100%` : `${width}px`};
transform: ${({ $scale }) => ($scale ? `scale(${$scale})` : "")};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls ensure Drag and drop works properly when scaled.

Copy link
Contributor

@marks0351 marks0351 Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested the DnD and I see it not working in a few scenarios like when the canvas is scaled and try to do drag and drop, coz this scale factor needs to be used for the canvas on which the DnD illusion is rendered. pls check StickyCanvasArena for more details. I remember @hetunandu implemented a similar scale factor based on a previous redesign project which involved creating a redux state for it.

Also with this scaling I assume we might need to implement horizontal auto scroll while dragging and dropping. this itself is not a deal breaker for the first cut though.

@@ -253,6 +255,41 @@ function MainContainerWrapper(props: MainCanvasWrapperProps) {
</div>
)}
{node}
<Flex
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend moving this new block into a seperate component.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is just poc for now, will account for your comments if we go ahead with this changes.

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

github-actions bot commented Feb 1, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7737775819.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 30550.
recreate: .

Copy link

github-actions bot commented Feb 1, 2024

Deploy-Preview-URL: https://ce-30550.dp.appsmith.com

@albinAppsmith
Copy link
Collaborator Author

/ok-to-test tags="@tags.All"

Copy link

github-actions bot commented Feb 2, 2024

Please use /ok-to-test tags="@tag.All" to run all specs.
Explore the tags documentation here

Copy link

github-actions bot commented Feb 2, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7754543017.
Commit: ``.
Cypress dashboard url: Click here!
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.

@albinAppsmith
Copy link
Collaborator Author

/ok-to-test tags="@tag.All"

Copy link

github-actions bot commented Feb 2, 2024

Whoa, @tag.All spotted in your test suite! 🚀
While @tag.All is cool, like a catch-all net, why not try specific tags? 🏷️
Narrow down your suite with specific tags for quicker and more accurate tests! 🚀 Less waiting, more zipping through tests like a ninja!
Explore the tags documentation here

Copy link

github-actions bot commented Feb 2, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7754681425.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

Copy link

github-actions bot commented Feb 2, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7754681425.
Commit: ``.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js

  2. cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js
  3. cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js
  4. cypress/e2e/Regression/ClientSide/Git/GitSync/GitBugs_spec.js
  5. cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js
  6. cypress/e2e/Regression/ClientSide/Onboarding/StartFromScratch_spec.ts
  7. cypress/e2e/Regression/ClientSide/Widgets/Multiselect/RTL_support.ts
To know the list of identified flaky tests - Refer here

Copy link

github-actions bot commented Feb 2, 2024

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7754681425.
Commit: ``.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js

  2. cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js
  3. cypress/e2e/Regression/ClientSide/Git/GitImport/GitImport_spec.js
  4. cypress/e2e/Regression/ClientSide/Git/GitSync/GitBugs_spec.js
  5. cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js
To know the list of identified flaky tests - Refer here

@hetunandu hetunandu merged commit 4177230 into release Feb 5, 2024
13 of 14 checks passed
@hetunandu hetunandu deleted the pp-ee-proption branch February 5, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request IDE Navigation Issues/feature requests related to IDE navigation, and context switching New Developers Pod Issues that new developers face while exploring the IDE Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Proportional Entity Explorer and Property Pane Widths
3 participants