This commit is contained in:
ponzischeme89
2026-08-22 18:40:50 +12:00
parent 9858e44710
commit 7d77700c7b
36 changed files with 480 additions and 119 deletions
+7 -2
View File
@@ -56,8 +56,9 @@ type RemoteConfigFeatures struct {
}
type RemoteConfigPresentation struct {
NavigationRailExpandedWidthDp int `json:"navigationRailExpandedWidthDp"`
NavigationContentShiftDp int `json:"navigationContentShiftDp"`
NavigationRailExpandedWidthDp int `json:"navigationRailExpandedWidthDp"`
NavigationContentShiftDp int `json:"navigationContentShiftDp"`
FontFamily string `json:"fontFamily"`
}
// The remainder of the document is deliberately declarative. A new server-side row or
@@ -160,6 +161,7 @@ func DefaultRemoteConfig() RemoteConfig {
Presentation: RemoteConfigPresentation{
NavigationRailExpandedWidthDp: 184,
NavigationContentShiftDp: 112,
FontFamily: "system",
},
Home: RemoteHomeConfig{
Sections: []string{"continue", "for-you", "favorites", "latest-movies"},
@@ -262,6 +264,9 @@ func validateRemoteConfig(document RemoteConfig) error {
if shift < 80 || shift > 160 || shift >= width {
return fmt.Errorf("navigationContentShiftDp must be between 80 and 160 and less than the rail width")
}
if document.Presentation.FontFamily != "system" && document.Presentation.FontFamily != "inter" {
return fmt.Errorf("fontFamily must be system or inter")
}
if err := validateRemoteConfigSections(document); err != nil {
return err
}