Skip to content

Commit

Permalink
button changed QE
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma committed Sep 20, 2023
1 parent 3ff2047 commit af56f38
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 24 deletions.
103 changes: 88 additions & 15 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -262,30 +262,105 @@ html {
}

.queryExpansion {
padding: 12px;
padding: 14px;
margin-bottom: 33px;
border-radius: 5px;
border: solid;
border-radius: 3px;
background-color: #beced8;
margin-top: 0px;
color: #414448;
}
.queryExpansion:hover {
border: solid #414448;
}

.resultsOptions {
display: flex;
flex-direction: column;
/* justify-content: center; */
align-items: center;
.btn-3 {
display: inline-block;
position: relative;
background: none;
border: none;
color: #34495e;
font-size: 14px;
cursor: pointer;
margin-top: -10px;
margin-bottom: 35px;
background: rgba(0, 0, 0, 0.09);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}
.spanQE {
display: block;
padding: 14px 15px;
}

.btn-3::before,
.btn-3::after {
content: '';
width: 0;
height: 1.6px;
position: absolute;
transition: all 0.2s linear;
background: #f3b395;
}

.spanQE::before,
.spanQE::after {
content: '';
width: 1.6px;
height: 0;
position: absolute;
transition: all 0.2s linear;
background: #f3b395;
}

.btn-3:hover::before,
.btn-3:hover::after {
width: 100%;
}

.btn-3:hover .spanQE::before,
.btn-3:hover .spanQE::after {
height: 100%;
}

.btn-3::after {
left: 0;
bottom: 0;
transition-delay: 0.6s;
}

.queryExpansion:hover {
border: solid;
padding: 12px;
border-radius: 4px;
background-color: #eaf5fc;
.spanQE::after {
transition-delay: 0.4s;
right: 0;
bottom: 0;
}
.btn-3::before {
right: 0;
top: 0;
transition-delay: 0.2s;
}
.spanQE::before {
transition-delay: 0s;
left: 0;
top: 0;
}

.btn-3:hover::after {
transition-delay: 0s;
}
.btn-3:hover .spanQE::after {
transition-delay: 0.2s;
}
.btn-3:hover::before {
transition-delay: 0.4s;
}
.btn-3:hover .spanQE::before {
transition-delay: 0.6s;
}

.resultsOptions {
display: flex;
flex-direction: column;
/* justify-content: center; */
align-items: center;
}

.buttonVariants {
Expand All @@ -297,8 +372,6 @@ html {
cursor: pointer;
}



.buttonVariants:hover {
margin-top: 12px;
margin-right: -9px;
Expand Down
19 changes: 10 additions & 9 deletions frontend/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ function Layout (props) {
const [showExtraIndividuals, setExtraIndividuals] = useState(false)
const [showOptions, setShowOptions] = useState(false)



const [options, setOptions] = useState(props.options)

const [referenceName, setRefName] = useState('')
Expand Down Expand Up @@ -120,11 +118,9 @@ function Layout (props) {

const [isSubmitted, setIsSub] = useState(false)


const [selectedCohortsAux, setSelectedCohortsAux] = useState([])

const [arrayFilteringTerms, setArrayFilteringTerms] = useState([])


const [showIds, setShowIds] = useState(false)

Expand Down Expand Up @@ -167,7 +163,6 @@ function Layout (props) {
props.setSelectedCohorts(selectedCohortsAux)
}


const handleCloseModal1 = () => {
setIsOpenModal1(false)
}
Expand Down Expand Up @@ -389,7 +384,6 @@ function Layout (props) {
setExpansionSection(true)
}


useEffect(() => {
if (props.collection === 'Individuals') {
setPlaceholder('filtering term comma-separated, ID><=value')
Expand Down Expand Up @@ -557,12 +551,19 @@ function Layout (props) {
<nav className='navbar'>
<div>
{expansionSection === false && cohorts === false && (
<button onClick={handleQEclick}>
<h2 className='queryExpansion'>Query expansion</h2>
<button onClick={handleQEclick} className='btn-3'>
<span className='spanQE'>Query expansion</span>
</button>
)}
</div>
{expansionSection === true && <HorizontalExpansion arrayFilteringTermsQE={arrayFilteringTermsQE} query={query} setQuery={setQuery} setExpansionSection={setExpansionSection} />}
{expansionSection === true && (
<HorizontalExpansion
arrayFilteringTermsQE={arrayFilteringTermsQE}
query={query}
setQuery={setQuery}
setExpansionSection={setExpansionSection}
/>
)}

{showBar === true && (
<div className='container-fluid'>
Expand Down

0 comments on commit af56f38

Please sign in to comment.