-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep the header sticky on the mission page #1072
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Show resolved
Hide resolved
@@ -9,10 +9,17 @@ import { useLanguageContext, TranslateTextWithContext } from 'components/Context | |||
import { StatusReason } from '../StatusReason' | |||
import { MissionRestartButton } from 'components/Pages/FrontPage/MissionOverview/MissionRestartButton' | |||
|
|||
const HeaderSection = styled.div` | |||
const HeaderSection = styled(Card)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if only the title and buttons were sticky. When status, start date, start time etc. are visible it can be confusing when the mission has a lot of tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit difficult since we can't actually achieve this without moving the title out of the header. The CSS sticky feature only works within the parent component. To have something stay the same position on the screen regardless of its context we need to use "fixed" positioning which does not allow us to only start moving it when we scroll down a certain amount
bba307e
to
eb982a8
Compare
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Show resolved
Hide resolved
frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx
Outdated
Show resolved
Hide resolved
eb982a8
to
8bbd105
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Closes #901