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

Implementation of SingleSelect with filter function #6546

Merged
merged 44 commits into from
Aug 6, 2024

Conversation

anicyne
Copy link
Contributor

@anicyne anicyne commented Jun 14, 2024

Refs: #3694

@anicyne anicyne linked an issue Jun 14, 2024 that may be closed by this pull request
@anicyne anicyne marked this pull request as draft June 14, 2024 13:46
Copy link
Contributor

github-actions bot commented Jun 14, 2024

@anicyne anicyne marked this pull request as ready for review June 19, 2024 11:35
@anicyne anicyne marked this pull request as draft June 19, 2024 11:37
@anicyne anicyne marked this pull request as ready for review June 19, 2024 14:13
@sdvg sdvg self-requested a review June 21, 2024 11:33
@sdvg
Copy link
Member

sdvg commented Jun 21, 2024

Ich habe zunächst mal getestet und mir sind noch folgende Punkte aufgefallen:

  1. Wenn ich mit den Pfeiltasten durch die letzten 2-3 Optionen navigiere, scrollt die gesamte Seite mit.
  2. Wenn der Pfeil-Button fokussiert ist, kann ich ihn nur mit der Leertaste, aber nicht mit Enter betätigen. Ist das gewollt?
  3. Ich kann die fokussierte Option nicht mit der Maus verschieben. Es kann praktisch zwei fokussierte Elemente gleichzeitig geben (eins mit Tastatur und eins mit Maus ausgewählt). Ein natives <select> verhält sich hier anders.
image
  1. Man kann die Komponente auch fokussieren, wenn sie eigentlich deaktiviert ist. Entweder durch Tabben oder wenn man auf den Pfeil klickt:
image
  1. Sollten wir eine Meldung anzeigen, wenn es keine Suchergebnisse gibt? Aktuell wird die Liste einfach ausgeblendet und man könnte denken, es handelt sich um eine Combobox, die freie Eingaben erlaubt (Wert wird erst gelöscht, wenn ich auf eine andere Stelle der Seite klicke? Das sollte vermutlich auch auf blur funktionieren).
image
  1. Bei einem Text-Eingabefeld kann man normalerweise auf den Text doppelklicken, wodurch dieser markiert wird. Versucht man das bei dieser Komponente, öffnen und schließen sich die Optionen und der Fokus geht verloren.

  2. Bei einem Klick auf das X geht der Fokus verloren.

  3. Im Default-Theme sind die Radio-Buttons als solche erkennbar. Wurde das irgendwo definiert oder besprochen? Kommt mir erst mal falsch vor.

image

@sdvg
Copy link
Member

sdvg commented Jun 27, 2024

Neuer Test:

  1. Ich bekomme nicht immer Vorschläge angezeigt, wenn ich etwas eintippe:
image
  1. Wenn ich bereits etwas eingetippt habe und dann den Pfeil klicke, wird meine Auswahl gelöscht.

  2. Die Radio-Buttons sind jetzt ausgeblendet, nehmen aber noch Platz ein:

image
  1. Wenn der Pfeil-Button fokussiert ist, kann ich ihn nur mit der Leertaste, aber nicht mit Enter betätigen. Ist das gewollt?

Das ist weiterhin so. Auf <Enter> wird jetzt das Eingabefeld fokussiert.

  1. Bei der deaktivierten Komponente kann ich weiterhin den X-Button klicken und den Tooltip für den Pfeil aktivieren:
image
  1. "Sollten wir eine Meldung anzeigen, wenn es keine Suchergebnisse gibt? Aktuell wird die Liste einfach ausgeblendet und man könnte denken, es handelt sich um eine Combobox, die freie Eingaben erlaubt (Wert wird erst gelöscht, wenn ich auf eine andere Stelle der Seite klicke? Das sollte vermutlich auch auf blur funktionieren)."

Dieser Punkt ist noch offen.


Die übrigen Punkte sind erledigt, danke!

@anicyne anicyne force-pushed the 3694-feature-singleselect-component branch from ed62da1 to fc7bc9f Compare July 2, 2024 09:42
@anicyne anicyne force-pushed the 3694-feature-singleselect-component branch from 07a0e84 to 6316653 Compare July 2, 2024 14:04
@anicyne anicyne force-pushed the 3694-feature-singleselect-component branch from 6316653 to 25063a5 Compare July 2, 2024 14:09
packages/components/src/schema/components/single-select.ts Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Steht vermutlich nicht im Ticket, aber wir sollten neue Inputs immer auch in den entsprechenden Szenarien ergänzen:

  • inputs-get-value
  • static-form
  • focus-elements

