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

Tweak ProductSelect placeholder text and element width #204

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions web/app/components/inputs/product-select/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@
>
<FlightIcon @name={{or (get-product-id @selected) "folder"}} />

<span class="product-select-selected-value">
{{or @selected "--"}}
<span
class="product-select-selected-value
{{unless @selected 'text-color-foreground-faint'}}"
>
{{or @selected "Select a product/area"}}
</span>

{{#if this.selectedProductAbbreviation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}

.product-select-default-toggle {
@apply min-w-[250px] relative flex items-center justify-start leading-none;
@apply min-w-[300px] relative flex items-center justify-start leading-none;
}

.product-select-toggle-abbreviation {
Expand Down
2 changes: 1 addition & 1 deletion web/tests/acceptance/authenticated/new/doc-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module("Acceptance | authenticated/new/doc", function (hooks) {
const thumbnailBadgeSelector = "[data-test-doc-thumbnail-product-badge]";

assert.dom(toggleSelector).exists();
assert.dom(`${toggleSelector} span`).hasText("--");
assert.dom(`${toggleSelector} span`).hasText("Select a product/area");
assert
.dom(`${toggleSelector} .flight-icon`)
.hasAttribute("data-test-icon", "folder");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ module("Integration | Component | inputs/product-select", function (hooks) {
@onChange={{this.onChange}}
/>
`);
assert.dom(".product-select-selected-value").hasText("--");
assert
.dom(".product-select-selected-value")
.hasText("Select a product/area");
});

test("it displays the products in a dropdown list with abbreviations", async function (this: InputsProductSelectContext, assert) {
Expand Down