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

fix: Add Loading when JS is getting created #32605

Merged
merged 2 commits into from
Apr 12, 2024
Merged

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Apr 11, 2024

Description

Makes the Add button go into loading when a JS object is being created. This is so that users can not end up in a situation where multiple JS Objects are created in parallel

Fixes #32146

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8657716256
Commit: c802546
Cypress dashboard url: Click here!

# Conflicts:
#	app/client/src/pages/Editor/IDE/EditorTabs/SplitScreenTabs.tsx
Copy link
Contributor

coderabbitai bot commented Apr 11, 2024

Walkthrough

Walkthrough

The update introduces a new hook for monitoring JavaScript module creation status and modifies the UI to display a spinner during the loading process. This enhances user feedback and interaction by providing visual cues during loading states.

Changes

File Path Change Summary
.../EditorPane/JS/hooks.ts Added new hook useIsJSAddLoading.
.../EditorTabs/SplitScreenTabs.tsx Imported Flex, Spinner from "design-system", updated imports for hooks, and modified UI to show spinner during JS loading.

Assessment against linked issues

Objective Addressed Explanation
Provide visual feedback during loading states (#32146)
Prevent multiple submissions by providing immediate feedback (#31308)
Enhance user experience with loading indicators (#31308)
Address blank states in JavaScript components (#31330) The PR does not address blank states directly.
Implement tooltips for UI buttons (#31330) The PR does not include tooltip implementation.

Possibly related issues


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1de9d15 and c802546.
Files selected for processing (2)
  • app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.ts (1 hunks)
  • app/client/src/pages/Editor/IDE/EditorTabs/SplitScreenTabs.tsx (4 hunks)
Additional comments not posted (4)
app/client/src/pages/Editor/IDE/EditorTabs/SplitScreenTabs.tsx (3)

2-2: Imports for Flex and Spinner are correctly added to support new UI elements.


20-22: Hook useIsJSAddLoading is correctly imported and used to manage the loading state.


96-102: Conditional rendering logic for the spinner during JS loading is correctly implemented.

app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.ts (1)

60-70: The implementation of useIsJSAddLoading correctly checks the creation state of JS modules using Redux and module options.


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.

@github-actions github-actions bot added Bug Something isn't working IDE Navigation Issues/feature requests related to IDE navigation, and context switching Low An issue that is neither critical nor breaks a user flow IDE Pod Issues that new developers face while exploring the IDE Release labels Apr 11, 2024
@hetunandu hetunandu added the ok-to-test Required label for CI label Apr 11, 2024
@albinAppsmith
Copy link
Collaborator

/build-deploy-preview skip-test=true

Copy link

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

Copy link

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

@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 12, 2024
@hetunandu hetunandu merged commit b011680 into release Apr 12, 2024
69 of 73 checks passed
@hetunandu hetunandu deleted the fix/js-add-loading branch April 12, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE Low An issue that is neither critical nor breaks a user flow ok-to-test Required label for CI Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Connect data CTA doesn’t work in split mode
2 participants