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] Updates table nullMessage descriptions #10789

Merged
merged 6 commits into from
Jun 26, 2024
Merged
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
21 changes: 5 additions & 16 deletions apps/web/src/components/Table/ResponsiveTable/NullMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { ReactNode } from "react";

import { Heading, Well } from "@gc-digital-talent/ui";

import tableMessages from "../tableMessages";

export interface NullMessageProps {
/** Heading for the message */
title?: ReactNode;
Expand All @@ -23,23 +25,10 @@ const NullMessage = ({ title, description }: NullMessageProps) => {

return (
<Well data-h2-margin="base(x1 0)" data-h2-text-align="base(center)">
<Heading data-h2-margin-top="base(0)" data-h2-font-size="base(copy)">
{title ||
intl.formatMessage({
defaultMessage: "There aren't any items here yet.",
id: "H5kSPB",
description: "Default message for an empty table",
})}
<Heading data-h2-margin="base(0)" data-h2-font-size="base(copy)">
{title || intl.formatMessage(tableMessages.noItemsTitle)}
</Heading>
<p>
{description ||
intl.formatMessage({
defaultMessage:
'Get started by adding an item using the "Add a new item" button provided.',
id: "/GIL9l",
description: "Default description for an empty table",
})}
</p>
{description && <p data-h2-margin-top="base(x1)">{description}</p>}
</Well>
);
};
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/Table/tableMessages.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineMessages } from "react-intl";

