-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add container level context fairground containers #12710
base: main
Are you sure you want to change the base?
Conversation
Size Change: +78 B (+0.01%) Total Size: 928 kB ℹ️ View Unchanged
|
1a130b9
to
a3b9ef8
Compare
@@ -45,6 +60,14 @@ const findCollectionSuitableForFrontBranding = ( | |||
return index; | |||
}; | |||
|
|||
const getContainerLevel = ( | |||
levels?: FEContainerPalette[], |
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.
Currently, the level is included in the config meta from frontend. This is largely only used for container palette which is why the type here might seem strange.
There are 3 options here:
- Leave as is with the comment
- Rename FEContainerPalette to be more generic and better represent the metadata.
- Separate out the container level tags from the container palette tags on frontend model. There is a spike here for this work Pass collection level on the Frontend config model frontend#27574
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.
Thanks for writing up these options! I think option 1 is fine for now with a view that we could improve to do 2 and/or 3 as a follow up improvement
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
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.
👏
const FAIRGROUND_CONTAINERS = [ | ||
'scrollable/feature', | ||
'static/feature/2', | ||
'flexible/special', | ||
'flexible/general', | ||
'scrollable/small', | ||
'scrollable/medium', | ||
'static/medium/4', | ||
]; |
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.
agree ideally these shouldn't need to be here - this should come from upstream data
@@ -45,6 +60,14 @@ const findCollectionSuitableForFrontBranding = ( | |||
return index; | |||
}; | |||
|
|||
const getContainerLevel = ( | |||
levels?: FEContainerPalette[], |
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.
Thanks for writing up these options! I think option 1 is fine for now with a view that we could improve to do 2 and/or 3 as a follow up improvement
What does this change?
Introduces container level context to DCR to allow fairground containers to be styled appropriately.
It also passes this through to the container title and applies styling there.
There is a secondary piece of work to bump Frontend to the latest verison of facia-scala-client in order for this data to pass through to DCR.
The container level tag lives in the metadata supplied by frontend. Currently, this field is used by the platform mainly for container palette tags and the types reflect this. This might be confusing for future developers. I have listed some options in this PR for discussion.
Why?
This is a requirement for "fairground" containers (ie new containers introduced as part of the fairground redesign project). These containers are:
Screenshots