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

[ipad] Fix unreachable content on scroll #10199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions teachertool/src/components/styling/CatalogOverlay.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@
}
}
}
}

/* Styles for iPads (portrait mode) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did these numbers come from? is this something that couldn't be done using the breakpoints in react-common-breakpoints.less?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teacher tool defines a set of breakpoints that mirrors react-common's, with a few added. Please use them:

/**** BREAKPOINT QUERIES *****/

Teacher tool doesn't have orientation breaks defined. Does react-common have these available? If not that would something useful to add (either in react-common or here in teacher tool). Something like:

.landscape-only {
    display: initial;
}
.portrait-only {
    display: initial;
}
@media (orentation: landscape) {
    .portrait-only {
        display: none !important;
    }
}
@media (orientation: portrait) {
    .landscape-only {
        display: none !important;
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the numbers on a stack overflow post although I can't find the exact post now... I think I could use the breakpoints in react-common-breakpoints.less for portrait view but I don't see the same dimensions for landscape. Should I add them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kimprice in case it got missed... I made a suggestion for integrating the orientation breakpoints.

.catalog-list {
height: 80%;
}
}

/* Styles for iPads (landscape mode) */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
.catalog-list {
height: 70%;
}
}
}
}
14 changes: 14 additions & 0 deletions teachertool/src/components/styling/TabPanel.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@
background-color: var(--pxt-page-background);
color: var(--pxt-page-foreground);
}

/* Styles for iPads (portrait mode) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
.tabpanel {
height: 80%;
}
}

/* Styles for iPads (landscape mode) */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
.tabpanel {
height: 70%;
}
}