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

Implemented alias action UX. #754

Merged
merged 11 commits into from
May 31, 2023

Conversation

AWSHurneyt
Copy link
Contributor

@AWSHurneyt AWSHurneyt commented May 23, 2023

Description

  1. Implemented alias action UX.
  2. Removed redundant popout icons from Learn more links. Having target="_blank" in the link attributes provides the icon.

Issues Resolved

#374

Screenshots

Blank UX.
Screenshot 2023-05-23 at 11 26 21 AM

UX with valid inputs.
Screenshot 2023-05-23 at 11 04 41 AM

UX with validation errors.
Screenshot 2023-05-23 at 11 21 31 AM

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
…combo boxes at once.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
…get="_blank"' in the link attributes provides the icon. Updated snapshots.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Merging #754 (928007b) into main (d0fdde2) will increase coverage by 1.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #754      +/-   ##
==========================================
+ Coverage   62.37%   63.40%   +1.03%     
==========================================
  Files         337      340       +3     
  Lines       11437    11541     +104     
  Branches     2212     2239      +27     
==========================================
+ Hits         7134     7318     +184     
+ Misses       3739     3649      -90     
- Partials      564      574      +10     

see 16 files with indirect coverage changes

@AWSHurneyt
Copy link
Contributor Author

It looks like the cypress workflow is executing as expected on the 2.x branch. I've created this PR in my fork that executes these checks against the 2.x branch, and all checks succeed.
AWSHurneyt#2

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
@kamingleung
Copy link

@AWSHurneyt

  1. Is there a need to have both add and remove on the same action? Would it be more clear to have separate actions such as "Add aliases" and "Remove aliases"?
  2. Can users select from a list of existing aliases to add or remove?

@AWSHurneyt
Copy link
Contributor Author

@AWSHurneyt

  1. Is there a need to have both add and remove on the same action? Would it be more clear to have separate actions such as "Add aliases" and "Remove aliases"?
  2. Can users select from a list of existing aliases to add or remove?

@kamingleung

  1. On the backend, the alias action handles add/remove actions in the same process. In addition, if the user were to interact with the _alias API using devtools, they would be able to configure add/remove actions in one command (https://opensearch.org/docs/latest/api-reference/index-apis/alias/); this implementation would preserve that experience in a way. We could separate them into separate UX, but it would be a purely frontend split essentially. I don't think there would be an issue with separating them (aside from the actual implementation time), but @bowenlan-amzn correct me if I'm wrong.
  2. At the moment, the combo boxes do not populate with a list of defined aliases. @bowenlan-amzn , would we want to populate the combo boxes with existing aliases as well? I can see the value in that, especially for the remove action.

@kamingleung
Copy link

kamingleung commented May 24, 2023

@AWSHurneyt

  1. I would recommend having add and remove as separate actions on the UI. This makes it clear and distinctive on what each action is trying to do. It is also clear when reviewing the policy on the UI.

IF that cannot be done, I would consider the following alternative interaction:
image
"Select aliases to add..." and "Select aliases to remove.." fields will be required if users toggled the switches on.

…/remove combo boxes. Implemented a modal to confirm clearing combo box entries when toggling display.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
@AWSHurneyt
Copy link
Contributor Author

Here are some updated screenshots based on the feedback above.

Fields disabled

Screenshot 2023-05-30 at 10 27 50 AM

Blank fields

Screenshot 2023-05-30 at 10 28 04 AM

Fields with error messages

Screenshot 2023-05-30 at 10 28 56 AM

Fields with valid inputs

Screenshot 2023-05-30 at 10 32 12 AM

Modal that appears when disabling one of the combo boxes while it contains inputs

Screenshot 2023-05-30 at 10 29 13 AM

@kamingleung
Copy link

kamingleung commented May 30, 2023

Modal that appears when disabling one of the combo boxes while it contains inputs

Screenshot 2023-05-30 at 10 29 13 AM

@AWSHurneyt When disabling one of the toggles, instead of asking to clear the field, can we cache the selections, so if the user decides to toggle back on, the selections are still there?

If the user leaves the "Add action" flyout, it will no longer save those selections.

…based on PR feedback.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
@AWSHurneyt
Copy link
Contributor Author

Captured some follow-up enhancements Ming brought up in issue #777

@AWSHurneyt
Copy link
Contributor Author

As mentioned in #754 (comment), the cypress test workflow is currently failing in the main branch; but in this PR AWSHurneyt#2, we can see that they succeed when executed against the 2.x branch.

@AWSHurneyt AWSHurneyt merged commit 5f5a172 into opensearch-project:main May 31, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 31, 2023
* Implemented UX component for configuring and editing alias actions.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Implemented unit and integration tests for alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored existing test to accommodate addition of alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a bug preventing validation messages from appearing under both combo boxes at once.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed redundant 'popout' icons from 'Learn more' links. Having 'target="_blank"' in the link attributes provides the icon. Updated snapshots.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Added unit tests for AliasUiAction.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored alias action UX to include toggles to hide/display the add/remove combo boxes. Implemented a modal to confirm clearing combo box entries when toggling display.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored UX to remove the alias combo box clear confirmation modal based on PR feedback.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated the 2.8 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 5f5a172)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 31, 2023
* Implemented UX component for configuring and editing alias actions.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Implemented unit and integration tests for alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored existing test to accommodate addition of alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a bug preventing validation messages from appearing under both combo boxes at once.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed redundant 'popout' icons from 'Learn more' links. Having 'target="_blank"' in the link attributes provides the icon. Updated snapshots.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Added unit tests for AliasUiAction.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored alias action UX to include toggles to hide/display the add/remove combo boxes. Implemented a modal to confirm clearing combo box entries when toggling display.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored UX to remove the alias combo box clear confirmation modal based on PR feedback.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated the 2.8 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 5f5a172)
bowenlan-amzn pushed a commit that referenced this pull request May 31, 2023
* Implemented UX component for configuring and editing alias actions.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Implemented unit and integration tests for alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored existing test to accommodate addition of alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a bug preventing validation messages from appearing under both combo boxes at once.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed redundant 'popout' icons from 'Learn more' links. Having 'target="_blank"' in the link attributes provides the icon. Updated snapshots.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Added unit tests for AliasUiAction.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored alias action UX to include toggles to hide/display the add/remove combo boxes. Implemented a modal to confirm clearing combo box entries when toggling display.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored UX to remove the alias combo box clear confirmation modal based on PR feedback.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated the 2.8 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 5f5a172)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
bowenlan-amzn pushed a commit that referenced this pull request May 31, 2023
* Implemented UX component for configuring and editing alias actions.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Implemented unit and integration tests for alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored existing test to accommodate addition of alias action UX.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a bug preventing validation messages from appearing under both combo boxes at once.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed redundant 'popout' icons from 'Learn more' links. Having 'target="_blank"' in the link attributes provides the icon. Updated snapshots.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Added unit tests for AliasUiAction.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored alias action UX to include toggles to hide/display the add/remove combo boxes. Implemented a modal to confirm clearing combo box entries when toggling display.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored UX to remove the alias combo box clear confirmation modal based on PR feedback.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated the 2.8 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 5f5a172)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants