Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into bilalqamar95/react-upgrade-to-v17
  • Loading branch information
mashal-m committed Jul 12, 2023
2 parents 0f655a4 + 6095869 commit e9d5d2e
Show file tree
Hide file tree
Showing 23 changed files with 220 additions and 135 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ file in this repo.
Reporting Security Issues
*************************

Please do not report security issues in public. Please email security@tcril.org.
Please do not report security issues in public. Please email security@openedx.org.

.. |ci-badge| image:: https://github.com/openedx/frontend-app-ora-grading/actions/workflows/ci.yml/badge.svg
:target: https://github.com/openedx/frontend-app-ora-grading/actions/workflows/ci.yml
Expand Down
7 changes: 2 additions & 5 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ metadata:
name: 'frontend-app-ora-grading'
description: "Frontend grading experience for Open Response Assessments (ORAs)"
links:
- url: "ora-grading.edx.org"
- url: "https://ora-grading.edx.org"
title: "Production Site"
icon: "Web"
- url: "ora-grading.stage.edx.org"
- url: "https://ora-grading.stage.edx.org"
title: "Stage Site"
icon: "Web"
spec:
owner: group:content-aurora
type: 'website'
lifecycle: 'production'
dependsOn:
- 'edx-ora2'
- 'edx-platform'
150 changes: 107 additions & 43 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 @@ -26,7 +26,7 @@
"dependencies": {
"@edx/brand": "npm:@edx/brand-edx.org@^2.0.3",
"@edx/frontend-component-footer": "^12.0.0",
"@edx/frontend-component-header": "^4.0.4",
"@edx/frontend-component-header": "^4.2.2",
"@edx/frontend-platform": "^4.1.0",
"@edx/paragon": "^20.44.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
Expand Down
33 changes: 33 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": [
"config:base",
"schedule:daily",
":automergeLinters",
":automergeMinor",
":automergeTesters",
":enableVulnerabilityAlerts",
":rebaseStalePrs",
":semanticCommits",
":updateNotScheduled"
],
"packageRules": [
{
"matchDepTypes": [
"devDependencies"
],
"matchUpdateTypes": [
"lockFileMaintenance",
"minor",
"patch",
"pin"
],
"automerge": true
},
{
"matchPackagePatterns": ["@edx", "@openedx"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"timezone": "America/New_York"
}
2 changes: 1 addition & 1 deletion src/components/FilePreview/FileInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const FileInfo = ({ onClick, children }) => (
)}
>
<Button
size="small"
size="sm"
variant="tertiary"
onClick={onClick}
iconAfter={InfoOutline}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`File Preview Card component snapshot 1`] = `
<Button
iconAfter={[MockFunction icons.InfoOutline]}
onClick={[MockFunction this.props.onClick]}
size="small"
size="sm"
variant="tertiary"
>
<FormattedMessage
Expand Down
16 changes: 0 additions & 16 deletions src/config/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/containers/ListView/ListViewBreadcrumb.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ListViewBreadcrumb = ({ courseId, oraName }) => (
</Hyperlink>
<p className="py-4">
<span className="h3">{oraName}</span>
<Hyperlink className="align-middle" destination={urls.ora(courseId, locationId)}>
<Hyperlink className="align-middle" destination={urls.ora(courseId, locationId())}>
<Icon src={Launch} className="d-inline-block" />
</Hyperlink>
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ListView/ListViewBreadcrumb.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('ListViewBreadcrumb component', () => {
test('ora destination', () => {
expect(
el.find(Hyperlink).at(1).props().destination,
).toEqual(urls.ora(props.courseId, constants.locationId));
).toEqual(urls.ora(props.courseId, constants.locationId()));
});
});
describe('mapStateToProps', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/data/constants/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getConfig } from '@edx/frontend-platform';

export const routePath = `${getConfig().PUBLIC_PATH}:courseId`;
export const locationId = window.location.pathname.replace(getConfig().PUBLIC_PATH, '');
export const routePath = () => `${getConfig().PUBLIC_PATH}:courseId`;
export const locationId = () => window.location.pathname.replace(getConfig().PUBLIC_PATH, '');
4 changes: 2 additions & 2 deletions src/data/constants/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jest.mock('@edx/frontend-platform', () => {

describe('app constants', () => {
test('route path draws from public path and adds courseId', () => {
expect(constants.routePath).toEqual(`${platform.PUBLIC_PATH}:courseId`);
expect(constants.routePath()).toEqual(`${platform.PUBLIC_PATH}:courseId`);
});
test('locationId returns trimmed pathname', () => {
const old = window.location;
window.location = { pathName: `${platform.PUBLIC_PATH}somePath.jpg` };
expect(constants.locationId).toEqual(window.location.pathname.replace(platform.PUBLIC_PATH, ''));
expect(constants.locationId()).toEqual(window.location.pathname.replace(platform.PUBLIC_PATH, ''));
window.location = old;
});
});
2 changes: 1 addition & 1 deletion src/data/redux/grading/selectors/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ validation.criteria = createSelector(
criterion.feedback === feedbackRequirement.required
&& gradingData.criteria[index].feedback === ''
),
selectedOption: gradingData.criteria[index].selectedOption !== '',
selectedOption: rubricConfig.criteria[index].options.length === 0 || gradingData.criteria[index].selectedOption !== '',
})),
);

Expand Down
Loading

0 comments on commit e9d5d2e

Please sign in to comment.