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

Adds required to environment variables #3653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashley-o0o
Copy link
Contributor

@ashley-o0o ashley-o0o commented Jan 16, 2025

Closes: RHOAIENG-1201

Description

Previously, when creating a workbench, if a user wanted to add an environment variable, a selection is required to complete the creation. There was no indication that this field was required. This PR adds a required star to the drop down if the user chooses to add the variable.

How Has This Been Tested?

Tested locally

  • Navigate to your data science projects, and choose one to create a workbench for.
  • In the create workbench page, scroll down to environment variables. It should be an optional field. But when you click to add variables, a title of "Variable type * " will now show.

Screenshots

Environment Variables field:
Screenshot 2025-01-16 at 3 35 54 PM

Before:
Screenshot 2025-01-16 at 3 36 25 PM

After:
Screenshot 2025-01-16 at 3 36 02 PM

Test Impact

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@openshift-ci openshift-ci bot requested review from Gkrumbach07 and ppadti January 16, 2025 20:43
Copy link
Contributor

openshift-ci bot commented Jan 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign manosnoam for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ashley-o0o
Copy link
Contributor Author

@kywalker-rh

@kywalker-rh
Copy link

lgtm, thanks @ashley-o0o!

Comment on lines +21 to +27
<FormGroup isRequired label="Variable type">
<Split data-testid="environment-variable-field">
<SplitItem isFilled>
<Stack hasGutter>
<StackItem data-testid="environment-variable-type-select">
<SimpleSelect
popperProps={{ appendTo: getDashboardMainContainer() }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<FormGroup isRequired label="Variable type">
<Split data-testid="environment-variable-field">
<SplitItem isFilled>
<Stack hasGutter>
<StackItem data-testid="environment-variable-type-select">
<SimpleSelect
popperProps={{ appendTo: getDashboardMainContainer() }}
<FormGroup isRequired label="Variable type" fieldId="environment-variable-type-select">
<Split data-testid="environment-variable-field">
<SplitItem isFilled>
<Stack hasGutter>
<StackItem data-testid="environment-variable-type-select">
<SimpleSelect
toggleProps={{ id: 'environment-variable-type-select' }}
popperProps={{ appendTo: getDashboardMainContainer() }}

So I noticed this accessibility error when working on my own PR when adding a label to a SimpleSelect. The FormGroup label doesn't point to anything. But you can give the SimpleSelect a toggle props with the id and it will fix it
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants