Skip to content

Commit 9e6fc02

Browse files
authored
Merge pull request #108 from LuCEresearchlab/UI-fix
Question now follows when scrolling
2 parents e5fa413 + 3c3b6b1 commit 9e6fc02

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

frontend/src/components/question_component/QuestionSelect.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ const useStyles = makeStyles((theme: Theme) =>
1616
root: {
1717
width: '100%',
1818
justifyContent: 'center',
19-
position: 'sticky',
20-
top: '100px',
2119
flexGrow: 1
2220
},
2321
paper: {
2422
padding: theme.spacing(2),
25-
position: 'sticky',
2623
textAlign: 'left',
2724
marginLeft: 'auto',
2825
marginRight: 'auto',

frontend/src/components/v2/TaggingUI.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ function TaggingUI({taggingSession, dispatchTaggingSession, taggingClusterSessio
144144
</div>
145145
<Grid container direction={'row'} className={classes.root} spacing={10}>
146146
<Grid item xs={showQuestion ? 4 : 1}>
147-
<Button onClick={() => {
148-
setShowQuestion(!showQuestion)
149-
}}>Q</Button>
150-
<Collapse in={showQuestion}>
147+
<Button
148+
style={{position: 'sticky', top: '1em'}}
149+
onClick={() => {
150+
setShowQuestion(!showQuestion)
151+
}}>Q</Button>
152+
<Collapse in={showQuestion} style={{position: 'sticky', top: '1em'}}>
151153
<QuestionSelect
152154
questions={taggingSession.questions}
153155
selectedQuestion={taggingSession.currentQuestion}

0 commit comments

Comments
 (0)