跳至主要内容

Grid layout control for daily rewards

What's new

Daily reward programs accept two optional settings that control how the reward grid is laid out on the hub. grid_mode is auto (default, the existing behavior) or manual, and grid_config describes the layout per breakpoint: sm, md, and lg each take a list of 1–31 positive integers, where every entry is the number of columns in that row.

Impact

A program whose grid was previously derived from the number of rewards can now be laid out explicitly — for example a 7-day program shown as [4, 3] on small screens and [7] on large ones. Programs that omit both fields keep the automatic layout.

Changes

ResourceChange
create_daily_reward, update_daily_rewardAdded optional grid_mode and grid_config to rewards in the request body
get_daily_rewards, get_daily_reward, create_daily_reward, update_daily_reward, copy_daily_rewardAdded grid_mode and grid_config to rewards in daily reward responses
ComponentsAdded the DailyRewardGridMode and GridConfig schemas

Upgrade

  • No action required. Omit both fields to keep the automatic grid.
  • When setting grid_mode to manual, send grid_config with all three breakpoints — sm, md, and lg are required.

需要技术支持?
联系我们的集成技术团队: [email protected]