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: Collapsible Bottom View #33441

Merged
merged 14 commits into from
May 22, 2024
Merged

feat: Collapsible Bottom View #33441

merged 14 commits into from
May 22, 2024

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented May 14, 2024

Description

  • Creates a new IDE component for BottomView that can be either collapsed or closed.
  • Creates a different view for EntityTabs when it is collapsed
  • Start using the collapsed version for Entity Responses (Query / API / JS)

Fixes #33333
Fixes #33336
Fixes #31402

Automation

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

🔍 Cypress test results

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9175565108
Commit: 8f3b96e
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js
  2. cypress/e2e/Regression/ClientSide/Widgets/Others/IconButton_2_spec.ts
To know the list of identified flaky tests - Refer here

Communication

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

  • Yes
  • No

@github-actions github-actions bot added the Enhancement New feature or request label May 14, 2024
@hetunandu
Copy link
Member Author

/build-deploy-preview

Copy link

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

@hetunandu hetunandu added the ok-to-test Required label for CI label May 14, 2024
Copy link

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

# Conflicts:
#	app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx
@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 labels May 15, 2024
@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 15, 2024
@hetunandu hetunandu marked this pull request as ready for review May 15, 2024 15:39
@hetunandu hetunandu requested review from albinAppsmith and AmanAgarwal041 and removed request for ayushpahwa May 15, 2024 15:39
Copy link
Contributor

coderabbitai bot commented May 15, 2024

Walkthrough

Walkthrough

The recent changes focus on improving the usability of the split-pane debugger in the app's IDE. Updates include selector modifications, component behavior adjustments, and height calculation refinements. Key enhancements involve making the debugger pane collapsible, introducing new components, refining interfaces, and restructuring code for better organization and clarity.

Changes

File Path Change Summary
app/client/cypress/support/Pages/DebuggerHelper.ts Updated _closeButton selector to "[data-testid=t--view-hide-button]".
app/client/src/IDE/Components/BottomView.tsx Introduced BottomView component managing a resizable bottom view with tabs and hide button.
app/client/src/IDE/Interfaces/View.ts Added ViewHideBehaviour and ViewDisplayMode enums.
app/client/src/IDE/index.ts Restructured comments and reorganized code for better readability, exported key components.
app/client/src/components/editorComponents/BottomTabs.tsx Added conditional rendering based on isCollapsed prop.
app/client/src/components/editorComponents/Debugger/Resizer/index.tsx Added minHeight property to ResizerProps interface.
app/client/src/components/editorComponents/JSResponseView.tsx Removed unused imports and added necessary imports.
app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx Simplified height calculation for the Wrapper styled component.
app/client/src/pages/Editor/DataSourceEditor/DBForm.tsx Simplified height calculation for the Form styled component.
app/client/src/pages/Editor/JSEditor/Form.tsx Simplified height calculation for the Wrapper styled component.
app/client/src/pages/Editor/JSEditor/styledComponents.ts Adjusted height calculations for FormWrapper and Form components.
app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx Refactored imports, adjusted state management, and restructured rendering logic for query debugger tabs.

Assessment against linked issues

Objective Addressed Explanation
Split pane debugger should be collapsible, not closable (#33336)
Enhance usability of the split pane debugger (#33333)
Ensure consistent styling and behavior in height calculations across different components (#33333)

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c32cea1 and 8f3b96e.
Files selected for processing (1)
  • app/client/src/IDE/Components/BottomView.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/src/IDE/Components/BottomView.tsx

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.

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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

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.

@hetunandu hetunandu requested a review from ashit-rath May 15, 2024 15:39
@ashit-rath
Copy link
Contributor

ashit-rath commented May 16, 2024

Few observations:

  1. The JS Object bottom tab has some additional padding when collapsed, which is not present for the queries section
Screenshot 2024-05-16 at 9 28 37 AM
  1. Font weight of the tab's label is not consistent when collapsed and uncollapsed.

app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
app/client/src/IDE/Components/BottomView.tsx Outdated Show resolved Hide resolved
@hetunandu
Copy link
Member Author

/build-deploy-preview

Copy link

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

Copy link

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

@hetunandu
Copy link
Member Author

/build-deploy-preview

Copy link

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

@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 16, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Out of diff range and nitpick comments (1)
app/client/src/components/editorComponents/Debugger/Resizer/index.tsx (1)

27-27: Add a comment to document the new minHeight property.

To improve code readability and maintainability, consider adding a comment to document the purpose of the new minHeight property in the ResizerProps interface.

import { ViewHideBehaviour, ViewDisplayMode } from "IDE/Interfaces/View";
import { Button } from "design-system";

const VIEW_MIN_HEIGHT = 38;
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using a named constant for the minimum height value.

To improve code readability and maintainability, consider using a named constant for the minimum height value, as suggested in previous comments.

- const VIEW_MIN_HEIGHT = 38;
+ const VIEW_MIN_HEIGHT = 38; // Minimum height for the view

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
const VIEW_MIN_HEIGHT = 38;
const VIEW_MIN_HEIGHT = 38; // Minimum height for the view

Copy link

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

@github-actions github-actions bot added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Production and removed Bug Something isn't working labels May 17, 2024
@github-actions github-actions bot added the Bug Something isn't working label May 20, 2024
@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 20, 2024
@hetunandu hetunandu requested a review from ashit-rath May 20, 2024 15:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

@hetunandu hetunandu requested a review from sneha122 May 21, 2024 13:29
@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 21, 2024
@hetunandu hetunandu merged commit dbb07b8 into release May 22, 2024
79 of 82 checks passed
@hetunandu hetunandu deleted the feat/collapsible-bottom-view branch May 22, 2024 14:13
trishaanand added a commit that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement New feature or request High This issue blocks a user from building or impacts a lot of users IDE Navigation Issues/feature requests related to IDE navigation, and context switching Needs Triaging Needs attention from maintainers to triage New Developers Pod Issues that new developers face while exploring the IDE ok-to-test Required label for CI Production Task A simple Todo
Projects
None yet
2 participants