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

Add search (Autocomplete) in group dropdown for useGroups #1356

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

dlpzx
Copy link
Contributor

@dlpzx dlpzx commented Jun 21, 2024

Feature or Bugfix

  • Feature

Detail

Autocomplete for environments and teams in the following frontend views as requested in 1012. In this PR the changes apply to those views that use useGroups to define the groupOptions

  • WorksheetCreateForm.js
  • EnvironmentCreateForm.js
  • OrganizationCreateForm.js
  • GlossaryCreateForm.js

❗ In the EnvironmentCreateForm we might need to filter out the list of groups provided. At the moment users can select any group that they belong to. With the changes done by @SofiaSazonova in #1306 I think we need to review if that is still appropriate. Do you think we should open a new PR for this change?

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

  • Does this PR introduce or modify any input fields or queries - this includes
    fetching data from storage outside the application (e.g. a database, an S3 bucket)?
    • Is the input sanitized?
    • What precautions are you taking before deserializing the data you consume?
    • Is injection prevented by parametrizing queries?
    • Have you ensured no eval or similar functions are used?
  • Does this PR introduce any functionality or component that requires authorization?
    • How have you ensured it respects the existing AuthN/AuthZ mechanisms?
    • Are you logging failed auth attempts?
  • Are you using or adding any cryptographic features?
    • Do you use a standard proven implementations?
    • Are the used keys controlled by the customer? Where are they stored?
  • Are you introducing any new policies/roles/users?
    • Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dlpzx dlpzx changed the title Add search (Autocomplete) in environment/group dropdown in Worksheet create... Add search (Autocomplete) in group dropdown for useGroups Jun 21, 2024
@dlpzx
Copy link
Contributor Author

dlpzx commented Jun 21, 2024

Testing:

  • Create Worksheet, correct input is passed
  • Create Worksheet, list groups, remove group and select another group
  • Create Environment, correct input is passed
  • Create Organization, correct input is passed
  • Create Glossary, correct input is passed
Screen.Recording.2024-06-21.at.17.59.55.mov

@dlpzx dlpzx marked this pull request as ready for review June 21, 2024 16:03
@SofiaSazonova
Copy link
Contributor

@dlpzx
About filter for groups. I thinks, It's more appropriate to list only groups, that are valid for this case:

  1. user belongs to this group
  2. group is invited into org

Same holds for the invitation into environment: only groups invited into Org, can be invited into Env.

But on the other hand in can lead to a confusion, when user can't understand, why the target group is not listed.
That's why I didn't touch this question in #1147

Copy link
Contributor

@noah-paige noah-paige left a comment

Choose a reason for hiding this comment

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

Changes look good and tested locally - approving

Agree we probably want to filter groups for Env Create Form but think this PR focus is only on Autocomplete component and meets that requirement

Feel free to create new PR or can re-request review on this after adding group filter if you want - but I think we are good to merge this as is and pick up that task separately

@dlpzx dlpzx merged commit ac53b54 into main Jun 25, 2024
9 checks passed
@dlpzx dlpzx deleted the feat/search-env-dropdown-2 branch June 26, 2024 09:26
@dlpzx
Copy link
Contributor Author

dlpzx commented Jun 27, 2024

To track this issue on the filtered listGroups queries I opened a separate issue

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.

None yet

3 participants