Skip to content

feat(select): new tedi-ready component #15#343

Open
mart-sessman wants to merge 9 commits intorcfrom
feat/15-select-tedi-ready-component
Open

feat(select): new tedi-ready component #15#343
mart-sessman wants to merge 9 commits intorcfrom
feat/15-select-tedi-ready-component

Conversation

@mart-sessman
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 99.34641% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tedi/components/form/select/select.component.ts 99.51% 2 Missing ⚠️
...mponents/form/select/select-templates.directive.ts 92.30% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

],
})
export class SelectComponent<T = unknown> implements AfterContentChecked, AfterViewChecked, ControlValueAccessor {
inputId = input.required<string>();
Copy link
Contributor

Choose a reason for hiding this comment

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

add descriptions like in other components

>
@if (searchable()) {
<div class="tedi-select__search-wrapper">
@if (!searchTerm() && selectedValues().length && !multiple()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe extract this to a computed?

Copy link
Contributor

Choose a reason for hiding this comment

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

This template is quite large and nested which makes it harder to read and maintain. Maybe extract it into smaller components?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems like good idea, but might actually add complexity, as elements are quite tightly coupled (state/signals, KB navigation, angular CDK)

flex-wrap: wrap;
gap: var(--form-field-inner-spacing);
align-items: center;
min-height: 1.5em;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is min-height: 1.5em; needed here? If yes, maybe we could use a design token for value instead?

position: relative;
flex: 1;
width: auto;
min-width: 50px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should have a design token, e.g. --input-min-width here?


.tedi-dropdown-item--selected {
* {
color: inherit !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the !imporant here necessary?

label: { control: "text" },
required: { control: "boolean" },
placeholder: { control: "text" },
state: { control: "radio", options: ["error", "valid", "default"] },
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add the same default values as in the component to the args as well.

pointer-events: none;
}

&__radio {
Copy link
Contributor

Choose a reason for hiding this comment

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

According to Figma, selected radio should have a blue dot and border and white background.

@@ -0,0 +1,11 @@
<!-- Project custom tedi-dropdown-item-value directly if provided -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these comments necessary?

import { InjectionToken, Signal, WritableSignal } from "@angular/core";

export interface DropdownApi {
value: WritableSignal<string | undefined>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add descriptions here as well?

@erkidorbek
Copy link
Contributor

Sometime in the relative short past (angular 21), angular team released @angular/aria, which should simplify greatly the development process of combobox/select/etc.

Have we thought about using @angular/aria?

https://angular.dev/guide/aria/overview

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.

4 participants