-
Notifications
You must be signed in to change notification settings - Fork 0
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
LIIKUNTA-582, LIIKUNTA-585 | feat: add hierarchical menus & universal bar menu support to Navigation #138
Conversation
3cab750
to
aa71ea3
Compare
uses canary build of HCRC from City-of-Helsinki/react-helsinki-headless-cms#138 refs LIIKUNTA-582 (add support for hierarchical menus in header) refs LIIKUNTA-585 (add support for universal bar menu in header)
uses canary build of HCRC from City-of-Helsinki/react-helsinki-headless-cms#138 refs LIIKUNTA-582 (add support for hierarchical menus in header) refs LIIKUNTA-585 (add support for universal bar menu in header)
src/core/navigation/Navigation.tsx
Outdated
}; | ||
|
||
const LOGO_ARIA_LABELS = { | ||
const CITY_OF_HELSINKI_TRANSLATIONS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add those though hcrc config, in copy
section we have translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to config:
- LOGO_ARIA_LABELS/CITY_OF_HELSINKI_TRANSLATIONS -> config.translations.cityOfHelsinki
EN: 'City of Helsinki', | ||
FI: 'Helsingin kaupunki', | ||
SV: 'Helsingfors stad', | ||
} as const satisfies Record<LanguageCodeEnum, string>; | ||
|
||
const LOGO_LABELS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add those though hcrc config, in copy
section we have translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to config:
- LOGO_LABELS -> config.translations.helsinki
src/core/navigation/Navigation.tsx
Outdated
}; | ||
|
||
const localizedCityOfHelsinki = | ||
CITY_OF_HELSINKI_TRANSLATIONS[currentLanguageCode]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when translations are added though the config we dont need this code anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to config:
- CITY_OF_HELSINKI_TRANSLATIONS -> config.translations.cityOfHelsinki
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if translations are fixed
c8571d2
to
41b8c9d
Compare
Navigation: - add support for hierarchical menus - add support for universal bar menu - the universal bar menu is shown on the top of the header at least when using a wide screen - remove deprecated variant property queries: - add parentId to menu query to fetch hierarchy of menus mocks: - make navigation mock menu hierarchical - this hierarchical menu can be seen in storybook's ArchiveSearchPage - add mock for universal bar menu packages: - add crypto-browserify as development dependency to fix running storybook - crypto is being used by hds-react since HDS v3 - set version to 1.0.0-alpha230 refs LIIKUNTA-582
41b8c9d
to
39d5f3e
Compare
Description
feat: add hierarchical menus & universal bar menu support to Navigation
Navigation:
when using a wide screen
queries:
mocks:
packages:
storybook
refs LIIKUNTA-582
Issues
Closes
Related
LIIKUNTA-582
LIIKUNTA-585
Testing
In PR review environments (if they are working):
Locally:
yarn
yarn storybook
Automated tests
Manual testing
Screenshots
Additional notes
Published as canary build [email protected] to npm