Skip to content

Commit

Permalink
feat: ora mobile responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavkeblysh committed Sep 4, 2024
1 parent c5d9bfb commit 5e03baa
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`Info Popover Component snapshot 1`] = `
</Popover.Content>
</Popover>
}
placement="right-end"
placement="left-end"
trigger="focus"
>
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoPopover/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import messages from './messages';
export const InfoPopover = ({ onClick, children, intl }) => (
<OverlayTrigger
trigger="focus"
placement="right-end"
placement="left-end"
flip
overlay={(
<Popover id="info-popover" className="overlay-help-popover">
Expand Down
10 changes: 10 additions & 0 deletions src/containers/ListView/ListView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ span.pgn__icon.breadcrumb-arrow {
margin-bottom: 0;
}
}

@include media-breakpoint-down(xs) {
.badge {
white-space: normal;
}

.pgn__table-actions > div:first-of-type {
z-index: $zindex-modal !important;
}
}
}
8 changes: 7 additions & 1 deletion src/containers/ReviewActions/ReviewActions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
.review-actions-username {
padding-bottom: map-get($spacers, 3);
}
}
}

@include media-breakpoint-down(xs) {
.overlay-help-popover {
max-width: calc(100% - 60px) !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`ReviewActions component component snapshot: do not show rubric 1`] = `
status="grading-status"
/>
<span
className="small"
className="small text-nowrap"
>
<FormattedMessage
defaultMessage="Score: {pointsEarned}/{pointsPossible}"
Expand Down Expand Up @@ -73,7 +73,7 @@ exports[`ReviewActions component component snapshot: loading 1`] = `
status="grading-status"
/>
<span
className="small"
className="small text-nowrap"
>
<FormattedMessage
defaultMessage="Score: {pointsEarned}/{pointsPossible}"
Expand Down Expand Up @@ -115,7 +115,7 @@ exports[`ReviewActions component component snapshot: show rubric, no score 1`] =
status="grading-status"
/>
<span
className="small"
className="small text-nowrap"
/>
</span>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ReviewActions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ReviewActions = ({
{ gradingStatus && (
<StatusBadge className="review-actions-status mr-3" status={gradingStatus} />
)}
<span className="small">
<span className="small text-nowrap">
{pointsPossible && (
<FormattedMessage
{...messages.pointsDisplay}
Expand Down
7 changes: 5 additions & 2 deletions src/containers/ReviewModal/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useDispatch } from 'react-redux';

import { FullscreenModal } from '@openedx/paragon';
import { FullscreenModal, Truncate, useMediaQuery } from '@openedx/paragon';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';

import LoadingMessage from 'components/LoadingMessage';
Expand All @@ -27,9 +27,12 @@ export const ReviewModal = ({ intl }) => {
isOpen,
closeConfirmModalProps,
} = hooks.rendererHooks({ dispatch, intl });

const isMobile = useMediaQuery({ query: '(max-width: 575.98px)' });

return (
<FullscreenModal
title={title}
title={isMobile ? <Truncate lines={3}>{title}</Truncate> : title}
isOpen={isOpen}
beforeBodyNode={(
<>
Expand Down

0 comments on commit 5e03baa

Please sign in to comment.