Skip to content

Commit

Permalink
feat: re-organise help pages navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
jorilindell committed May 7, 2024
1 parent 853682d commit ad4e7b2
Show file tree
Hide file tree
Showing 21 changed files with 356 additions and 660 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/help.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ test.describe('Help page', () => {

await page
.getByLabel('Lisätietoa palvelusta')
.getByRole('link', { name: 'Linked Registration -ohje' })
.getByRole('link', { name: 'Ilmoittautumisen ohjeet' })
.click();
await expect
.soft(page.getByRole('heading', { name: 'Linked Registration -ohje' }))
.soft(page.getByRole('heading', { name: 'Ilmoittautumisen ohjeet' }))
.toBeVisible();

await page
Expand Down
4 changes: 1 addition & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export enum ROUTES {
INSTRUCTIONS = '/help/instructions',
INSTRUCTIONS_CONTROL_PANEL = '/help/instructions/control-panel',
INSTRUCTIONS_FAQ = '/help/instructions/faq',
INSTRUCTIONS_GENERAL = '/help/instructions/general',
INSTRUCTIONS_PLATFORM = '/help/instructions/platform',
INSTRUCTIONS_REGISTRATION = '/help/instructions/registration',
KEYWORDS = '/administration/keywords',
KEYWORD_SETS = '/administration/keyword-sets',
Expand All @@ -68,11 +66,11 @@ export enum ROUTES {
SUPPORT = '/help/support',
SUPPORT_ASK_PERMISSION = '/help/support/ask-permission',
SUPPORT_CONTACT = '/help/support/contact',
SUPPORT_SERVICE_INFORMATION = '/help/support/service-information',
SUPPORT_TERMS_OF_USE = '/help/support/terms-of-use',
TECHNOLOGY = '/help/technology',
TECHNOLOGY_API = '/help/technology/api',
TECHNOLOGY_DOCUMENTATION = '/help/technology/documentation',
TECHNOLOGY_GENERAL = '/help/technology/general',
TECHNOLOGY_IMAGE_RIGHTS = '/help/technology/image-rights',
TECHNOLOGY_SOURCE_CODE = '/help/technology/source-code',
}
Expand Down
2 changes: 1 addition & 1 deletion src/domain/app/footer/__tests__/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test('should show navigation links and should route to correct page after clicki
{ name: 'Hallinta', url: `/fi${ROUTES.ADMIN}` },
{ name: /ohjeet/i, url: `/fi${ROUTES.INSTRUCTIONS}` },
{ name: /teknologia/i, url: `/fi${ROUTES.TECHNOLOGY}` },
{ name: /tuki/i, url: `/fi${ROUTES.SUPPORT}` },
{ name: /tietoa palvelusta/i, url: `/fi${ROUTES.SUPPORT}` },
{ name: /palvelun ominaisuudet/i, url: `/fi${ROUTES.FEATURES}` },
];

Expand Down
94 changes: 24 additions & 70 deletions src/domain/app/footer/__tests__/__snapshots__/Footer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -136,52 +136,6 @@ exports[`matches snapshot 1`] = `
>
Instruktioner
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/instructions/general"
>
<svg
aria-hidden="true"
aria-label="angle-right"
class="Icon-module_icon__1Jtzj icon_hds-icon__1YqNC Icon-module_s__2WGWe icon_hds-icon--size-s__2Lkik FooterLink-module_subItemIcon__2UHZi"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
<span>
Allmänt
</span>
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/instructions/platform"
>
<svg
aria-hidden="true"
aria-label="angle-right"
class="Icon-module_icon__1Jtzj icon_hds-icon__1YqNC Icon-module_s__2WGWe icon_hds-icon--size-s__2Lkik FooterLink-module_subItemIcon__2UHZi"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
<span>
Plattform
</span>
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/instructions/control-panel"
Expand Down Expand Up @@ -265,29 +219,6 @@ exports[`matches snapshot 1`] = `
>
Teknologi
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/technology/general"
>
<svg
aria-hidden="true"
aria-label="angle-right"
class="Icon-module_icon__1Jtzj icon_hds-icon__1YqNC Icon-module_s__2WGWe icon_hds-icon--size-s__2Lkik FooterLink-module_subItemIcon__2UHZi"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
<span>
Allmänt
</span>
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/technology/api"
Expand Down Expand Up @@ -392,7 +323,30 @@ exports[`matches snapshot 1`] = `
class="FooterGroupHeading-module_heading__2iPBU FooterGroupHeading-module_navigation__10BLU"
href="/sv/help/support"
>
Stöd
Kunskap om tjänsten
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
href="/sv/help/support/service-information"
>
<svg
aria-hidden="true"
aria-label="angle-right"
class="Icon-module_icon__1Jtzj icon_hds-icon__1YqNC Icon-module_s__2WGWe icon_hds-icon--size-s__2Lkik FooterLink-module_subItemIcon__2UHZi"
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M13.5 12L8.5 7L10 5.5L16.5 12L10 18.5L8.5 17L13.5 12Z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
<span>
Kunskap om tjänsten
</span>
</a>
<a
class="Link-module_link__TeBQo link_hds-link__5Oxo- Link-module_linkM__30gsY link_hds-link--medium__xEU_F FooterLink-module_item__3Ig3B FooterLink-module_subItem__3unGg FooterLink-module_navigation__1pNfs"
Expand Down
16 changes: 4 additions & 12 deletions src/domain/app/footer/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ const NAVIGATION_GROUP_ITEMS_ADMIN: NavigationGroupItem[] = [
];

const NAVIGATION_GROUP_ITEMS_SUPPORT: NavigationGroupItem[] = [
{
label: 'helpPage.sideNavigation.labelServiceInformation',
url: ROUTES.SUPPORT_SERVICE_INFORMATION,
},
{
label: 'helpPage.sideNavigation.labelTermsOfUse',
url: ROUTES.SUPPORT_TERMS_OF_USE,
Expand All @@ -73,14 +77,6 @@ const NAVIGATION_GROUP_ITEMS_SUPPORT: NavigationGroupItem[] = [
];

const NAVIGATION_GROUP_ITEMS_INSTRUCTIONS: NavigationGroupItem[] = [
{
label: 'helpPage.sideNavigation.labelGeneral',
url: ROUTES.INSTRUCTIONS_GENERAL,
},
{
label: 'helpPage.sideNavigation.labelPlatform',
url: ROUTES.INSTRUCTIONS_PLATFORM,
},
{
label: 'helpPage.sideNavigation.labelControlPanel',
url: ROUTES.INSTRUCTIONS_CONTROL_PANEL,
Expand All @@ -96,10 +92,6 @@ const NAVIGATION_GROUP_ITEMS_INSTRUCTIONS: NavigationGroupItem[] = [
];

const NAVIGATION_GROUP_ITEMS_TECHNOLOGY: NavigationGroupItem[] = [
{
label: 'helpPage.sideNavigation.labelGeneral',
url: ROUTES.TECHNOLOGY_GENERAL,
},
{
label: 'helpPage.sideNavigation.labelApi',
url: ROUTES.TECHNOLOGY_API,
Expand Down
37 changes: 18 additions & 19 deletions src/domain/app/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,6 @@
"pageDescriptionFaq": "Frequently asked questions about Linked Events.",
"pageDescriptionFeatures": "Read about Linked Events features. Get familiar with event management and Linked Events API.",
"pageDescriptionImageRights": "More information about the image rights and licenses for Linked Events.",
"pageDescriptionInstructions": "Help and instructions how to use the service and the API.",
"pageDescriptionSourceCode": "Get a deeper look for Linked Events source code in Github.",
"pageDescriptionTechnology": "More information about the technology behind Linked Events.",
"pageDescriptionTermsOfUse": "Linked Events service Data Privacy and Terms of Use.",
Expand All @@ -1299,14 +1298,24 @@
"pageTitleFaq": "Frequently asked questions",
"pageTitleFeatures": "Service features",
"pageTitleImageRights": "Image Rights",
"pageTitleInstructions": "Support",
"pageTitleSourceCode": "Source code",
"pageTitleSupport": "Information about the service",
"pageTitleTechnology": "Technology",
"pageTitleTermsOfUse": "Data Privacy and Terms of Use",
"platformPage": {
"registrationInstructionsPage": {
"imageAltText1": "After publishing an event: go to the Registration section in Linked Events. Press the Add New button.",
"imageAltText2": "Select the event for which you want to create a registration; you can also type in the field.",
"imageAltText3": "Select the input languages you wish to use and enter any registration instructions and additional text for the confirmation message in the languages you have chosen.",
"imageAltText4": "Please select the mandatory personal data fields on the registration form.",
"imageAltText5": "Add read access rights to the participant list for people who need to access the participant list.",
"imageAltText6": "On the front page of the registration section, you will see a list of events for which registration has been created.",
"imageAltText7": "You can view the participants on the registration section home page by selecting the event from three-dot menu Show participants.",
"pageTitle": "Registration instructions"
},
"serviceInformationPage": {
"imageAlt": "Linked Events use in tablet",
"pageDescription": "Introduction to Linked Events platform and control panel.",
"pageTitle": "Platform",
"pageTitle": "Information about the service",
"textApi": "The public API allows you to retrieve events for your own service. You can also give us a tip about an existing databank that should be incorporated into Linked Events.",
"textEventManagement": "The Linked Events control panel is used to enter events, courses, and volunteering assignments, and to manage related information and materials.",
"textMainContent1": "Linked Events is an open interface developed by the City of Helsinki for events, courses and for volunteering in the City of Helsinki. This site provides tools and instructions for managing events and documentation on how to use the public interface.",
Expand All @@ -1316,21 +1325,11 @@
"textSupport": "Contact us if you require more information or have concerns, or any suggestions on how we could improve the service. In the Support section, you will find more detailed information and a contact form.",
"titleApi": "Linked Events API",
"titleEventManagement": "Event management",
"titlePlatform": "Platform",
"titleRegistration": "Registration management",
"titleServiceHighlights": "Service highlights",
"titleServiceInformation": "Information about the service",
"titleSupport": "Support and further development"
},
"registrationInstructionsPage": {
"imageAltText1": "After publishing an event: go to the Registration section in Linked Events. Press the Add New button.",
"imageAltText2": "Select the event for which you want to create a registration; you can also type in the field.",
"imageAltText3": "Select the input languages you wish to use and enter any registration instructions and additional text for the confirmation message in the languages you have chosen.",
"imageAltText4": "Please select the mandatory personal data fields on the registration form.",
"imageAltText5": "Add read access rights to the participant list for people who need to access the participant list.",
"imageAltText6": "On the front page of the registration section, you will see a list of events for which registration has been created.",
"imageAltText7": "You can view the participants on the registration section home page by selecting the event from three-dot menu Show participants.",
"pageTitle": "Linked Registration instructions"
},
"sideNavigation": {
"labelApi": "API",
"labelAskPermission": "Request access",
Expand All @@ -1342,10 +1341,10 @@
"labelGeneral": "General",
"labelImageRights": "Image rights",
"labelInstructions": "Instructions",
"labelPlatform": "Platform",
"labelRegistrationInstructions": "Linked Registration instructions",
"labelRegistrationInstructions": "Registration instructions",
"labelServiceInformation": "Information about the service",
"labelSourceCode": "Source code",
"labelSupport": "Support",
"labelSupport": "Information about the service",
"labelTechnology": "Technology",
"labelTermsOfUse": "Terms of use",
"toggleButtonLabel": "More information about the service"
Expand Down Expand Up @@ -1483,13 +1482,13 @@
"organization": "organization",
"permission": "permission",
"place": "place",
"platform": "platform",
"priceGroup": "customer group",
"questions": "questions",
"registration": "registration",
"report": "report",
"rights": "rights",
"search": "search",
"serviceInformation": "service information",
"set": "set",
"sourceCode": "source code",
"support": "support",
Expand Down

0 comments on commit ad4e7b2

Please sign in to comment.