Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
22 changes: 4 additions & 18 deletions src/components/studio-footer/help-components/HelpContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,18 @@ ensureConfig([
const BUTTONS = [
{
as: 'a',
href: 'https://docs.openedx.org/',
href: 'https://docs.openedx.org/en/latest/educators/quickstarts/build_a_course.html',
size: 'sm',
message: messages.edxDocumentationButtonLabel,
message: messages.educatorsDocsButtonLabel,
dataTestid: null,
},
{
as: 'a',
href: 'https://openedx.org/',
href: 'https://sandbox.openedx.org/courses/course-v1:OpenedX+01-2024+2024-1/about',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its intentional to add a sandbox link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are the proposed links openedx/platform-roadmap#440 (comment)

size: 'sm',
message: messages.openEdxPortalButtonLabel,
dataTestid: 'openEdXPortalButton',
},
{
as: 'a',
href: 'https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1',
size: 'sm',
message: messages.edx101ButtonLabel,
message: messages.openEdxDemoCourseButtonLabel,
dataTestid: 'openEdXDemoCourseButton',
},
{
as: 'a',
href: 'https://www.edx.org/course/studiox-creating-a-course-with-edx-studio',
size: 'sm',
message: messages.studioXButtonLabel,
dataTestid: null,
},
];

const HelpContent = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('HelpContent', () => {
it('renders all help buttons', () => {
const config = { SUPPORT_EMAIL: '[email protected]' };
render(<ContentWithContext config={config} />);
expect(screen.getByText(messages.edxDocumentationButtonLabel.defaultMessage)).toBeInTheDocument();
expect(screen.getByText(messages.edx101ButtonLabel.defaultMessage)).toBeInTheDocument();
expect(screen.getByText(messages.educatorsDocsButtonLabel.defaultMessage)).toBeInTheDocument();
expect(screen.getByText(messages.openEdxDemoCourseButtonLabel.defaultMessage)).toBeInTheDocument();
});

it('does not render contact button if SUPPORT_EMAIL is empty', () => {
Expand Down
24 changes: 7 additions & 17 deletions src/components/studio-footer/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,15 @@ const messages = defineMessages({
defaultMessage: 'Hide Studio help',
description: 'Label for button that closes the collapsed section with help buttons',
},
edxDocumentationButtonLabel: {
id: 'authoring.footer.help.edxDocumentation.button.label',
defaultMessage: 'edX documentation',
description: 'Label for button that links to the edX documentation site',
educatorsDocsButtonLabel: {
id: 'authoring.footer.help.educatorsDocs.button.label',
defaultMessage: 'Open edX Educators Docs',
description: 'Label for button that links to the build a course quickstart site',
},
openEdxPortalButtonLabel: {
openEdxDemoCourseButtonLabel: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is changing authoring.footer.help.openEdxPortal.button.label from being the "Label for button that links to the Open edX portal" to the "Label for button that links to the open edX demo course portal" intentional?

It seems like the meaning of this label is changing, so the id should change too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats correct, id changed.

id: 'authoring.footer.help.openEdxPortal.button.label',
defaultMessage: 'Open edX portal',
description: 'Label for button that links to the Open edX portal',
},
edx101ButtonLabel: {
id: 'authoring.footer.help.edx101.button.label',
defaultMessage: 'Enroll in edX 101',
description: 'Label for button that links to the edX 101 course',
},
studioXButtonLabel: {
id: 'authoring.footer.help.studioX.button.label',
defaultMessage: 'Enroll in StudioX',
description: 'Label for button that links to the edX StudioX course',
defaultMessage: 'Open edX Demo Course',
description: 'Label for button that links to the open edX demo course portal',
},
contactUsButtonLabel: {
id: 'authoring.footer.help.contactUs.button.label',
Expand Down