Improve autocomplete selection #54

Closed
opened 2022-01-05 14:54:30 +01:00 by mpeltriaux · 2 comments
Owner

Status quo

Currently the autocomplete selection looks like this:
grafik

Due to the parent > child structure, these entries are not as comfortable to read as it could. We should improve this!

Improvement

Django autocomplete light is build on the select2 javascript library. The select2 documentation states, that there is a labeling option, which can be easily used to categorize entries: https://select2.org/appearance#labels
The result looks a lot better and suits or needs:

grafik

We should find a way to activate this option in dal.

# Status quo Currently the autocomplete selection looks like this: ![grafik](/attachments/6a07f5b7-79e6-46a5-8426-5f2541d4c562) Due to the `parent > child` structure, these entries are not as comfortable to read as it could. We should improve this! # Improvement `Django autocomplete light` is build on the `select2` javascript library. The `select2` documentation states, that there is a labeling option, which can be easily used to categorize entries: https://select2.org/appearance#labels The result looks a lot better and suits or needs: ![grafik](/attachments/45b9518b-d2e5-4f6c-9ba5-4e8d27a02fdc) We should find a way to activate this option in `dal`.
mpeltriaux added the
enhancement
label 2022-01-05 14:54:30 +01:00
mpeltriaux self-assigned this 2022-01-05 14:54:30 +01:00
Author
Owner

Improvement

Using Select2GroupQuerySet as base class for KonovaCodeAutocomplete and some further enhancements on the codebase, the result looks good. Configuration of e.g. ordering is still possible, depending on the inheriting subclass.

Selection of biotopes

grafik

Selection of registration office

grafik

Selected values with parents

Parent > child relation is still shown on selected values to make visible which "type" of value has been selected. E.g. for registration offices important where the same office name is selectable for different responsibilities.
grafik

# Improvement Using `Select2GroupQuerySet` as base class for `KonovaCodeAutocomplete` and some further enhancements on the codebase, the result looks good. Configuration of e.g. ordering is still possible, depending on the inheriting subclass. ## Selection of biotopes ![grafik](/attachments/71497b37-be0d-4641-be89-083994f39090) ## Selection of registration office ![grafik](/attachments/d39a1aaa-df31-4b36-8cfc-b63ec1a701d3) ## Selected values with parents Parent > child relation is still shown on selected values to make visible which "type" of value has been selected. E.g. for registration offices important where the same office name is selectable for different responsibilities. ![grafik](/attachments/40b198e4-8cef-4f30-942e-59a3ddcda0b4)
mpeltriaux referenced this issue from a commit 2022-01-07 13:50:46 +01:00
Author
Owner

Merged in #59

# Merged in #59
btuelek referenced this issue from a commit 2024-12-05 13:18:36 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: IT-Naturschutz/konova#54
No description provided.