Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: UI improvements #318

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
29 changes: 12 additions & 17 deletions src/components/ProgramRecord/ProgramRecord.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import PropTypes from 'prop-types';
import { useParams } from 'react-router-dom';

import {
Info, ArrowBack,
Info, ChevronLeft,
} from '@openedx/paragon/icons';
import {
Alert, Container, Button, Hyperlink,
Alert, Container, Hyperlink,
} from '@openedx/paragon';

import { FormattedMessage } from '@edx/frontend-platform/i18n';
Expand Down Expand Up @@ -76,22 +76,17 @@ function ProgramRecord({ isPublic }) {
};

const renderBackButton = () => (
<Button
variant="tertiary"
iconBefore={ArrowBack}
className="back-to-records"
<Hyperlink
destination={createCorrectInternalRoute('/')}
variant="muted"
>
<Hyperlink
destination={createCorrectInternalRoute('/')}
variant="muted"
>
<FormattedMessage
id="link.back.to.records"
defaultMessage="Back to My Records"
description="A link that takes the user back to their program records"
/>
</Hyperlink>
</Button>
<ChevronLeft />
<FormattedMessage
id="link.back.to.records"
defaultMessage="Back to My Records"
description="A link that takes the user back to their program records"
/>
</Hyperlink>
);

const renderProgramDetails = () => (
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProgramRecord/RecordsHelp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { Hyperlink } from '@openedx/paragon';
function RecordsHelp({ helpUrl }) {
return (
<section className="help">
<h2>
<h3 className="h5">
Copy link
Member

Choose a reason for hiding this comment

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

Why are you switching to a skipped heading level here? The previous heading is h1.

Copy link
Contributor Author

@Lunyachek Lunyachek Apr 18, 2024

Choose a reason for hiding this comment

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

I did it by analogy with this and this files.

Copy link
Member

Choose a reason for hiding this comment

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

the referenced pages aren't best practice, and should eventually be fixed instead of copied 😄 . If you look at the heading list on the programs record list, for example, you can see that Questions about learner records? appears to be one of the program records, so is harder to discover for someone navigating by heading. If it popped back to h2, It would be clearly its own heading, not one of the program records.

a list of headers from the program records page, showing that questions about learner records appears on the list of possible program records

<FormattedMessage
id="help.section.header"
defaultMessage="Questions about Learner Records?"
description="A header for the help section"
/>
</h2>
</h3>
<p>
<FormattedMessage
id="help.section.content.with.link"
Expand Down
Loading