appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

chore: Transitions for IDE

Open hetunandu opened this issue 1 year ago • 8 comments

Description

Uses AnimatedGridLayout component to introduce transitions for the IDE. This is behind a feature flag

Fixes #34538 Fixes #30863 Fixes #34544

Automation

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

:mag: Cypress test results

[!CAUTION] 🔴 🔴 🔴 Some tests have failed. Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10737363879 Commit: a912f5c52366abe48768727a1c605cd72b48752c Cypress dashboard. Tags: @tag.All Spec: The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ServerSide/OnLoadTests/ExecuteAction_Spec.ts
List of identified flaky tests.
Fri, 06 Sep 2024 16:32:30 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • [ ] Yes
  • [ ] No

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced two new layout components: AnimatedLayout and UnanimatedLayout for improved editor interface structuring.
    • Added TypeScript type definitions for the DOM View Transitions API to enhance type safety and developer experience.
    • Implemented custom hooks, useGridLayoutTemplate and useEditorStateLeftPaneWidth, for dynamic grid management and left pane width calculation in the IDE layout.
  • Improvements

    • Enhanced layout responsiveness with the addition of dynamic grid management.
    • Updated the Editor component to use a centralized constant for height calculations, improving maintainability and consistency.
    • Enhanced test accuracy by refining assertions in the Git Branch Protection test suite.

hetunandu avatar Aug 15 '24 08:08 hetunandu

Walkthrough

This update introduces a comprehensive layout system for the Integrated Development Environment (IDE), featuring both animated and unanimated layouts to enhance rendering flexibility. A custom React hook for managing grid layouts improves responsiveness, while TypeScript type definitions for the DOM View Transitions API enhance type safety within the project. Additionally, the Editor component's height calculation has been made more dynamic by utilizing a centralized constant.

Changes

Files Changed Change Summary
app/client/package.json Added dependency for TypeScript type definitions of the DOM View Transitions API, enhancing type safety.
app/client/src/pages/Editor/IDE/Layout/AnimatedLayout.tsx, app/client/src/pages/Editor/IDE/Layout/UnanimatedLayout.tsx Introduced AnimatedLayout and UnanimatedLayout, which simplify layout management based on rendering strategies.
app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts Added a custom hook useGridLayoutTemplate to dynamically manage grid dimensions for responsive layouts.
app/client/src/pages/Editor/index.tsx Updated height calculation in CenteredWrapper to use IDE_HEADER_HEIGHT for improved maintainability and consistency.
app/client/src/pages/Editor/IDE/ProtectedCallout.test.tsx Enhanced getMockStore function to utilize initial state from the imported store for more accurate testing representation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant AnimatedLayout
    participant UnanimatedLayout

    User->>App: Toggle animation feature
    App->>AnimatedLayout: Render components with animations
    App->>UnanimatedLayout: Render components without animations

Assessment against linked issues

Objective Addressed Explanation
Create layout for IDE ( #34538 )
Add transitions for Side by Side ( #30863 ) The changes do not specify particular transition updates for side-by-side functionalities.

🎉 In the realm of code where changes arise,
A layout emerges, a visual surprise.
Constants now rule, with heights that align,
Creating a canvas where all can combine.
Animations beckon, making interfaces bright,
In this world of coding, everything feels right! 🌈


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 testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Aug 15 '24 08:08 coderabbitai[bot]

/build-deploy-preview

hetunandu avatar Aug 19 '24 09:08 hetunandu

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

github-actions[bot] avatar Aug 19 '24 09:08 github-actions[bot]

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

github-actions[bot] avatar Aug 19 '24 09:08 github-actions[bot]

@hetunandu "Transitions for IDE" do we need to run tag.All or multiple tags here?

sagar-qa007 avatar Sep 03 '24 05:09 sagar-qa007

/build-deploy-preview skip-test=true

albinAppsmith avatar Sep 06 '24 06:09 albinAppsmith

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

github-actions[bot] avatar Sep 06 '24 06:09 github-actions[bot]

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

github-actions[bot] avatar Sep 06 '24 07:09 github-actions[bot]

/build-deploy-preview skip-test=true

albinAppsmith avatar Sep 09 '24 04:09 albinAppsmith

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

github-actions[bot] avatar Sep 09 '24 04:09 github-actions[bot]

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

github-actions[bot] avatar Sep 09 '24 04:09 github-actions[bot]