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

Open release/quince.3 #400

Open
wants to merge 7 commits 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
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@edx/brand": "npm:@edx/brand-openedx@^1.2.0",
"@edx/frontend-component-footer": "12.2.0",
"@edx/frontend-component-header": "4.6.0",
"@edx/frontend-platform": "5.0.0",
"@edx/frontend-platform": "5.5.4",
"@edx/paragon": "20.45.0",
"@edx/react-unit-test-utils": "1.7.0",
"@edx/reactifex": "^2.1.1",
Expand Down
3 changes: 1 addition & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { AppProvider } from '@edx/frontend-platform/react';
import Footer from '@edx/frontend-component-footer';
import Header from '@edx/frontend-component-header';

import { routePath } from 'data/constants/app';
import store from 'data/store';
import GradebookPage from 'containers/GradebookPage';
import './App.scss';
Expand All @@ -20,7 +19,7 @@ const App = () => (
<main>
<Routes>
<Route
path={routePath}
path="/:courseId"
element={<GradebookPage />}
/>
</Routes>
Expand Down
6 changes: 1 addition & 5 deletions src/App.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AppProvider } from '@edx/frontend-platform/react';
import Footer from '@edx/frontend-component-footer';
import Header from '@edx/frontend-component-header';

import { routePath } from 'data/constants/app';
import store from 'data/store';
import GradebookPage from 'containers/GradebookPage';

Expand All @@ -21,9 +20,6 @@ jest.mock('react-router-dom', () => ({
jest.mock('@edx/frontend-platform/react', () => ({
AppProvider: () => 'AppProvider',
}));
jest.mock('data/constants/app', () => ({
routePath: '/:courseId',
}));
jest.mock('@edx/frontend-component-footer', () => 'Footer');
jest.mock('data/store', () => 'testStore');
jest.mock('containers/GradebookPage', () => 'GradebookPage');
Expand Down Expand Up @@ -66,7 +62,7 @@ describe('App router component', () => {
expect(secondChild.find('main')).toEqual(shallow(
<main>
<Routes>
<Route path={routePath} element={<GradebookPage />} />
<Route path="/:courseId" element={<GradebookPage />} />
</Routes>
</main>,
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const useOverrideTableData = () => {
const { formatMessage } = useIntl();

const hide = selectors.grades.useHasOverrideErrors();
const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults;
const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults || [];
const tableProps = {};
if (!hide) {
tableProps.columns = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`FilterMenuToggle component render snapshot 1`] = `
onClick={[MockFunction hooks.toggleFilterMenu]}
>
<Icon
className="mr-1"
src="FilterAlt"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/FilterMenuToggle/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
};
Expand Down
34 changes: 33 additions & 1 deletion src/components/GradesView/GradesView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
}
.grade-history-header{
float: left;
min-width: 170px;
}

.grade-history-assignment{
Expand All @@ -65,7 +66,7 @@
.gradebook-container {
width: 100%;
overflow-x: auto;
height: 600px;
max-height: 600px;
overflow-y: auto;
position: relative;
}
Expand Down Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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]}
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/SearchControls/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SearchControls = () => {
} = useSearchControlsData();

return (
<div>
<div className="search-container">
<SearchField
onSubmit={onSubmit}
inputLabel={inputLabel}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions src/data/constants/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { StrictDict } from 'utils';
import { getConfig } from '@edx/frontend-platform';

export const routePath = `${getConfig().PUBLIC_PATH}:courseId`;

export const views = StrictDict({
grades: 'grades',
Expand Down