Skip to content

Commit

Permalink
improve UX for ontology search (#632)
Browse files Browse the repository at this point in the history
* remove chevron from ontology search boxes, reformulate placeholder

* remove unused coe

* Update user-interface/frontend/themes/datamanager/components/vaadin-custom.css

Co-authored-by: Tobias Koch <[email protected]>

---------

Co-authored-by: Tobias Koch <[email protected]>
  • Loading branch information
wow-such-code and KochTobi authored Jun 19, 2024
1 parent 1f2dcaf commit c3caea2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ vaadin-multi-select-combo-box::part(toggle-button)::before {
color: var(--lumo-primary-color);
}

/* Hide toggle button */
vaadin-multi-select-combo-box.no-chevron::part(toggle-button) {
display: none;
}

vaadin-number-field::part(decrease-button), vaadin-number-field::part(increase-button) {
color: var(--lumo-primary-color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public MultiSelectComboBox<OntologyTerm> analyteBox() {
MultiSelectComboBox<OntologyTerm> box = newBox();
box.setItems(ontologyFetchCallback(analyteOntologies));

box.setPlaceholder("Please select one or more analytes for your samples");
box.setPlaceholder("Search and select one or more analytes for your samples");
box.setLabel("Analytes");
box.addClassName("full-width-input");
return box;
Expand All @@ -49,7 +49,7 @@ public MultiSelectComboBox<OntologyTerm> speciesBox() {
MultiSelectComboBox<OntologyTerm> box = newBox();
box.setItems(ontologyFetchCallback(speciesOntologies));

box.setPlaceholder("Please select one or more species for your samples");
box.setPlaceholder("Search and select one or more species for your samples");
box.setLabel("Species");
return box;
}
Expand All @@ -61,7 +61,7 @@ public MultiSelectComboBox<OntologyTerm> specimenBox() {
MultiSelectComboBox<OntologyTerm> box = newBox();
box.setItems(ontologyFetchCallback(specimenOntologies));

box.setPlaceholder("Please select one or more specimen for your samples");
box.setPlaceholder("Search and select one or more specimen for your samples");
box.setLabel("Specimen");
return box;
}
Expand All @@ -73,6 +73,8 @@ private static MultiSelectComboBox<OntologyTerm> newBox() {
box.setRenderer(new ComponentRenderer<>(OntologyComponent::new));
box.setItemLabelGenerator(OntologyComboboxFactory::ontologyItemFormatted);
box.addClassName("chip-badge");
box.addClassName("no-chevron");

return box;
}

Expand Down

0 comments on commit c3caea2

Please sign in to comment.