-
Notifications
You must be signed in to change notification settings - Fork 30
Set up web handler for hosted content #15006
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
base: main
Are you sure you want to change the base?
Conversation
|
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. |
| canonicalUrl: '', | ||
| renderingTarget: 'Web', | ||
| // @ts-expect-error no config data | ||
| config: {}, |
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.
This can be completed (at least partially) like so:
config: {
renderingTarget: 'Web',
assetOrigin: ASSET_ORIGIN,
darkModeAvailable: ... // if we can feed in the a/b test switches then we can populate this
}| title, | ||
| description: frontendData.standfirst, | ||
| // @ts-expect-error no config data | ||
| guardian: {}, |
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.
Based on the createGuardian function is it best to populate the HostedContent["frontendData"] object with the Config object, as most of the fields like sentryHost, frontendAssetsFullURL, googletagUrl are needed for the pages? Or would you recommend we wait for the full spec of the page to be released before attempting to populate the window.guardian object?
What does this change?
This sets up a basic initial web rendering path for hosted content in DCR, using the scaffolded layouts.
Why?
This is part of an ongoing piece of work to migrate hosted content to DCR. Setting this up enables us to test hosted content rendering locally using the usual dev setup as we build on the initial scaffolds.
This will need revisiting when we get closer to launch as it's currently not possible to provide the data required to populate
window.guardianor set up a lot of basic page config, but this will require changes in frontend and may be subject to the actual requirements of the pages themselves.