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

fix: small copy/padding changes #1377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const CreateGroupModalContent = ({
<h3>
<FormattedMessage
id="people.management.page.create.group.section.header"
defaultMessage="Create a custom group of members"
defaultMessage="Create a custom group"
description="Header for the section to create a new group."
/>
</h3>
Expand Down
40 changes: 0 additions & 40 deletions src/components/PeopleManagement/EnrollmentsTableColumnHeader.jsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { logError } from '@edx/frontend-platform/logging';
import {
ActionRow, Button, ModalDialog, useToggle,
} from '@openedx/paragon';
import { RemoveCircleOutline } from '@openedx/paragon/icons';
import { RemoveCircle } from '@openedx/paragon/icons';

import GeneralErrorModal from '../GeneralErrorModal';
import { ROUTE_NAMES } from '../../EnterpriseApp/data/constants';
Expand Down Expand Up @@ -56,7 +56,7 @@ const DeleteGroupModal = ({
<FormattedMessage
id="people.management.delete.group.modal.body.2"
defaultMessage={
'By deleting this group you will no longer be able to track analytics associated'
'By deleting this group, you will no longer be able to track analytics associated'
+ ' with this group and the group will be removed from your People Management page.'
}
description="Warning shown when deleting a group part 2."
Expand All @@ -67,7 +67,7 @@ const DeleteGroupModal = ({
<ModalDialog.CloseButton variant="tertiary">
Go back
</ModalDialog.CloseButton>
<Button variant="danger" data-testid="delete-group-button" onClick={removeEnterpriseGroup} iconBefore={RemoveCircleOutline}>
<Button variant="danger" data-testid="delete-group-button" onClick={removeEnterpriseGroup} iconBefore={RemoveCircle}>
Delete group
</Button>
</ActionRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import EditGroupNameModal from './EditGroupNameModal';
import formatDates from '../utils';
import GroupMembersTable from './GroupMembersTable';
import AddMembersModal from '../AddMembersModal/AddMembersModal';
import { makePlural } from '../../../utils';

const GroupDetailPage = () => {
const intl = useIntl();
Expand Down Expand Up @@ -98,7 +99,7 @@ const GroupDetailPage = () => {
/>
</>
)}
subtitle={`${enterpriseGroup.acceptedMembersCount} accepted members`}
subtitle={makePlural(enterpriseGroup.acceptedMembersCount, 'member')}
/>
<Card.Section className="pt-1 x-small">
Created on {formatDates(enterpriseGroup.created)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import TableTextFilter from '../../learner-credit-management/TableTextFilter';
import CustomDataTableEmptyState from '../../learner-credit-management/CustomDataTableEmptyState';
import MemberDetailsTableCell from '../../learner-credit-management/members-tab/MemberDetailsTableCell';
import EnrollmentsTableColumnHeader from '../EnrollmentsTableColumnHeader';
import {
GROUP_MEMBERS_TABLE_DEFAULT_PAGE,
GROUP_MEMBERS_TABLE_PAGE_SIZE,
Expand Down Expand Up @@ -129,7 +128,11 @@ const GroupMembersTable = ({
disableFilters: true,
},
{
Header: EnrollmentsTableColumnHeader,
Header: intl.formatMessage({
id: 'people.management.groups.detail.page.members.columns.recentAction',
defaultMessage: 'Enrollments',
description: 'Enrollments column header in the Members table in the People management Groups detail page',
}),
accessor: 'enrollmentCount',
Cell: ({ row }) => row.original.enrollments,
disableFilters: true,
Expand Down
15 changes: 8 additions & 7 deletions src/components/PeopleManagement/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,20 @@ const PeopleManagementPage = ({ enterpriseId }) => {
) : (
<ZeroState />
)}
<h3 className="mt-3">
<h3 className="mt-4.5">
<FormattedMessage
id="adminPortal.peopleManagement.dataTable.title"
defaultMessage="Your organization's members"
description="Title for people management data table."
/>
</h3>
<FormattedMessage
className="mb-4"
id="adminPortal.peopleManagement.dataTable.subtitle"
defaultMessage="View all members of your organization."
description="Subtitle for people management members data table."
/>
<p className="mb-2">
<FormattedMessage
id="adminPortal.peopleManagement.dataTable.subtitle"
defaultMessage="View all members of your organization."
description="Subtitle for people management members data table."
/>
</p>
<PeopleManagementTable />
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('<CreateGroupModal />', () => {
});
it('Modal renders as expected', async () => {
render(<CreateGroupModalWrapper />);
expect(screen.getByText('Create a custom group of members')).toBeInTheDocument();
expect(screen.getByText('Create a custom group')).toBeInTheDocument();
expect(screen.getByText('Name your group')).toBeInTheDocument();
expect(screen.getByText('Select group members')).toBeInTheDocument();
expect(screen.getByText('Upload a CSV or select members from the table below.')).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('<GroupDetailPageWrapper >', () => {
});
render(<GroupDetailPageWrapper />);
expect(screen.queryAllByText(TEST_GROUP.name)).toHaveLength(2);
expect(screen.getByText('0 accepted members')).toBeInTheDocument();
expect(screen.getByText('0 members')).toBeInTheDocument();
expect(screen.getByText('View group progress')).toBeInTheDocument();
expect(screen.getByText('Add and remove group members.')).toBeInTheDocument();
expect(screen.getByText('Test 2u')).toBeInTheDocument();
Expand All @@ -107,7 +107,7 @@ describe('<GroupDetailPageWrapper >', () => {
sortBy: [{ desc: true, id: 'memberDetails' }],
}));

userEvent.click(screen.getByTestId('members-table-enrollments-column-header'));
userEvent.click(screen.getByText('Enrollments'));
await waitFor(() => expect(mockFetchEnterpriseGroupLearnersTableData).toHaveBeenCalledWith({
filters: [],
pageIndex: 0,
Expand Down
Loading