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(platform) : single input validation lock #8856

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Abhi1992002
Copy link
Contributor

@Abhi1992002 Abhi1992002 commented Dec 2, 2024

Changes

  • Introduced mutually_exclusive parameter in SchemaField to manage input exclusivity.
  • Implemented logic in NodeGenericInputField to disable inputs based on mutual exclusivity.
  • Updated related components to support the new disabled state for inputs.
  • Enhanced BlockIOSubSchemaMeta to include mutually_exclusive property.

Currently, I’m disabling the input from the same group (I haven’t added any frontend validation to prevent users from bypassing it).

Screen.Recording.2024-12-02.at.5.08.42.PM.mov

### Changes
- Introduced `mutually_exclusive` parameter in `SchemaField` to manage input exclusivity.
- Implemented logic in `NodeGenericInputField` to disable inputs based on mutual exclusivity.
- Updated related components to support the new `disabled` state for inputs.
- Enhanced `BlockIOSubSchemaMeta` to include `mutually_exclusive` property.
…fields

### Changes
- Added `mutually_exclusive` parameter to `SchemaField` for `text_input_1`, `text_input_2`, and `text_input_3` to group them under "group_1".
- Updated `number_input_1` and `number_input_2` to belong to "group2" for mutual exclusivity.
@Abhi1992002 Abhi1992002 requested a review from a team as a code owner December 2, 2024 11:46
@Abhi1992002 Abhi1992002 requested review from Torantulino and majdyz and removed request for a team December 2, 2024 11:46
Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for auto-gpt-docs-dev ready!

Name Link
🔨 Latest commit 8d41f2d
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/674ed7ee7ed17200085a8e8e
😎 Deploy Preview https://deploy-preview-8856--auto-gpt-docs-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end platform/blocks size/l labels Dec 2, 2024
@Abhi1992002 Abhi1992002 changed the title Feat/single input validation lock feat(platform) : single input validation lock Dec 2, 2024
Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit 8d41f2d
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/674ed7ee204e720008023043
😎 Deploy Preview https://deploy-preview-8856--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Abhi1992002 Abhi1992002 marked this pull request as draft December 2, 2024 11:51
@Abhi1992002 Abhi1992002 marked this pull request as ready for review December 2, 2024 12:58
from backend.data.model import SchemaField


class TestMutualExclusiveBlock(Block):
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR is a good addition - for the tests however, I wonder if you could put the tests in one of the real blocks to show it working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/blocks platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants