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: Enhance Data Components and Add SelectData Functionality #3715

Merged
merged 26 commits into from
Sep 22, 2024

Conversation

edwinjosechittilappilly
Copy link
Collaborator

  • Create Data Component:

    • Added Text Key Validation to ensure valid key names. If an invalid key is provided, an error will be raised.
  • Update/Append Data Component:

    • Enhanced functionality to allow both updating and appending data. This update supports adding multiple data entries to existing data.
    • Added the ability to update the text key during the update/append process.
  • Text Key Validator:

    • Introduced a toggleable text_key_validator to allow users to disable key validation when data is dynamically sourced, and key validation is not necessary.

Fixes:

  • Corrected issues in both the Create Data and Update/Append Data components to improve functionality and reliability.

closes #3644

Screenshot 2024-09-06 at 1 38 39 PM

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
@edwinjosechittilappilly edwinjosechittilappilly linked an issue Sep 6, 2024 that may be closed by this pull request
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 6, 2024
@dosubot dosubot bot added the enhancement New feature or request label Sep 6, 2024
@github-actions github-actions bot added bug Something isn't working and removed enhancement New feature or request labels Sep 6, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3715.dmtpw4p5recq1.amplifyapp.com

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
@edwinjosechittilappilly
Copy link
Collaborator Author

@jordanrfrazier Can you review these changes ? I have removed the legacy codes.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 13, 2024
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
@edwinjosechittilappilly
Copy link
Collaborator Author

@jordanrfrazier I have created Select Data component to solve some issues of update data component. can you review it once.

@edwinjosechittilappilly edwinjosechittilappilly changed the title fix: Enhance Create Data and Update/Append Data components with validation and append functionality feat: Enhance Data Components and Add SelectData Functionality Sep 16, 2024
@edwinjosechittilappilly
Copy link
Collaborator Author

@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 != "":
Copy link
Collaborator

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."
Copy link
Collaborator

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?

@edwinjosechittilappilly edwinjosechittilappilly merged commit ab2df9e into main Sep 22, 2024
29 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-create-data-and-update-data branch September 22, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Data and Update Data do not work
2 participants