Skip to content
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

Revert "Mobile scroll fix" #214

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import AboutPage from './components/AboutPage';
import MobileQuestionMenu from './components/MobileQuestionMenu';
import MobileQuestionDock from './components/MobileQuestionDock';
import LeaderboardAdmin from './components/LeaderboardAdmin';
import { mobileStyle } from './theme/QuestionCardBarTheme';

// Your web app's Firebase configuration
const firebaseConfig = {
Expand Down Expand Up @@ -175,11 +174,6 @@ function WebMap() {
top='2.5rem'
direction='row'
//zIndex='-1'
display={mobileStyle(
// hide map-view on mobile when user is selecting a question-card
mobileMenuState === MobileMenuState.SELECT ? 'none' : 'flex',
'flex', // desktop style
)}
>
<MapView
flex='1'
Expand Down
10 changes: 3 additions & 7 deletions src/components/MobileQuestionCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default function MobileQuestionCard({ question, size, variant, mobileMenu
overflowY='scroll'
maxHeight='55vh' // slightly less than the other two tabs because of the subtitle taking up space
marginTop='10px'
display={mobileMenuState === MobileMenuState.EXPANDED_HEADER ? 'inherit' : 'none'}
>
{
question.sections.one.map((list, index) => {
Expand Down Expand Up @@ -146,12 +145,9 @@ export default function MobileQuestionCard({ question, size, variant, mobileMenu
<Image src={question.image} __css={styles.image} />
<Box __css={styles.content}>
<IconButton
icon={<FiX fontSize='3rem'/>}
icon={<FiX />}
display={mobileMenuState === MobileMenuState.COLLAPSED_HEADER ? 'flex' : 'none'}
onClick={(e) => {
e.stopPropagation();
setMobileMenuState(MobileMenuState.SELECT);
}}
onClick={() => setMobileMenuState(MobileMenuState.SELECT)}
position='absolute'
top='0.6rem'
right='0.6rem'
Expand All @@ -164,7 +160,7 @@ export default function MobileQuestionCard({ question, size, variant, mobileMenu
zIndex='1001'
/>
<IconButton
icon={<FaAngleDown fontSize='2rem'/>}
icon={<FaAngleDown />}
display={mobileMenuState === MobileMenuState.EXPANDED_HEADER ? 'flex' : 'none'}
onClick={() => setMobileMenuState(MobileMenuState.COLLAPSED_HEADER)}
position='absolute'
Expand Down
4 changes: 0 additions & 4 deletions src/theme/QuestionCardBarTheme.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ const QuestionCardBarTheme = helpers.defineMultiStyleConfig({
zIndex:'9',
pointerEvents: 'none',
background: mobileStyle('none', containerGradient),

// From https://stackoverflow.com/a/7896882, static position is required to fix scrolling on mobile.
pos: mobileStyle('static', 'inherit'),
WebkitOverflowScrolling: mobileStyle('touch', 'inherit'),
}
},
defaultProps: {},
Expand Down
Loading