Skip to content

Commit 66d130e

Browse files
authored
fix: remove lightning.js, fix dep versions, fix flaky tests, fix release CI (#105)
* fix: remove lightning.js, fix dep versions, fix flaky tests, fix release CI * fix: test-utils test case * test: addressed feedback changes
1 parent 2f3d0c0 commit 66d130e

16 files changed

Lines changed: 891 additions & 1174 deletions

.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,3 @@ SEGMENT_KEY=''
2020
SITE_NAME=''
2121
USER_INFO_COOKIE_NAME=''
2222
SUPPORT_URL=''
23-
LEARNER_FEEDBACK_URL=''
24-
STAFF_FEEDBACK_URL=''

.env.development

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@ SEGMENT_KEY=''
2121
SITE_NAME=localhost
2222
USER_INFO_COOKIE_NAME='edx-user-info'
2323
SUPPORT_URL='https://support.edx.org'
24-
LEARNER_FEEDBACK_URL=''
25-
STAFF_FEEDBACK_URL=''

.env.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ SEGMENT_KEY=''
1919
SITE_NAME='localhost'
2020
USER_INFO_COOKIE_NAME='edx-user-info'
2121
SUPPORT_URL='https://support.edx.org'
22-
LEARNER_FEEDBACK_URL=''
23-
STAFF_FEEDBACK_URL=''

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
- name: Setup Nodejs Env

package-lock.json

Lines changed: 835 additions & 948 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,26 @@
3838
"@fortawesome/free-regular-svg-icons": "^6.6.0",
3939
"@fortawesome/free-solid-svg-icons": "^6.6.0",
4040
"@fortawesome/react-fontawesome": "^0.2.2",
41-
"classnames": "2.5.1",
41+
"classnames": "^2.5.1",
4242
"dompurify": "^3.1.7",
43-
"jest-environment-jsdom": "^29.7.0",
44-
"lodash": "4.18.1",
45-
"timeago.js": "4.0.2",
43+
"lodash": "^4.18.1",
44+
"timeago.js": "^4.0.2",
4645
"uuid": "^10.0.0"
4746
},
4847
"devDependencies": {
4948
"@edx/browserslist-config": "^1.1.1",
50-
"@openedx/frontend-build": "14.6.3",
49+
"@openedx/frontend-build": "^14.6.3",
5150
"@testing-library/jest-dom": "^5.17.0",
5251
"@testing-library/react": "^14.3.1",
53-
"axios-mock-adapter": "1.22.0",
54-
"glob": "7.2.3",
55-
"husky": "7.0.4",
56-
"jest": "29.7.0",
57-
"react": "18.3.1",
58-
"react-dom": "18.3.1",
52+
"axios-mock-adapter": "^1.22.0",
53+
"glob": "^7.2.3",
54+
"husky": "^7.0.4",
55+
"jest": "^29.7.0",
56+
"jest-environment-jsdom": "^29.7.0",
57+
"react": "^18.3.1",
58+
"react-dom": "^18.3.1",
5959
"resize-observer-polyfill": "^1.5.1",
60-
"rosie": "2.1.1",
60+
"rosie": "^2.1.1",
6161
"semantic-release": "^21.0.7"
6262
},
6363
"peerDependencies": {

src/Notification/NotificationTabs.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ import React, {
55
import { Tab, Tabs } from '@openedx/paragon';
66

77
import NotificationSections from './NotificationSections';
8-
import { useFeedbackWrapper } from './utils';
98
import { notificationsContext } from './context/notificationsContext';
109
import { useNotification } from './data/hook';
1110

1211
const NotificationTabs = () => {
13-
useFeedbackWrapper();
1412
const {
1513
appName, handleActiveTab, tabsCount, appsId, updateNotificationData,
1614
} = useContext(notificationsContext);

src/Notification/index.jsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useSearchParams } from 'react-router-dom';
99
import { getConfig } from '@edx/frontend-platform';
1010
import { useIntl } from '@edx/frontend-platform/i18n';
1111
import {
12-
Bubble, Button, Hyperlink, Icon, IconButton, OverlayTrigger, Popover,
12+
Bubble, Hyperlink, Icon, IconButton, OverlayTrigger, Popover,
1313
} from '@openedx/paragon';
1414
import { NotificationsNone, Settings } from '@openedx/paragon/icons';
1515
import { RequestStatus } from './data/constants';
@@ -81,10 +81,6 @@ const Notifications = ({ notificationAppData, margins }) => {
8181
};
8282
}, [handleClickOutsideNotificationTray]);
8383

84-
const enableFeedback = useCallback(() => {
85-
window.usabilla_live('click');
86-
}, []);
87-
8884
const notificationRefs = useMemo(
8985
() => ({ popoverHeaderRef: headerRef, notificationRef: popoverRef }),
9086
[headerRef, popoverRef],
@@ -166,15 +162,6 @@ const Notifications = ({ notificationAppData, margins }) => {
166162
<NotificationTabs />
167163
</NotificationPopoverContext.Provider>
168164
</Popover.Content>
169-
{getConfig().NOTIFICATION_FEEDBACK_URL && (
170-
<Button
171-
onClick={enableFeedback}
172-
variant="warning"
173-
className="notification-feedback-widget"
174-
>
175-
{intl.formatMessage(messages.feedback)}
176-
</Button>
177-
)}
178165
</div>
179166
</Popover>
180167
)}

src/Notification/index.test.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ describe('Notification test cases.', () => {
169169
'Successfully call getNotificationCounts on URL %s change',
170170
async (url) => {
171171
const getNotificationCountsSpy = jest.spyOn(notificationApi, 'getNotificationCounts').mockReturnValue(() => true);
172-
renderComponent(url);
173-
174-
expect(getNotificationCountsSpy).toHaveBeenCalledTimes(1);
172+
await renderComponent(url);
173+
await waitFor(() => {
174+
expect(getNotificationCountsSpy).toHaveBeenCalledTimes(1);
175+
});
175176
},
176177
);
177178
});

src/Notification/messages.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ const messages = defineMessages({
3131
defaultMessage: 'Load more notifications',
3232
description: 'Load more button to load more notifications',
3333
},
34-
feedback: {
35-
id: 'notification.feedback',
36-
defaultMessage: 'Feedback',
37-
description: 'text for feedback widget',
38-
},
3934
allRecentNotificationsMessage: {
4035
id: 'notification.recent.all.message',
4136
defaultMessage: 'That’s all of your recent notifications!',

0 commit comments

Comments
 (0)