Skip to content

Commit 6d424ed

Browse files
authored
feat!: Remove Studio Maintenance link (#642)
This reverts commit 48c49fe. The original commit (a229c34) was merged prematurely, so it was reverted. However, now that we have properly DEPR'd the underlying feature, we can revert that revert. Part of: openedx/openedx-platform#36263
1 parent 5a4279a commit 6d424ed

4 files changed

Lines changed: 0 additions & 34 deletions

File tree

src/Header.messages.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ const messages = defineMessages({
6161
defaultMessage: 'Studio Home',
6262
description: 'Link to the Studio Home',
6363
},
64-
'header.user.menu.studio.maintenance': {
65-
id: 'header.user.menu.studio.maintenance',
66-
defaultMessage: 'Maintenance',
67-
description: 'Link to the Studio Maintenance',
68-
},
6964
'header.label.account.nav': {
7065
id: 'header.label.account.nav',
7166
defaultMessage: 'Account',

src/studio-header/StudioHeader.test.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { Context as ResponsiveContext } from 'react-responsive';
1212
import { MemoryRouter } from 'react-router-dom';
1313

1414
import StudioHeader from './StudioHeader';
15-
import messages from './messages';
1615

1716
const authenticatedUser = {
1817
userId: 3,
@@ -119,16 +118,6 @@ describe('Header', () => {
119118
expect(dropdownOption).toBeVisible();
120119
});
121120

122-
it('maintenance should not be in user menu', async () => {
123-
currentUser = { ...authenticatedUser, administrator: false };
124-
const { getAllByRole, queryByText } = render(<RootWrapper {...props} />);
125-
const userMenu = getAllByRole('button')[1];
126-
await waitFor(() => fireEvent.click(userMenu));
127-
const maintenanceButton = queryByText(messages['header.user.menu.maintenance'].defaultMessage);
128-
129-
expect(maintenanceButton).toBeNull();
130-
});
131-
132121
it('user menu should use avatar icon', async () => {
133122
currentUser = { ...authenticatedUser, avatar: null };
134123
const { getByTestId } = render(<RootWrapper {...props} />);
@@ -190,15 +179,6 @@ describe('Header', () => {
190179
expect(desktopMenu).toBeNull();
191180
});
192181

193-
it('maintenance should be in user menu', async () => {
194-
const { getAllByRole, getByText } = render(<RootWrapper {...props} />);
195-
const userMenu = getAllByRole('button')[1];
196-
await waitFor(() => fireEvent.click(userMenu));
197-
const maintenanceButton = getByText(messages['header.user.menu.maintenance'].defaultMessage);
198-
199-
expect(maintenanceButton).toBeVisible();
200-
});
201-
202182
it('user menu should use avatar image', async () => {
203183
const { getByTestId } = render(<RootWrapper {...props} />);
204184
const avatarImage = getByTestId('avatar-image');

src/studio-header/messages.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ const messages = defineMessages({
66
defaultMessage: 'Studio Home',
77
description: 'Link to Studio Home',
88
},
9-
'header.user.menu.maintenance': {
10-
id: 'header.user.menu.maintenance',
11-
defaultMessage: 'Maintenance',
12-
description: 'Link to the Studio maintenance page',
13-
},
149
'header.user.menu.logout': {
1510
id: 'header.user.menu.logout',
1611
defaultMessage: 'Logout',

src/studio-header/utils.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { getConfig } from '@edx/frontend-platform';
21
import messages from './messages';
32

43
const getUserMenuItems = ({
@@ -21,9 +20,6 @@ const getUserMenuItems = ({
2120
{
2221
href: `${studioBaseUrl}`,
2322
title: intl.formatMessage(messages['header.user.menu.studio']),
24-
}, {
25-
href: `${getConfig().STUDIO_BASE_URL}/maintenance`,
26-
title: intl.formatMessage(messages['header.user.menu.maintenance']),
2723
}, {
2824
href: `${logoutUrl}`,
2925
title: intl.formatMessage(messages['header.user.menu.logout']),

0 commit comments

Comments
 (0)