fix: fix sidebar scrolling and adaptation for mobile

- fix text overload in heading
- fix appearance for sidebar with a short main content
- fix transformation of search and filter button on mobile
- fix extra empty space below main content table
- fix adaptation modal content to mobile view
This commit is contained in:
ihor-romaniuk
2023-10-23 15:53:35 +03:00
parent b536180a3e
commit f303712830
9 changed files with 54 additions and 11 deletions

View File

@@ -21,7 +21,9 @@ exports[`GradebookHeader component render default view shapshot 1`] = `
<div
className="subtitle-row d-flex justify-content-between align-items-center"
>
<h2>
<h2
className="text-break"
>
test-course-id
</h2>
</div>
@@ -49,7 +51,9 @@ exports[`GradebookHeader component render frozen grades snapshot: show frozen wa
<div
className="subtitle-row d-flex justify-content-between align-items-center"
>
<h2>
<h2
className="text-break"
>
test-course-id
</h2>
</div>
@@ -83,7 +87,9 @@ exports[`GradebookHeader component render show bulk management snapshot: show to
<div
className="subtitle-row d-flex justify-content-between align-items-center"
>
<h2>
<h2
className="text-break"
>
test-course-id
</h2>
<Button
@@ -117,7 +123,9 @@ exports[`GradebookHeader component render user cannot view gradebook snapshot: s
<div
className="subtitle-row d-flex justify-content-between align-items-center"
>
<h2>
<h2
className="text-break"
>
test-course-id
</h2>
</div>

View File

@@ -26,7 +26,7 @@ export const GradebookHeader = () => {
</a>
<h1>{formatMessage(messages.gradebook)}</h1>
<div className="subtitle-row d-flex justify-content-between align-items-center">
<h2>{courseId}</h2>
<h2 className="text-break">{courseId}</h2>
{showBulkManagement && (
<Button variant="tertiary" onClick={handleToggleViewClick}>
{formatMessage(toggleViewMessage)}

View File

@@ -7,6 +7,7 @@ exports[`FilterMenuToggle component render snapshot 1`] = `
onClick={[MockFunction hooks.toggleFilterMenu]}
>
<Icon
className="mr-1"
src="FilterAlt"
/>

View File

@@ -21,7 +21,7 @@ export const FilterMenuToggle = () => {
className="btn-primary align-self-start"
onClick={toggleFilterMenu}
>
<Icon src={FilterAlt} /> {formatMessage(messages.editFilters)}
<Icon src={FilterAlt} className="mr-1" /> {formatMessage(messages.editFilters)}
</Button>
);
};

View File

@@ -46,6 +46,7 @@
}
.grade-history-header{
float: left;
min-width: 170px;
}
.grade-history-assignment{
@@ -65,7 +66,7 @@
.gradebook-container {
width: 100%;
overflow-x: auto;
height: 600px;
max-height: 600px;
overflow-y: auto;
position: relative;
}
@@ -122,3 +123,34 @@ select#ScoreView.form-control {
border-right-color: $black;
}
}
#edit-filters-btn {
@include media-breakpoint-down(xs) {
width: 100%;
margin-bottom: 1rem;
}
}
.search-container {
@include media-breakpoint-down(xs) {
width: 100%;
}
}
.pgn__modal-body-content .pgn__data-table-layout-wrapper {
@include media-breakpoint-down(sm) {
clear: both;
padding: 1rem 0;
}
}
.page-gradebook {
position: relative;
.sidebar-container {
position: relative;
}
aside.sidebar {
overflow: auto;
}
}

View File

@@ -1,7 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SearchControls component render snapshot 1`] = `
<div>
<div
className="search-container"
>
<SearchField
inputLabel="test-input-label"
onBlur={[MockFunction hooks.onBlur]}

View File

@@ -18,7 +18,7 @@ export const SearchControls = () => {
} = useSearchControlsData();
return (
<div>
<div className="search-container">
<SearchField
onSubmit={onSubmit}
inputLabel={inputLabel}

View File

@@ -10,7 +10,7 @@ exports[`GradesView component render snapshot 1`] = `
filter-step-heading
</h3>
<div
className="d-flex justify-content-between"
className="d-flex justify-content-between flex-wrap"
>
<FilterMenuToggle />
<SearchControls />

View File

@@ -34,7 +34,7 @@ export const GradesView = ({ updateQueryParams }) => {
{stepHeadings.filter}
</h3>
<div className="d-flex justify-content-between">
<div className="d-flex justify-content-between flex-wrap">
<FilterMenuToggle />
<SearchControls />
</div>