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: add option to mark application as forkable #21874

Merged
merged 30 commits into from
May 23, 2023
Merged

Conversation

akash-codemonk
Copy link
Contributor

@akash-codemonk akash-codemonk commented Mar 29, 2023

Description

Allow users to mark an application as forkable.

Fixes #20569

Media

fork-application.mov

Deploy preview

https://ce-21874.dp.appsmith.com/

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual
  • 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:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

Summary by CodeRabbit

  • New Features

    • Introduced a toggle feature for marking applications as forkable, enhancing user control over application settings.
    • Added a confirmation modal for enabling forking to improve user interaction and prevent accidental changes.
    • Enhanced the test suite with additional assertions and scenarios for better validation of forking functionality.
    • Implemented an updated success validation for user invitations based on new functionality.
  • Bug Fixes

    • Improved the rendering logic to prevent flickering UI elements based on user authentication and data availability.
  • Documentation

    • Expanded messaging capabilities related to the forking feature to enhance user understanding.
  • Chores

    • Added new properties and action types to support enhanced state management for forking features.

@akash-codemonk akash-codemonk marked this pull request as draft March 29, 2023 12:36
@github-actions github-actions bot added the Enhancement New feature or request label Mar 29, 2023
@akash-codemonk
Copy link
Contributor Author

/build-deploy-preview env=release

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/4554063238.
Workflow: On demand build Docker image and deploy preview.
skip-tests: ``.
env: release.
PR: 21874.

@github-actions
Copy link

Deploy-Preview-URL: https://appsmith-m46itso6q-get-appsmith.vercel.app

@akash-codemonk
Copy link
Contributor Author

/build-deploy-preview env=release

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/4554591306.
Workflow: On demand build Docker image and deploy preview.
skip-tests: ``.
env: release.
PR: 21874.

@github-actions
Copy link

Deploy-Preview-URL: https://appsmith-khqi3q73s-get-appsmith.vercel.app

@akash-codemonk
Copy link
Contributor Author

/build-deploy-preview env=release

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/4562052412.
Workflow: On demand build Docker image and deploy preview.
skip-tests: ``.
env: release.
PR: 21874.

@akash-codemonk
Copy link
Contributor Author

/build-deploy-preview env=release

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/4564031848.
Workflow: On demand build Docker image and deploy preview.
skip-tests: ``.
env: release.
PR: 21874.

@github-actions
Copy link

Deploy-Preview-URL: https://appsmith-5fesqiilp-get-appsmith.vercel.app

@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=33cfb74

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4565137360.
Workflow: Appsmith External Integration Test Workflow.
Commit: 33cfb74.
PR: 21874.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=21874&runId=4565137360_1

@github-actions
Copy link

The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Query_Datasource_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js
  4. cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_ContextMenu_spec.js
  5. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts

@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=6cb5a98

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4574939129.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6cb5a98.
PR: 21874.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=21874&runId=4574939129_1

@akash-codemonk
Copy link
Contributor Author

/ok-to-test

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/5054975702.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 21874.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=21874&runId=5054975702_1

@akash-codemonk akash-codemonk marked this pull request as ready for review May 23, 2023 08:30
@akash-codemonk
Copy link
Contributor Author

/build-deploy-preview

@github-actions
Copy link

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

@github-actions
Copy link

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

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5054975702.
Commit: ``.
All cypress tests have passed 🎉

@akash-codemonk akash-codemonk merged commit 187489e into release May 23, 2023
@akash-codemonk akash-codemonk deleted the feat/enable-fork branch May 23, 2023 11:09
});
});
});
});

it("Mark application as forkable", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add index to it

it("Mark application as forkable", () => {
_.appSettings.OpenAppSettings();
_.appSettings.GoToEmbedSettings();
_.embedSettings.ToggleMarkForkable();
Copy link
Contributor

@Aishwarya-U-R Aishwarya-U-R May 23, 2023

Choose a reason for hiding this comment

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

Can we also add test for _.embedSettings.ToggleMarkForkable(false); after true?

@Nikhil-Nandagopal Nikhil-Nandagopal added Artifact Platform Product Issues related to the application platform and removed IDE Pod Issues that new developers face while exploring the IDE labels Aug 5, 2024
Copy link
Contributor

coderabbitai bot commented Aug 5, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The recent changes enhance the application's forking capabilities by introducing a toggle in the SHARE modal, allowing users to enable or disable app forking. This functionality improves user experience by providing control over how applications are shared, along with clear communication about the implications of enabling forking. Additionally, various components have been updated to support this feature, including tests to ensure robustness.

Changes

Files Change Summary
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ForkApplication_spec.js, app/client/cypress/support/Objects/CommonLocators.ts, app/client/cypress/support/Pages/AppSettings/EmbedSettings.ts, app/client/cypress/support/Pages/HomePage.ts Enhanced test cases for forking functionality, added new locators and methods for toggling and validating forkable status.
app/client/src/ce/actions/applicationActions.ts, app/client/src/ce/api/ApplicationApi.tsx, app/client/src/ce/constants/ReduxActionConstants.tsx, app/client/src/ce/constants/messages.ts Introduced new action types and API payloads related to forking, enhancing state management and messaging for the feature.
app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx, app/client/src/ce/sagas/ApplicationSagas.tsx Added handlers and saga logic for updating forking state in the Redux store, improving dynamic management of application settings.
app/client/src/pages/AppViewer/PrimaryCTA.test.tsx, app/client/src/pages/AppViewer/PrimaryCTA.tsx, app/client/src/pages/Editor/AppSettingsPane/AppSettings/EmbedSettings/MakeApplicationForkable.tsx, app/client/src/pages/Editor/AppSettingsPane/AppSettings/EmbedSettings/index.tsx, app/client/src/pages/Editor/AppSettingsPane/index.tsx Updated rendering logic and conditional checks to support new forking toggle and confirmation modal, enhancing user interface flow.

Assessment against linked issues

Objective Addressed Explanation
Add toggle to SHARE modal for user to enable app forking (#[20569])
Communicate implications of enabling forking (#[20569])
Ensure toggle is off by default (#[20569]) Implementation details of the default state are unclear from the changes.

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 as 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.

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

CodeRabbit Configuration 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 IDE Pod Issues that new developers face while exploring the IDE Verified When issue is retested post its fixed labels Aug 5, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the IDE Product Issues related to the IDE Product label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Artifact Platform Product Issues related to the application platform Enhancement New feature or request Fork App Issues related to forking apps IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Templates Product Issues related to Templates Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable Verified When issue is retested post its fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add toggle to SHARE modal for user to enable app forking
4 participants