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

feature: add edit option to global variables table #3712

Merged
merged 16 commits into from
Sep 9, 2024
Merged

Conversation

anovazzi1
Copy link
Contributor

Users can update Global Variables name, value and default fields on the global variables page

#3462

…te its usage

The component AddNewVariableButton has been renamed to GlobalVariableModal to better reflect its purpose. The component is now used in multiple places, including the GlobalVariablesPage and InputGlobalComponent. This change improves code clarity and consistency.
…VariableModal and GlobalVariablesPage

Trim field names before checking for availability in GlobalVariableModal and GlobalVariablesPage to ensure consistent comparison and avoid any potential issues with leading or trailing spaces.
@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
Copy link

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

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

ogabrielluiz and others added 8 commits September 6, 2024 13:57
…DENTIAL_TYPE

- Introduced a field validator for the 'value' field in the VariableRead model to handle cases where the variable type is CREDENTIAL_TYPE.
- Added necessary import for CREDENTIAL_TYPE.
- Removed an unnecessary blank line in the variable API.
- Changed import of `CREDENTIAL_TYPE` from `service` to `constants` module.
- Reordered fields in `VariableRead` model to place `type` before `value`.
…ting purposes

📝 (userSettings.spec.ts): Update test to interact with global variables and improve readability and maintainability of the code
@severfire
Copy link

finally!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 9, 2024
@anovazzi1 anovazzi1 merged commit d3b8f6c into main Sep 9, 2024
36 of 37 checks passed
@anovazzi1 anovazzi1 deleted the editGlobalVariable branch September 9, 2024 13:48
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
* first attempt to edit variables on the data table

* refactor: Rename AddNewVariableButton to GlobalVariableModal and update its usage

The component AddNewVariableButton has been renamed to GlobalVariableModal to better reflect its purpose. The component is now used in multiple places, including the GlobalVariablesPage and InputGlobalComponent. This change improves code clarity and consistency.

* fix: fix apply to fields on table edit option

* refactor: Trim field names before checking for availability in GlobalVariableModal and GlobalVariablesPage

Trim field names before checking for availability in GlobalVariableModal and GlobalVariablesPage to ensure consistent comparison and avoid any potential issues with leading or trailing spaces.

* Refactor GlobalVariablesPage to remove unused cellRenderer in the "value" field

* [autofix.ci] apply automated fixes

* Add validation for 'value' field in VariableRead model and import CREDENTIAL_TYPE

- Introduced a field validator for the 'value' field in the VariableRead model to handle cases where the variable type is CREDENTIAL_TYPE.
- Added necessary import for CREDENTIAL_TYPE.
- Removed an unnecessary blank line in the variable API.

* Add constants for credential and generic types in variable service

* Refactor import statements in `kubernetes.py` to improve module organization

* Refactor imports in test_service.py for better organization

* refactor: Update import statements in variable.py for better organization

* Refactor import and reorder fields in VariableRead model

- Changed import of `CREDENTIAL_TYPE` from `service` to `constants` module.
- Reordered fields in `VariableRead` model to place `type` before `value`.

* ✨ (userSettings.spec.ts): Add additional randomName variables for testing purposes
📝 (userSettings.spec.ts): Update test to interact with global variables and improve readability and maintainability of the code

* test: fix test_create_variable

---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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.

5 participants