forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Update ontologies selector component (#508)
* init ontologies selector design * ontologies selector options * display ontologies in ontologies selector * finalize ontologies selector design * put ontologies selector in the modal component * fix ontologies result display in ontologies selector * Make ontologies selector search bar work * show ontologies results count in ontologies selector * make groups filter work in ontologies selector * make filter by categories work in ontologies selector * add ontologies selector loading animation * make submission related filters work for ontologies selector * make select all work in ontologies selector * make retired ontologies and views filters work in ontologies selector * fix ontologies style in ontologies selector * add unselect all in ontologies selector * show tab selected checks count in ontologies selector * Clean ontologies selector js controller code * Add loading animation to ontologies selector * make ontology selection work in ontologies selector * add clear selection to ontologies selector * make ontologies selector component * remove duplicated cross icon in ontologies selector * clean ontologies controller code * use rails cache in ontologies selector * replace use cases of the old ontologies selector * delete old ontologies selector code * convert ontologies selector ui component into a helper * replace the usages of the ontologies selector ui component by the ontologies selector helper * replace 'selector' by 'ontologies_selector' in ontologies controller * add internationalisation to ontologies selector * remove the usage of static cache in ontologies selector * extract save and cancel buttons to a reusable helper in ontologies selector * undo extract save and cancel buttons to a reusable helper * add another type to the loader component that uses the style of the three dots * don't use display all in submissions fetching to make it faster in ontologies controller * remove ontology_picker_single code and replace its usages * give type argument in loader component a more significant value * replace ontologies selector text input by text input helper * replace ontologies selector chips components by chips components helpers * extract save and cancel buttons to helpers in the ontologies selector * fix ontologies selector name fild in search annotator and recommender page * fix text input helper label --------- Co-authored-by: Syphax bouazzouni <[email protected]>
- Loading branch information
1 parent
fef53e3
commit 7e2ac60
Showing
34 changed files
with
510 additions
and
584 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.loader-component{ | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.lds-ellipsis.loader-component{ | ||
transform: scale(1); | ||
} | ||
|
||
.lds-ellipsis.loader-component div{ | ||
background: var(--primary-color); | ||
} |
137 changes: 137 additions & 0 deletions
137
app/assets/stylesheets/components/ontologies_selector.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
.ontologies-selector-container{ | ||
width: 800px; | ||
padding: 0 10px; | ||
|
||
} | ||
.ontologies-selector-input{ | ||
position: relative; | ||
padding-bottom: 70px; | ||
} | ||
.ontologies-selector-input input{ | ||
width: 100%; | ||
font-size: 15px; | ||
padding: 15px 20px; | ||
border-radius: 8px; | ||
border: 1px solid #DCDCDC; | ||
outline: none; | ||
position: absolute; | ||
} | ||
.ontologies-selector-input input:focus{ | ||
border: 1px solid #a6a6a6; | ||
} | ||
.ontologies-selector-input svg{ | ||
position: absolute; | ||
top: 17px; | ||
right: 20px; | ||
} | ||
.ontologies-selector-input svg path{ | ||
fill: #a6a6a6; | ||
} | ||
|
||
.ontologies-selector-options .nav-item{ | ||
margin-right: 0px !important; | ||
} | ||
.ontologies-selector-options .tab-items{ | ||
width: 100%; | ||
justify-content: space-between; | ||
} | ||
.ontologies-selector-options .tab-link{ | ||
padding: 0 10px; | ||
} | ||
.ontologies-selector-options .chips{ | ||
margin-top: 10px; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.horizontal-line{ | ||
margin: 10px 0; | ||
width: 100%; | ||
height: 1px; | ||
background-color: #d7d7d7; | ||
border-radius: 100%; | ||
} | ||
|
||
.ontologies-selector-results .chips-container div label > span{ | ||
font-size: 16px; | ||
padding: 10px 15px; | ||
} | ||
.ontologies-selector-results label{ | ||
width: 100% | ||
} | ||
.ontologies-selector-results .chips-container > div{ | ||
margin-right: 0; | ||
} | ||
.ontologies-selector-results .ontologies svg{ | ||
display: none !important; | ||
} | ||
.ontologies-selector-results .ontologies{ | ||
max-height: 300px; | ||
overflow-y: scroll; | ||
} | ||
.save-cancel-buttons{ | ||
display: flex; | ||
justify-content: center; | ||
margin-top: 20px; | ||
} | ||
.ontologies-selector-results .button{ | ||
width: 200px; | ||
} | ||
.ontologies-selector-results .button + .button{ | ||
margin-left: 20px | ||
} | ||
.switch-filters { | ||
display: flex; | ||
} | ||
.switch-filters > div{ | ||
display: flex; | ||
padding: 15px 20px; | ||
border: 1px solid #d7d7d7; | ||
border-radius: 8px; | ||
margin-bottom: 20px; | ||
color: #666666; | ||
} | ||
.switch-filters > div + div{ | ||
margin-left: 20px; | ||
} | ||
|
||
.switch-filters .text{ | ||
margin-right: 20px | ||
} | ||
|
||
.ontologies-selector-results .results-number{ | ||
color: #A1A1A1; | ||
margin: 10px 0; | ||
} | ||
.ontologies-selector-results .results-number span{ | ||
color: var(--primary-color); | ||
} | ||
.ontologies-selector-button{ | ||
display: flex; | ||
justify-content: end; | ||
align-items: center; | ||
} | ||
.ontologies-selector-button .clear-selection{ | ||
margin-top: 5px; | ||
font-size: 15px; | ||
color: var(--primary-color); | ||
margin-right: 20px; | ||
cursor: pointer; | ||
} | ||
.ontologies-selector-button a{ | ||
color: var(--primary-color) !important; | ||
margin-top: 5px; | ||
font-size: 15px; | ||
} | ||
.ontologies-selector-button a svg{ | ||
display: none; | ||
} | ||
.ontologies-selector-button a span{ | ||
display: none; | ||
} | ||
|
||
.ontologies-selector-results .select-all{ | ||
cursor: pointer; | ||
} | ||
.ontologies-selector-button a{ | ||
margin-right: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
.chips-container{class: @disabled ? 'disabled' : ''} | ||
.chips-container{class: @disabled ? 'disabled' : '', 'data-controller': 'tooltip', title: @tooltip} | ||
%div | ||
%label{:for => "chips-#{@id}-check"} | ||
%input{:id => "chips-#{@id}-check", :name => @name, :type => "checkbox", :value => @value, checked: checked?, disabled: @disabled} | ||
%span | ||
%svg.chips-check-icon{:fill => "none", :height => "8", :viewbox => "0 0 10 8", :width => "10", :xmlns => "http://www.w3.org/2000/svg"} | ||
%path{:d => "M9.76764 0.232287C9.45824 -0.0775267 8.95582 -0.0773313 8.646 0.232287L3.59787 5.28062L1.35419 3.03696C1.04438 2.72714 0.542174 2.72714 0.23236 3.03696C-0.0774534 3.34677 -0.0774534 3.84897 0.23236 4.15879L3.03684 6.96326C3.19165 7.11807 3.39464 7.19567 3.59765 7.19567C3.80067 7.19567 4.00386 7.11827 4.15867 6.96326L9.76764 1.3541C10.0775 1.0445 10.0775 0.542081 9.76764 0.232287Z"} | ||
= inline_svg_tag 'check.svg', class: 'chips-check-icon' | ||
%div | ||
= @label | ||
= count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.