Specify legacy config fields from frontend in the config types#15767
Open
Specify legacy config fields from frontend in the config types#15767
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. |
arelra
reviewed
Apr 30, 2026
arelra
reviewed
Apr 30, 2026
arelra
reviewed
Apr 30, 2026
| } | ||
|
|
||
| /** Legacy fields seemingly not used in DCR */ | ||
| interface LegacyConfig { |
Member
There was a problem hiding this comment.
I wonder if we should add a TODO to FEFrontConfig to remove any redundant config matched in this object. It just seems to be a flat list with no 'legacy' distinction.
Contributor
Author
There was a problem hiding this comment.
Have split the FEFrontConfig into the standard config and the parts I believe to be legacy config, with a similar comment about removing from the frontend DCR model
09ec353 to
d47330a
Compare
…pe definitions for pages
…led JSdoc description for legacy config
… ordering these alphabetically
d47330a to
7f862e9
Compare
arelra
approved these changes
May 1, 2026
Member
arelra
left a comment
There was a problem hiding this comment.
Great work 👏
This puts us in a good position to start deleting redundant config.
Thanks for the spot and fix
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this change?
Adds
LegacyConfigtype to document the config fields being sent to DCR in the POST request from frontendoptional, as well as all nested object keys, to ensure nothing is accidentally broken in schema validation as part of this changeAdds
FELegacyConfigto split theFEFrontConfiginto the items more likely to be useful and those which are likely not to be usedUpdates the
hostedArticleandhostedVideofixtures, which now have all the properties in them as they appear in the DCR JSON response. The previous version of these files had the additional config files manually stripped out due to conflicting configUpdates the schema definitions based on this config definition
Why?
Frontend sends a huge amount of data to DCR in the requests. Because our type config is not up to date, when creating a new fixture based on the DCR JSON response for an article page (suffix
.json?dcr) there are errors due to certain fields not being recognised on the Config typee.g.
tonesin the following screenshot:Reimplements part of PR #15531