Copy link
Member

Choose a reason for hiding this comment

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

Könntest du die Events anhand der Szenarien bitte einmal durchtesten und korrigieren:

  • bei onInput bekomme ich numbers statt der Werte.
  • ich sehe teilweise Exceptions.
  • bei meinem letzten Test bekam ich false als Wert.

Falls du die Fehler nicht reproduzieren kannst geb gerne noch mal Bescheid, dann dokumentiere ich die Schritte genauer!

image

Copy link
Member

@sdvg sdvg Jul 4, 2024

Choose a reason for hiding this comment

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

static-form konnte ich nicht testen, weil das SingleSelect hier keine Auswahlmöglichkeiten hat.
image

@sdvg
Copy link
Member

sdvg commented Jul 15, 2024

Es gibt noch ein Problem mit dem Fokus-Verschieben mit der Maus. Zum Reproduzieren:

  1. Optionen öffnen
  2. Mit der Maus über die erste Option fahren (nicht klicken)
  3. Pfeiltaste nach oben drücken

Soll: Die letzte Option in der Liste ist fokussiert.
Ist: Die Option, die jetzt unter dem Cursor liegt, ist fokussiert.

screenshot 2024-07-15-15 31 29

@sdvg
Copy link
Member

sdvg commented Jul 15, 2024

Mit getValue stimmt noch etwas nicht: Wenn ich den Wert mit einem Klick auf "X" lösche, bekomme ich immer noch den vorherigen Wert:
screenshot 2024-07-15-15 36 54@2x

✅ Erledigt

sdvg and others added 12 commits July 23, 2024 18:46
…ure-singleselect-component

* 'develop' of github.com:public-ui/kolibri: (43 commits)
  Remove KolSpan from component-list.ts
  fix: correct handling of invalid date inputs
  Remove KolSpan implementation
  (#6568) Review changes
  (#6568) Review changes
  cleanup
  Add more e2e test sample
  Move e2e tests to components folder
  Revert test change
  Test failing test run on CI
  Fix  playwright install
  Migrate Playwright tests to CI workflow
  Move workflow file
  Fix Safari tests
  Configure Playwright E2E tests with setContent pattern
  (#6568) Added label translations to table selection
  (#6568) Added selection control to table component and refactored some code
  chore: release 2.1.4
  Update Readme files
  Update publish.yml
  ...
…ent' into 3694-feature-singleselect-component

* origin/3694-feature-singleselect-component:
  Update all snapshots$ $ Refs: #3694
@deleonio deleonio self-requested a review July 25, 2024 06:40
Copy link
Contributor

@deleonio deleonio left a comment

Choose a reason for hiding this comment

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

Wenn ich in das Feld klicke, dann verliert das Eingabefeld den Fokus wieder. Das Problem hatten wir auch schon bei der Combobox, wo es gelöst ist.

@deleonio deleonio added the nok PR is not okay. label Aug 2, 2024
sdvg and others added 2 commits August 5, 2024 15:02
…ure-singleselect-component

* 'develop' of github.com:public-ui/kolibri: (76 commits)
  chore: release 2.1.6
  Update SECURITY.md
  chore: update deps
  refact: the hash code
  Update all snapshots$ $ Refs: #6674
  Set default radio button selection in drawer controlled sample
  Adjust Root Font size in badge, drawer and icon components
  Fix: use location.hash instead of location.href
  Remove faulty proxy option from inherited webpack config
  Fix bin path
  Remove version number from banner
  Always show error logs
  chore: release 2.1.5
  fix: react sample bootstrap
  allow setting the dev mode via bootstrap
  Add code links for components
  Update all snapshots$ $ Refs: #6559
  Revert publiccode.yml
  Reset lerna version
  Reset versions
  ...
@deleonio deleonio merged commit d7e2220 into develop Aug 6, 2024
5 checks passed
@deleonio deleonio deleted the 3694-feature-singleselect-component branch August 6, 2024 09:29
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2024
@deleonio deleonio removed the nok PR is not okay. label Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Component: SingleSelect mit Filterfunktion
3 participants