Skip to content

Commit

Permalink
adjusted programmatic rendering of embed button, took out extra scree…
Browse files Browse the repository at this point in the history
…nsize breakpoint, modified embed css change
  • Loading branch information
srietkerk committed Apr 30, 2024
1 parent c584e8f commit d8472f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion react-common/components/share/ShareInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
const [ isAnonymous, setIsAnonymous ] = React.useState(!isLoggedIn || anonymousShareByDefault);
const [ isShowingMultiConfirmation, setIsShowingMultiConfirmation ] = React.useState(false);
// this is 854 because we have some dissonance between our styling and semantic ui's styling
const hideEmbed = useWindowWidth() <= 854;
const hideEmbed = useWindowWidth() <= 766;

const { simScreenshot, simGif } = pxt.appTarget.appTheme;
const showSimulator = (simScreenshot || simGif) && !!simRecorder;
Expand Down
12 changes: 0 additions & 12 deletions react-common/styles/controls/Modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,6 @@
}
}

@media @mobileShare {
.common-modal-body {
padding-top: 0.5rem;
padding-bottom: 0;
}

.common-modal-header {
height: 2.5rem;
align-items: center;
}
}

@media @smallMobileShare {
.wide>.common-modal {
height: 95%;
Expand Down
8 changes: 3 additions & 5 deletions react-common/styles/react-common-breakpoints.less
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
@mobileBreakpoint: 320px;
@shareModalBreakpoint: 440px;
@tabletBreakpoint: 768px;
@computerBreakpoint: 992px;
@largeMonitorBreakpoint: 1200px;
@widescreenMonitorBreakpoint: 1920px;

@smallShareScreen : (@mobileBreakpoint + 1px);
@smallMobileScreen: (@mobileBreakpoint + 1px);
@largestMobilePortraitScreen: (@mobileBreakpoint + 100px);
@largestMobileScreen: (@tabletBreakpoint - 1px);
@largestTabletScreen: (@computerBreakpoint - 1px);
@shareScreen: (@shareModalBreakpoint + 1px);
@largestSmallMonitor: (@largeMonitorBreakpoint - 1px);
@largestLargeMonitor: (@widescreenMonitorBreakpoint - 1px);

@portraitMobileAndBelow: ~"only screen and (max-width: @{largestMobilePortraitScreen})";
@mobileAndBelow: ~"only screen and (max-width: @{largestMobileScreen})";
@mobileShare: ~"only screen and (max-width: @{shareScreen})";
@smallMobileShare: ~"only screen and (max-width: @{smallShareScreen}) and (max-height: 438px)";
@mobileShare: ~"only screen and (max-width: @{largestMobilePortraitScreen})";
@smallMobileShare: ~"only screen and (max-width: @{smallMobileScreen})";
@tabletAndBelow: ~"only screen and (max-width: @{largestTabletScreen})";
@computerAndBelow: ~"only screen and (max-width: @{largestSmallMonitor})";
@largeMonitorAndBelow: ~"only screen and (max-width: @{largestLargeMonitor})";
Expand Down
5 changes: 2 additions & 3 deletions react-common/styles/share/share.less
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,10 @@
.gif-recorder-content .thumbnail-controls {
padding: 0 2rem;
}
}

@media only screen and (max-width: 854px) {
.embed.mobile-portrait-hidden {
display: none !important;
color: #323130 !important;
background: #e0e1e2 !important;
}
}

Expand Down

0 comments on commit d8472f7

Please sign in to comment.