const messages = defineMessages({
noItems: {
defaultMessage: "There are no items to display.",
id: "cIqhQK",
description: "Message when there is no data to display in a table",
noItemsTitle: {
defaultMessage: "There aren't any items here.",
id: "84XrK+",
description: "Default message for an empty table",
},
});

Expand Down
52 changes: 40 additions & 12 deletions apps/web/src/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
"defaultMessage": "Voir {name} <hidden>{hiddenLabel}</hidden>",
"description": "Title displayed for the View Item column."
},
"+zSc5y": {
"defaultMessage": "Utilisez le bouton \"Créer une équipe\" pour commencer.",
"description": "Instructions for adding a team item."
},
"/+naWC": {
"defaultMessage": "À évaluer",
"description": "Message displayed when candidate has yet to be assessed at a specific assessment step"
Expand Down Expand Up @@ -231,10 +235,6 @@
"defaultMessage": "J'envisagerais d'accepter un emploi d'une durée de...",
"description": "Legend Text for required work preferences options in work preferences form"
},
"/GIL9l": {
"defaultMessage": "Ajoutez un élément pour commencer en cliquant sur le bouton afficher « Ajouter un nouvel élément ».",
"description": "Default description for an empty table"
},
"/I7wrY": {
"defaultMessage": "Lier des compétences en vedette",
"description": "Title for skills on Experience form"
Expand Down Expand Up @@ -351,6 +351,10 @@
"defaultMessage": "Statut du bassin de candidats",
"description": "Label for the current applications pool status"
},
"/pbxol": {
"defaultMessage": "Utilisez le bouton \"Ajouter une nouvelle adhésion\" pour commencer.",
"description": "Instructions for adding team membership to a user."
},
"/qN7tM": {
"defaultMessage": "Expérience supprimée",
"description": "Message displayed to user after experience deleted."
Expand Down Expand Up @@ -403,6 +407,10 @@
"defaultMessage": "Avez-vous d'autres questions? N'hésitez pas à <link> communiquer avec notre équipe</link> pour obtenir de plus amples renseignements. ",
"description": "Third paragraph for pool closing date dialog"
},
"07sCDh": {
"defaultMessage": "Utilisez le bouton \"Créer un processus\" pour commencer.",
"description": "Instructions for adding a process item."
},
"08rkLr": {
"defaultMessage": "Durée de la possibilité",
"description": "Label for a process' opportunity employment duration"
Expand Down Expand Up @@ -531,6 +539,10 @@
"defaultMessage": "Complet",
"description": "Simplified status label for a complete process advertisement or assessment"
},
"0jwdac": {
"defaultMessage": "Utilisez le bouton \"Créer une compétence\" pour commencer.",
"description": "Instructions for adding a skill item."
},
"0k6j4V": {
"defaultMessage": "Tâches de travail (anglais)",
"description": "Label for a process' English work tasks"
Expand Down Expand Up @@ -1819,6 +1831,10 @@
"defaultMessage": "J'envisagerais d'accepter un emploi qui...",
"description": "Legend for optional work preferences check list in work preferences form"
},
"84XrK+": {
"defaultMessage": "On ne trouve aucun élément ici.",
"description": "Default message for an empty table"
},
"84rSVg": {
"defaultMessage": "Permettre une croissance dans le cadre de sa portée de recrutement, en ciblant d’autres domaines professionnels à l’avenir.",
"description": "Talent portal strategy item 2 content"
Expand Down Expand Up @@ -3463,10 +3479,6 @@
"defaultMessage": "En savoir plus sur cette possibilité et commencer à rédiger une demande d'emploi.",
"description": "Subtitle for a pool advertisement page"
},
"H5kSPB": {
"defaultMessage": "On ne trouve aucun élément jusqu’à présent.",
"description": "Default message for an empty table"
},
"H8cs1r": {
"defaultMessage": "Services consultatifs auprès des secteurs d’activité de la <abbreviation>TI</abbreviation>",
"description": "Title for the 'business line advisory services' IT work stream"
Expand Down Expand Up @@ -5479,6 +5491,10 @@
"defaultMessage": "Vous recevrez des candidats qui ont :",
"description": "Title for the candidate list in the 'Indigenous talent ready for IT apprenticeships' section"
},
"SfbDLA": {
"defaultMessage": "Utilisez le bouton \"Ajouter un nouveau membre\" pour commencer.",
"description": "Instructions for adding a member to a team."
},
"SfhT1q": {
"defaultMessage": "Acquérir de l'expérience en matière d'embauche",
"description": "Title to get hiring experience"
Expand Down Expand Up @@ -5647,6 +5663,10 @@
"defaultMessage": "Solutions logicielles de la <abbreviation>TI</abbreviation>",
"description": "Title for the 'software solutions' IT work stream"
},
"Tl2FNA": {
"defaultMessage": "Utilisez le bouton \"Créer une classification\" pour commencer.",
"description": "Instructions for adding a classification item."
},
"TomxAe": {
"defaultMessage": "{time} le {date}",
"description": "A datetime formatted as a certain time on a certain date"
Expand Down Expand Up @@ -6086,6 +6106,10 @@
"defaultMessage": "{title} évaluation - {skillName}",
"description": "Header for application screening decision dialog."
},
"WCOVvw": {
"defaultMessage": "Utilisez le bouton \"Ajouter un nouveau rôle\" pour commencer.",
"description": "Instructions for adding a role to a user."
},
"WDKT2K": {
"defaultMessage": "Qu'est-ce qu'une CléGC?",
"description": "GCKey question for what is GCKey"
Expand Down Expand Up @@ -7274,10 +7298,6 @@
"defaultMessage": "Candidature",
"description": "Label for the application link column"
},
"cIqhQK": {
"defaultMessage": "Il n'y a aucun élément à afficher.",
"description": "Message when there is no data to display in a table"
},
"cL3OoZ": {
"defaultMessage": "Notification non lue",
"description": "Link text to show unread notifications"
Expand Down Expand Up @@ -11302,6 +11322,10 @@
"defaultMessage": "Un code d’identification de dossier personnel (CIDP)",
"description": "Item 4 in the candidate list in the 'Indigenous talent ready for IT apprenticeships' section"
},
"yat9wx": {
"defaultMessage": "Utilisez le bouton \"Créer un ministère\" pour commencer.",
"description": "Instructions for adding a department item."
},
"ybzxmU": {
"defaultMessage": "Membre des FAC",
"description": "Veteran/member label"
Expand Down Expand Up @@ -11478,6 +11502,10 @@
"defaultMessage": "Sélectionner des compétences dans votre bibliothèque ou en ajouter de toutes nouvelles.",
"description": "Subtitle for the find a skill dialog within the skill showcase"
},
"zp1ShM": {
"defaultMessage": "Utilisez le bouton \"Créer une famille de compétences\" pour commencer.",
"description": "Instructions for adding a skill family item."
},
"zp8FqH": {
"defaultMessage": "Vos réponses aux <strong>questions de présélection seront évaluées</strong> dans le cadre de votre demande d'emploi. Veillez donc à consacrer à chaque question le temps et la réflexion nécessaires pour donner une réponse qui vous reflète réellement votre identité et votre expérience.",
"description": "Application step for additional questions, introduction description, paragraph two"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ export const ClassificationTable = ({
from: currentUrl,
},
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage:
'Use the "Create Classification" button to get started.',
id: "Tl2FNA",
description: "Instructions for adding a classification item.",
}),
}}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/pages/Departments/components/DepartmentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ export const DepartmentTable = ({
from: currentUrl,
},
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage: 'Use the "Create Department" button to get started.',
id: "yat9wx",
description: "Instructions for adding a department item.",
}),
}}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,13 @@ const PoolTable = ({ title, initialFilterInput }: PoolTableProps) => {
}),
},
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage: 'Use the "Create process" button to get started.',
id: "07sCDh",
description: "Instructions for adding a process item.",
}),
}}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ export const SkillFamilyTable = ({
from: currentUrl,
},
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage:
'Use the "Create Skill Family" button to get started.',
id: "zp1ShM",
description: "Instructions for adding a skill family item.",
}),
}}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/pages/Skills/components/SkillTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ const SkillTable = ({
}
: undefined
}
nullMessage={{
description: intl.formatMessage({
defaultMessage: 'Use the "Create skill" button to get started.',
id: "0jwdac",
description: "Instructions for adding a skill item.",
}),
}}
filter={{
state: filterState,
component: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ export const TeamTable = ({
from: currentUrl,
},
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage: 'Use the "Create Team" button to get started.',
id: "+zSc5y",
description: "Instructions for adding a team item.",
}),
}}
/>
);
};
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/pages/Teams/TeamMembersPage/TeamMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ const TeamMembers = ({ teamQuery }: TeamMembersProps) => {
add: {
component: <AddTeamMemberDialog team={team} members={members} />,
},
nullMessage: {
description: intl.formatMessage({
defaultMessage: 'Use the "Add new member" button to get started.',
id: "SfbDLA",
description: "Instructions for adding a member to a team.",
}),
},
})}
/>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ const IndividualRoleTable = ({
/>
),
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage: 'Use the "Add new role" button to get started.',
id: "WCOVvw",
description: "Instructions for adding a role to a user.",
}),
}}
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ const TeamRoleTable = ({
/>
),
}}
nullMessage={{
description: intl.formatMessage({
defaultMessage:
'Use the "Add new membership" button to get started.',
id: "/pbxol",
description: "Instructions for adding team membership to a user.",
}),
}}
/>
</>
);
Expand Down
Loading