Skip to content

Conversation

@moibra05
Copy link
Contributor

Because

  • The current new results page ui assumes that all metrics contain weekly data which is not true. This results in empty "Weekly breakdown" sections that serve no purpose.

This commit

  • Conditionally renders the "Weekly breakdown" component if the specific metric supports weekly results

Fixes #14257

Copy link
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, nice work adding the condition

@moibra05 moibra05 added this pull request to the merge queue Jan 6, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 6, 2026
…ut card if not available (#14261)

Because

- The current new results page ui assumes that all metrics contain
weekly data which is not true. This results in empty "Weekly breakdown"
sections that serve no purpose.

This commit

- Conditionally renders the "Weekly breakdown" component if the specific
metric supports weekly results

Fixes #14257
Comment on lines +1667 to 1669
if weekly_data:
weekly_metric_data[metric_metadata["slug"]] = weekly_data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you know what you can also add a property like is weekly_data_available and then renders accordingly, just a suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i originally thought to do something like this but figured that since id only be using that property in a single area it might be simpler to just not include weekly data if it exists so that i can just use a simple if weekly_metric_data check and not have to worry about additional flags or default values

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the maintainability purpose, would suggest to have the property as it helps other to easily work with it in the future, otherwise have to dig into templates and logic to understand it

@moibra05 moibra05 removed this pull request from the merge queue due to a manual request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weekly metrics card appearing when empty

3 participants