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

UI: Update engine dropdowns #26806

Merged
merged 6 commits into from
May 3, 2024
Merged

UI: Update engine dropdowns #26806

merged 6 commits into from
May 3, 2024

Conversation

hashishaw
Copy link
Contributor

@hashishaw hashishaw commented May 3, 2024

This work is required as part of #26708

As part of the upgrade to Ember 5, we also need to update ember-power-select and ember-basic-dropdown. As part of this upgrade, the dropdown content no longer renders in tests when the dropdown is located within an engine unless @renderInPlace is passed in. Since the changes required can be done separately from the upgrade, I decided to split the work out into its own PR. There are no models used in engines which have editType: 'searchSelect' defined on their attributes, so no updates necessary for FormField.

Another thing we needed to update for this to work for users is to update the styling of toolbar-scroller. With the previous CSS, the dropdown contents were hidden under a scrollbar:
image

With these changes, it renders correctly:
image

After this toolbar update, we are unblocked from adopting HDS Dropdowns in the toolbar.

  • Ent tests pass

- Add aria-label arg
- use label or humanized ID as fallback aria-label
- protect against non-array options arg
@hashishaw hashishaw added this to the 1.17.0-rc milestone May 3, 2024
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 3, 2024
Copy link

github-actions bot commented May 3, 2024

CI Results:
All Go tests succeeded! ✅

@@ -4,7 +4,14 @@
~}}

{{! @onWrap is recommend to be a concurrency task! see <Page::Secret::Details> in KV addon for example }}
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" @onClose={{@onClose}} as |D|>
<BasicDropdown
Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

@@ -3,7 +3,7 @@
SPDX-License-Identifier: BUSL-1.1
~}}

<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" @renderInPlace={{true}} as |D|>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

@@ -57,6 +57,7 @@
@selectLimit="1"
@fallbackComponent="input-search"
@onChange={{this.selectRole}}
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 35 38 (without the div around the button, the button height was off)

@@ -35,7 +35,13 @@
Sign Intermediate
</ToolbarLink>
{{/if}}
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
<BasicDropdown
Copy link
Contributor Author

@hashishaw hashishaw May 3, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 41 20

Looks like it's centered (also in the binary) because it's rendering a DownloadLink. Fixing this is out of scope for this PR

@@ -8,7 +8,13 @@
<ToolbarLink @route="issuers.import" @model={{@backend}} data-test-generate-issuer="import">
Import
</ToolbarLink>
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
<BasicDropdown
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 42 07

@@ -33,7 +33,13 @@
>
Sign Intermediate
</ToolbarLink>
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
<BasicDropdown
Copy link
Contributor Author

@hashishaw hashishaw May 3, 2024

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 45 35

@@ -39,6 +39,7 @@
@disallowNewItems={{true}}
@onChange={{this.handleRolesInput}}
@fallbackComponent="input-search"
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 45 51

@@ -64,6 +65,7 @@
@disallowNewItems={{true}}
@onChange={{this.handleCertificateInput}}
@fallbackComponent="input-search"
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 46 11

@@ -89,7 +91,7 @@
@onChange={{this.handleIssuerSearch}}
@fallbackComponent="input-search"
@shouldRenderName={{true}}
@nameKey={{"issuerName"}}
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 48 30

@@ -89,6 +89,7 @@
@label="Paths in this {{this.config.mode}}"
@options={{this.autoCompleteOptions}}
@search={{perform this.setAutoCompleteOptions}}
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 49 01

@@ -25,6 +25,7 @@
@placeholder="Filter by type"
@inputValue={{if this.typeFilterName (array this.typeFilterName)}}
@onChange={{fn this.onFilterChange "type"}}
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 51 52

@@ -53,6 +53,7 @@
@selectLimit={{1}}
@disallowNewItems={{true}}
@onChange={{this.setMount}}
@renderInPlace={{true}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-05-03 at 10 52 15

@hashishaw hashishaw marked this pull request as ready for review May 3, 2024 16:21
@hashishaw hashishaw requested a review from a team as a code owner May 3, 2024 16:21
Copy link

github-actions bot commented May 3, 2024

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Thank you for the screenshots!

@hashishaw hashishaw merged commit 2a99b36 into main May 3, 2024
51 checks passed
@hashishaw hashishaw deleted the ui/update-engine-dropdowns branch May 3, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants