-
Notifications
You must be signed in to change notification settings - Fork 2
Nikolas/feature/598 implement new ethical ethical guidelines page #599
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
Merged
Rutjake
merged 8 commits into
dev
from
nikolas/feature/598-implement-new-ethical-ethical-guidelines-page
Dec 1, 2025
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
076944d
scaffold ethical guidelines page route and prepared page
NikolasKataja 6429802
add ethical guidelines sections + i18n section builder
NikolasKataja 6ccc850
add i18n content for ethical guidelines
NikolasKataja 7729bd3
add ethical guidelines link to footer and update tests and stories
NikolasKataja f56afc9
simplify ethical guidelines sidebar labels
NikolasKataja dea4ea3
small i18n title cleanup
NikolasKataja 6447161
Fix footer stories and tests after adding ethics link
NikolasKataja 6e8d642
Remove unused SCSS and refactor hovers into single CSS class
NikolasKataja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
frontend-next-migration/src/app/[lng]/(helper)/ethical-guidelines/_getPage.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { createPage } from '@/app/_helpers'; | ||
| import { EthicalGuidelinesPageProps } from '@/preparedPages/EthicalGuidelinesPage'; | ||
| import { makeEthicalGuidelinesSectionsWithI18n } from '@/entities/PresentationPackages'; | ||
| import { getServerTranslation } from '@/shared/i18n'; | ||
| import { getRouteEthicalGuidelinesPage } from '@/shared/appLinks/RoutePaths'; | ||
| import { defaultOpenGraph } from '@/shared/seoConstants'; | ||
|
|
||
| export async function _getPage(lng: string) { | ||
| const { t } = await getServerTranslation(lng, 'ethics'); | ||
|
|
||
| return createPage<EthicalGuidelinesPageProps>({ | ||
| buildPage: () => ({ | ||
| sections: makeEthicalGuidelinesSectionsWithI18n(t), | ||
| title: t('main-title'), | ||
| }), | ||
| buildSeo: () => ({ | ||
| title: t('main-title'), | ||
| description: t('head-description'), | ||
| keywords: t('head-keywords'), | ||
| openGraph: { | ||
| ...defaultOpenGraph, | ||
| title: t('og-title'), | ||
| description: t('og-description'), | ||
| url: `/${lng}${getRouteEthicalGuidelinesPage()}`, | ||
| }, | ||
| alternates: { | ||
| canonical: `/${lng}${getRouteEthicalGuidelinesPage()}`, | ||
| }, | ||
| }), | ||
| }); | ||
| } |
1 change: 1 addition & 0 deletions
1
frontend-next-migration/src/app/[lng]/(helper)/ethical-guidelines/loading.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { PageLoader as default } from '@/widgets/PageLoader'; |
6 changes: 6 additions & 0 deletions
6
frontend-next-migration/src/app/[lng]/(helper)/ethical-guidelines/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { EthicalGuidelinesPage } from '@/preparedPages/EthicalGuidelinesPage'; | ||
| import { withPageData, withMetadataGenerator } from '@/app/_helpers'; | ||
| import { _getPage } from './_getPage'; | ||
|
|
||
| export const generateMetadata = withMetadataGenerator(_getPage); | ||
| export default withPageData(EthicalGuidelinesPage, _getPage); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...-next-migration/src/entities/PresentationPackages/model/data/ethicalGuidelinesSections.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { createSection } from '../createSection'; | ||
|
|
||
| const i18nKeyPrefixes = ['intro', 'players', 'employees', 'business', 'society', 'law']; | ||
|
|
||
| const imageSrcs = ['']; | ||
| const logoSrc = ''; | ||
|
|
||
| export const EthicalGuidelinesSections = i18nKeyPrefixes.map((key, index) => | ||
| createSection({ | ||
| prefix: key, | ||
| index, | ||
| image: { | ||
| src: imageSrcs[index], | ||
| alt: `${key}-image`, | ||
| }, | ||
| logo: { | ||
| src: logoSrc, | ||
| alt: `${key}-logo`, | ||
| }, | ||
| }), | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
frontend-next-migration/src/preparedPages/EthicalGuidelinesPage/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export { EthicalGuidelinesPageAsync as EthicalGuidelinesPage } from './ui/EthicalGuidelinesPage.async'; | ||
|
|
||
| export type { Props as EthicalGuidelinesPageProps } from './ui/EthicalGuidelinesPage'; |
4 changes: 4 additions & 0 deletions
4
...next-migration/src/preparedPages/EthicalGuidelinesPage/ui/EthicalGuidelinesPage.async.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import dynamic from 'next/dynamic'; | ||
| import { Props } from './EthicalGuidelinesPage'; | ||
|
|
||
| export const EthicalGuidelinesPageAsync = dynamic<Props>(() => import('./EthicalGuidelinesPage')); |
Empty file.
37 changes: 37 additions & 0 deletions
37
frontend-next-migration/src/preparedPages/EthicalGuidelinesPage/ui/EthicalGuidelinesPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| 'use client'; | ||
| import { ScrollTop } from '@/features/ScrollTop'; | ||
| import { classNames } from '@/shared/lib/classNames/classNames'; | ||
| import { WikiContentWithSidebar } from '@/shared/ui/v2/WikiContentWithSidebar'; | ||
| import cls from './EthicalGuidelinesPage.module.scss'; | ||
|
|
||
| interface Section { | ||
| id: string; | ||
| navMenuTitle: string; | ||
| label: string; | ||
| description: string; | ||
| image: string; | ||
| imageAlt: string; | ||
| sidebarLogo: string; | ||
| sidebarLogoAlt: string; | ||
| } | ||
|
|
||
| export type Props = { | ||
| sections: Section[]; | ||
| title: string; | ||
| }; | ||
|
|
||
| const EthicalGuidelinesPage = (props: Props) => { | ||
| const { sections = [], title } = props; | ||
|
|
||
| return ( | ||
| <div className={classNames(cls.pageContainer)}> | ||
| <WikiContentWithSidebar | ||
| sections={sections} | ||
| title={title} | ||
| /> | ||
| <ScrollTop /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default EthicalGuidelinesPage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
frontend-next-migration/src/shared/i18n/locales/en/ethics.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "main-title": "Ethical Guidelines", | ||
|
|
||
| "head-description": "We aim to build a game industry that is fair, responsible and humane – a place where creativity and ethics go hand in hand.", | ||
| "head-keywords": "ethical guidelines, ethics, game community, alt zone", | ||
| "og-title": "Ethical Guidelines - ALT Zone", | ||
| "og-description": "Read Psyche's Royale Gaming's ethical principles for players, team members and partners.", | ||
|
|
||
| "intro-nav-menu-title": "Ethical Guidelines", | ||
| "intro-label": "", | ||
| "intro-description": "We aim to build a game industry that is fair, responsible and humane – a place where creativity and ethics go hand in hand. We want our players, creators and partners to trust that we act transparently, responsibly and with respect for one another.", | ||
|
|
||
| "players-nav-menu-title": "Players", | ||
| "players-label": "Respecting players", | ||
| "players-description": "• We develop games that provide a fair, fun and meaningful experience for all players.<br> • We respect player privacy and handle personal data responsibly and in accordance with data protection laws.<br> • We strive to create content that is appropriate for our audience and respects different backgrounds, cultures and values.<br> • We promote accessibility so that as many people as possible can enjoy our games.", | ||
|
|
||
| "employees-nav-menu-title": "Developers", | ||
| "employees-label": "Team members and developers", | ||
| "employees-description": "• We support a healthy and sustainable work culture, avoiding overload and respecting individual well-being.<br> • We value diversity and equality in all our activities.<br> • We respect copyrights and give recognition to the contributions of every team member and volunteer.", | ||
|
|
||
| "business-nav-menu-title": "Marketing", | ||
| "business-label": "Business and marketing ethics", | ||
| "business-description": "• We act openly and honestly in marketing and communication.<br> • Microtransactions and paid content are always presented clearly and transparently.<br> • We do not exploit player vulnerability or use manipulative game mechanics to drive spending.", | ||
|
|
||
| "society-nav-menu-title": "Responsibility", | ||
| "society-label": "Social responsibility", | ||
| "society-description": "• We avoid stereotypical, discriminatory or offensive portrayals and aim to reinforce positive values.<br> • We consider environmental impact when developing and maintaining our games, as far as reasonably possible.<br> • We believe in the power of games to support learning, community and positive interaction.", | ||
|
|
||
| "law-nav-menu-title": "Legal Compliance", | ||
| "law-label": "Law and accountability", | ||
| "law-description": "• We comply with all applicable laws and regulations, including data protection, copyright and consumer protection legislation.<br> • We are committed to transparency and taking responsibility for our actions.<br> • We actively listen to feedback from players, team members and partners to continuously improve our work." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
frontend-next-migration/src/shared/i18n/locales/fi/ethics.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "main-title": "Eettiset ohjeet", | ||
|
|
||
| "head-description": "Pyrimme rakentamaan pelialaa, joka on reilu, vastuullinen ja inhimillinen – paikka, jossa luovuus ja etiikka kulkevat käsi kädessä.", | ||
| "og-title": "Eettiset ohjeet - ALT Zone", | ||
| "og-description": "Tutustu Psyche's Royale Gamingin eettisiin ohjeisiin pelaajille, työntekijöille ja yhteistyökumppaneille.", | ||
|
|
||
| "intro-nav-menu-title": "Eettiset ohjeet", | ||
| "intro-label": "", | ||
| "intro-description": "Pyrimme rakentamaan pelialaa, joka on reilu, vastuullinen ja inhimillinen – paikka, jossa luovuus ja etiikka kulkevat käsi kädessä. Haluamme, että pelaajamme, tekijämme ja yhteistyökumppanimme voivat luottaa siihen, että toimimme läpinäkyvästi, vastuullisesti ja toisiamme kunnioittaen.", | ||
|
|
||
| "players-nav-menu-title": "Pelaajat", | ||
| "players-label": "Pelaajien kunnioittaminen", | ||
| "players-description": "• Kehitämme pelejä, jotka tarjoavat reilun, hauskan ja merkityksellisen kokemuksen kaikille pelaajille.<br> • Kunnioitamme pelaajien yksityisyyttä ja käsittelemme henkilötietoja vastuullisesti ja tietosuojalainsäädännön mukaisesti.<br> • Pyrimme luomaan sisältöä, joka on sopivaa kohdeyleisölle ja huomioi erilaiset taustat, kulttuurit ja arvot.<br> • Edistämme saavutettavuutta, jotta mahdollisimman moni voi nauttia peleistämme.", | ||
|
|
||
| "employees-nav-menu-title": "Kehittäjät", | ||
| "employees-label": "Työntekijöiden ja kehittäjien oikeudet", | ||
| "employees-description": "• Tuemme terveellistä ja kestävää työkulttuuria, jossa vältetään ylikuormitusta ja kunnioitetaan yksilön hyvinvointia.<br> • Arvostamme monimuotoisuutta ja yhdenvertaisuutta kaikessa toiminnassamme.<br> • Kunnioitamme tekijänoikeuksia ja annamme tunnustusta jokaisen työntekijän ja vapaaehtoisen panokselle.", | ||
|
|
||
| "business-nav-menu-title": "Markkinointi", | ||
| "business-label": "Liiketoiminnan ja markkinoinnin eettisyys", | ||
| "business-description": "• Toimimme avoimesti ja rehellisesti markkinoinnissa ja viestinnässä.<br> • Mikrotransaktiot ja maksullinen sisältö esitetään aina selkeästi ja läpinäkyvästi.<br> • Emme hyödynnä pelaajien haavoittuvuutta tai käytä manipuloivia pelimekaniikkoja kulutuksen lisäämiseksi.", | ||
|
|
||
| "society-nav-menu-title": "Vastuu", | ||
| "society-label": "Yhteiskunnallinen vastuu", | ||
| "society-description": "• Vältämme stereotyyppisiä, syrjiviä tai loukkaavia kuvauksia ja pyrimme vahvistamaan positiivisia arvoja.<br> • Huomioimme ympäristövaikutukset pelien kehityksessä ja ylläpidossa mahdollisuuksiemme mukaan.<br> • Uskomme pelien voimaan edistää oppimista, yhteisöllisyyttä ja myönteistä vuorovaikutusta.", | ||
|
|
||
| "law-nav-menu-title": "Lainsäädäntö", | ||
| "law-label": "Lainsäädäntö ja vastuullisuus", | ||
| "law-description": "• Noudatamme kaikkia sovellettavia lakeja ja viranomaismääräyksiä, mukaan lukien tietosuoja-, tekijänoikeus- ja kuluttajansuojalait.<br> • Sitoudumme toimimaan läpinäkyvästi ja ottamaan vastuun toiminnastamme.<br> • Kuuntelemme aktiivisesti pelaajien, työntekijöiden ja yhteistyökumppaneiden palautetta kehittääksemme toimintaamme jatkuvasti." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.