Upgrade and migrate to HDS v4#917
Conversation
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr917.dev.hel.ninja 🚀🚀🚀 |
061007f to
2b2a5ca
Compare
|
A real stable version of HCRC -lib needs to be used instead of canary. It should be installed when the related HCRC -lib changes are merged and published in a stable release. A related PR: City-of-Helsinki/react-helsinki-headless-cms#205.
|
2b2a5ca to
615c5a9
Compare
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr917.dev.hel.ninja 🚀🚀🚀 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr917.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr917.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is failed for https://harrastukset-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://tapahtumat-pr917.dev.hel.ninja 😿💢💥💥 |
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr917.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is failed for https://liikunta-pr917.dev.hel.ninja 😿💢💥💥 |
615c5a9 to
72ac62f
Compare
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr917.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr917.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr917.dev.hel.ninja 🚀🚀🚀 |
| buttonStyles={{ fontSize: 'var(--fontsize-body-m)' }} | ||
| icon={<IconRead aria-hidden />} | ||
| noTags | ||
| visibleOptions={5.97} // use decimal to make scrollable content visible |
There was a problem hiding this comment.
Would this magic number be good to give a meaningful name and move e.g. to AppConfig or to some constant somewhere else? Now even with the comment having a number like 5.97 is not very understandable. Would 5.98 do? Or 5.96, why is this exactly 5.97 and not e.g. 6? Well, anyway, this could use more clarity IMHO.
There was a problem hiding this comment.
Well, it only was a number that made the UI look good. When there is no visible scroll bar in the menu, it tells to user that there are more options available. It should not be in AppConfig, because it's actually a selector specific value. It's not something I would like to configure app wide from apps configuration. I don't know what else add there, when it already says what it is for. It's a property of HDS Select component and description can be found here: https://hds.hel.fi/components/select/code/#component-properties. They give 5.5 as an example, but it didn't work well in our case, because it only showed white space. of the menu option -- Some text needs to be seen as well.
I find this a very trivial thing.
There was a problem hiding this comment.
Looking at https://hds.hel.fi/components/select/code/#component-properties helped clarify this a bit. Without the context it was weird. It's still a bit weird, but the default value being 5.5, it seems it is just some magic number that makes the UI look good. Maybe the link you gave could be added for better context, as given that context the "use decimal" is more understandable as they already talk using that:
Use decimals, so a part of the next option is shown.
There was a problem hiding this comment.
I'll think a bit to see if I can come up with a concise comment that explains the why here.
There was a problem hiding this comment.
How would you feel about something like this?
// Show next option partially to indicate more is available
TestCafe result is failed for https://harrastukset-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://tapahtumat-pr917.dev.hel.ninja 😿💢💥💥 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr917.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr917.dev.hel.ninja 🚀🚀🚀 |
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr917.dev.hel.ninja 🚀🚀🚀 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr917.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr917.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is failed for https://harrastukset-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://tapahtumat-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://liikunta-pr917.dev.hel.ninja 😿💢💥💥 |
HCRC-178. Update a failing mock that does not affect in test result.
|
|
|
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-events-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-sports-pr917.dev.hel.ninja 🚀🚀🚀 |
|
FEDERATION-ROUTER branch is deployed to platta: https://events-graphql-federation-hobbies-pr917.dev.hel.ninja 🚀🚀🚀 |
|
EVENTS-GRAPHQL-PROXY branch is deployed to platta: https://events-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
VENUE-GRAPHQL-PROXY branch is deployed to platta: https://venue-graphql-proxy-pr917.dev.hel.ninja 🚀🚀🚀 |
|
LIIKUNTA-UI branch is deployed to platta: https://liikunta-pr917.dev.hel.ninja 🚀🚀🚀 |
|
|
TAPAHTUMAT-UI branch is deployed to platta: https://tapahtumat-pr917.dev.hel.ninja 🚀🚀🚀 |
|
HARRASTUKSET-UI branch is deployed to platta: https://harrastukset-pr917.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is failed for https://liikunta-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://tapahtumat-pr917.dev.hel.ninja 😿💢💥💥 |
TestCafe result is failed for https://harrastukset-pr917.dev.hel.ninja 😿💢💥💥 |





HCRC-178
NOTE: A real stable version of HCRC -lib needs to be used instead of canary. It should be installed when the related HCRC -lib changes are merged and published in a stable release. A related PR: City-of-Helsinki/react-helsinki-headless-cms#205.
This pull request encompasses a critical upgrade of the Helsinki Design System (HDS) and Helsinki Component Registry (HCRC) libraries, alongside the complete implementation of the cookie consent feature.
HDS/HCRC Migration Details
The upgrade involved migrating component usage and types across the application to conform with the latest library versions. Key changes include:
isSelectedindicator from the date selector for consistency.hds-reactand upgradedhds-coreandhds-design-tokens.createLocaleDictBuilder,useAskemContext).Cookie Consent Implementation
A new, comprehensive cookie consent system was implemented, consolidating all user tracking features.
UserTrackingFeaturescomponent/wrapper, decoupling the tracking logic from theBaseApp.useConsentSiteSettingshook and refactored prop drilling and context usage (e.g., in the Askem hook) for cleaner data flow.