Skip to content

Commit

Permalink
feat: bump to frontend-build alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
muselesscreator committed Aug 8, 2023
1 parent 398330f commit 7913cd5
Show file tree
Hide file tree
Showing 9 changed files with 3,483 additions and 5,047 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist/
packages/
node_modules/
jest.config.js
webpack.*.js
.eslintrc.js
12 changes: 11 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ on:

jobs:
commitlint:
uses: openedx/.github/.github/workflows/commitlint.yml@master
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: remove tsconfig.json # see issue https://github.com/conventional-changelog/commitlint/issues/3256
run: |
rm -f tsconfig.json
- name: Check commits
uses: wagoid/commitlint-github-action@v5
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ validate:

.PHONY: validate.ci
validate.ci:
npm ci
npm ci --legacy-peer-deps
make validate
8,488 changes: 3,455 additions & 5,033 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@edx/frontend-component-header": "4.0.0",
"@edx/frontend-lib-special-exams": "2.19.1",
"@edx/frontend-platform": "4.3.0",
"@edx/paragon": "20.28.4",
"@edx/paragon": "20.45.5",
"@edx/react-unit-test-utils": "npm:@edx/react-unit-test-utils@1.5.3",
"@fortawesome/fontawesome-svg-core": "1.3.0",
"@fortawesome/free-brands-svg-icons": "5.15.4",
Expand Down Expand Up @@ -65,7 +65,7 @@
},
"devDependencies": {
"@edx/browserslist-config": "1.1.1",
"@edx/frontend-build": "^12.8.27",
"@edx/frontend-build": "^12.9.0-alpha.5",
"@edx/reactifex": "2.1.1",
"@pact-foundation/pact": "^11.0.2",
"@testing-library/jest-dom": "5.16.5",
Expand Down
8 changes: 4 additions & 4 deletions src/courseware/course/sequence/Sequence.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const Sequence = ({
const sequenceMightBeUnit = useSelector(state => state.courseware.sequenceMightBeUnit);
const shouldDisplayNotificationTriggerInSequence = useWindowSize().width < breakpoints.small.minWidth;

const handleNavigate = (destinationUnitId) => {
unitNavigationHandler(destinationUnitId);
};

const handleNext = () => {
const nextIndex = sequence.unitIds.indexOf(unitId) + 1;
if (nextIndex < sequence.unitIds.length) {
Expand All @@ -66,10 +70,6 @@ const Sequence = ({
}
};

const handleNavigate = (destinationUnitId) => {
unitNavigationHandler(destinationUnitId);
};

const logEvent = (eventName, widgetPlacement, targetUnitId) => {
// Note: tabs are tracked with a 1-indexed position
// as opposed to a 0-index used throughout this MFE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ const NotificationTray = ({ intl }) => {
} = useModel('courseHomeMeta', courseId);

// After three seconds, update notificationSeen (to hide red dot)
// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => { setTimeout(onNotificationSeen, 3000); }, []);
const notifyTimeoutCb = () => {
setTimeout(() => onNotificationSeen(), 3000);
};
useEffect(notifyTimeoutCb, []);

return (
<SidebarBase
Expand Down
5 changes: 3 additions & 2 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ export async function initializeTestStore(options = {}, overrideStore = true) {

logUnhandledRequests(axiosMock);

// eslint-disable-next-line no-unused-expressions
!options.excludeFetchCourse && await executeThunk(fetchCourse(courseMetadata.id), store.dispatch);
if (!options.excludeFetchCourse) {
await executeThunk(fetchCourse(courseMetadata.id), store.dispatch);
}

if (!options.excludeFetchSequence) {
await Promise.all(sequenceBlocks
Expand Down
3 changes: 1 addition & 2 deletions src/shared/streak-celebration/StreakCelebrationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ const StreakModal = ({
}) => {
const { org, celebrations, username } = useModel('courseHomeMeta', courseId);
const factoid = getRandomFactoid(intl, streakLengthToCelebrate);
// eslint-disable-next-line no-unused-vars
const [randomFactoid, setRandomFactoid] = useState(factoid); // Don't change factoid on re-render
const [randomFactoid] = useState(factoid); // Don't change factoid on re-render

// Open edX Folks: if you create a voucher with this code, the MFE will notice and show the discount
const discountCode = 'ZGY11119949';
Expand Down

0 comments on commit 7913cd5

Please sign in to comment.