feat(mat-select): Improve mat-select harness DX
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
- Domain
- developer-experience, testing
Research direction
Start by reading the linked matAutoComplete harness implementation, especially its handling of getOptions() before open(). Then inspect the matSelectHarness getOptions() and open() entry points and add equivalent feedback when options are requested while closed. Done means the closed-state call reports that open() is required instead of returning an empty array.
Written by the indexing model from the issue text.
Description
Feature Description
Currently, when using matSelectHarness.getOptions(), an empty array is returned if the matSelectHarness.open() method is not called beforehand. This can be confusing for users, who may not realize they need to call matSelectHarness.open() first.
To improve the user experience, I suggest adding an error message similar to what is done in matAutoCompleteHarness, so that if getOptions() is called before open(), an error will be thrown informing the user to call open() first.
This change would save users time and frustration by providing immediate feedback on what they need to do to correctly use the getOptions() method.
matAutoComplete implementation:
https://github.com/angular/components/blob/22e928c4fce56fc3619e7aecd0affbb8972847ae/src/material/autocomplete/testing/autocomplete-harness.ts#L80
I can make a PR for it :)
Thanks.
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 81
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from angular/components
-
area: docs docs gemini-triaged P3
Difficulty 1/5 Under an hour Newbie friendliness 78/100
angular/components#33836 · 1 comment · 1 assignee ·
-
area: material/tree docs gemini-triaged needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
angular/components#33832 ·
-
area: material/datepicker gemini-triaged P4
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
angular/components#33763 · 1 comment · 2 reactions ·
-
area: material/table gemini-triaged P4
Difficulty 1/5 Under an hour Newbie friendliness 88/100
angular/components#33709 · 1 comment ·
-
area: material/table docs gemini-triaged P4
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
angular/components#33455 ·
All issues in angular/components
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100