-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Enhance Data Components and Add SelectData Functionality #3715
feat: Enhance Data Components and Add SelectData Functionality #3715
Conversation
Added: Text Key name check validation , throws and error if its not a valid key Updated the Update Data Component to be update and append data. With this update multiple data can be updated or appended to the old created data. Also There is an option to update the text key, in update/ append Data
This functionality is added to turn on or off the text key validator if the data is Dynamically loaded from another source and the user doesn't want to validate the text_key
This pull request is automatically being deployed by Amplify Hosting (learn more). |
refactor: Remove legacy post_code_processing methods - Remove post_code_processing methods from CreateDataComponent and UpdateDataComponent - These methods were duplicating functionality already present in the parent class - Remove corresponding test case for post_code_processing in CreateDataComponent and UpdateDataComponent
@jordanrfrazier Can you review these changes ? I have removed the legacy codes. |
src/backend/tests/unit/components/prototypes/test_createData_component.py
Outdated
Show resolved
Hide resolved
Add SelectDataComponent to handle data selection from a list - Create new SelectDataComponent class - Implement inputs for data list and index selection - Ensure proper error handling for out-of-range index selection
@jordanrfrazier I have created Select Data component to solve some issues of update data component. can you review it once. |
@jordanrfrazier Once available can you also look why the CI fails, hence not able to merge it with main. |
def validate_text_key(self): | ||
"""This function validates that the Text Key is one of the keys in the Data""" | ||
data_keys = self.get_data().keys() | ||
if self.text_key not in data_keys and self.text_key != "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we raise another error is the self.text_key
is an empty string?
|
||
class SelectDataComponent(Component): | ||
display_name: str = "Select Data" | ||
description: str = "Select a single data from a list of data." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I'm not sure what it means to select a single data from a list of data. Is it selecting a row, a column, a field? Can we be more user-friendly with this description?
Create Data Component:
Update/Append Data Component:
Text Key Validator:
text_key_validator
to allow users to disable key validation when data is dynamically sourced, and key validation is not necessary.Fixes:
closes #3644