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

[QE testing] alignment form fields ids #831

Open
ibolton336 opened this issue Apr 20, 2023 · 10 comments
Open

[QE testing] alignment form fields ids #831

ibolton336 opened this issue Apr 20, 2023 · 10 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ibolton336
Copy link
Member

Related to #443

  • For each field, we should have a unique ID assigned to the field. Use "fieldId" for each TextInput (HookFormPFTextInput takes the fieldId prop and appends it to the wrapped patternfly text field.)
@ibolton336 ibolton336 added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Apr 20, 2023
@ibolton336 ibolton336 added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jun 22, 2023
@kirtanchandak
Copy link

How to start working on this issue?

@ibolton336
Copy link
Member Author

Hi @kirtanchandak - To start, have a look for any Text input components with a missing ID. I have found one here:

 <TextInput
          value={
            !migrationWave?.name
              ? `${dayjs(migrationWave.startDate).format(
                  "MM/DD/YYYY"
                )} - ${dayjs(migrationWave.endDate).format("MM/DD/YYYY")}`
              : migrationWave.name
          }
          type="text"
          aria-label="wave-name"
          isDisabled={true}
        />

in client/src/app/pages/migration-waves/components/manage-applications-form.tsx

Thanks!

@kirtanchandak
Copy link

Hey I am using this approach, is the correct?

 <HookFormPFTextInput
          defaultValue={
            !migrationWave?.name
              ? `${dayjs(migrationWave.startDate).format(
                  "MM/DD/YYYY"
                )} - ${dayjs(migrationWave.endDate).format("MM/DD/YYYY")}`
              : migrationWave.name
          }
            name="name"
            label="Name"
          type="text"
          fieldId="wave-name"
          isDisabled={true}
        />

@ibolton336
Copy link
Member Author

ibolton336 commented Jun 30, 2023

@kirtanchandak That is the right idea! However, in this case I think that textInput is just for display purposes so it may not necessitate our React-hook-form text input wrapper component here.

@ibolton336
Copy link
Member Author

@kirtanchandak I think for this one, just adding an ID here would be sufficient. Let me know if that makes sense or if you see any other issues I can help you get started with!

@gitdallas
Copy link
Collaborator

curious if this is being worked on

@ibolton336
Copy link
Member Author

My take is if it is unassigned, it is fair game @gitdallas

@sjd78 sjd78 added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/normal Higher priority than priority/minor. Nice to have. labels Jun 11, 2024
@konveyor-ci-bot
Copy link

This issue has been marked 'good first issue'
Please, make sure it aligns with the criteria found here

@sjd78 sjd78 changed the title QE Alignment: Form fields [QE testing] alignment form fields ids Aug 30, 2024
@aviya-gidan
Copy link

I'm starting to work on it

@aviya-gidan
Copy link

I add the following code
<TextInput
value={
!migrationWave?.name
? ${dayjs(migrationWave.startDate).format( "MM/DD/YYYY" )} - ${dayjs(migrationWave.endDate).format("MM/DD/YYYY")}
: migrationWave.name
}
type="text"
aria-label="wave-name"
isDisabled={true}
fieldId="wave-name-input"
/>

And I have this problem:
Property 'fieldId' does not exist on type 'IntrinsicAttributes & TextInputProps & RefAttributes'

what am I supposed to do now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: 📋 Backlog
Status: Todo
Development

No branches or pull requests

5 participants