[v10.2.x] Stat: Add panel option to control wide layout #78012
Merged
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.
Backport e9e7e0b from #77018
This PR explores adding a panel editor option for stat panel to give users a way back to old "wide layout" functionality of the stat panel.
For context, we recently removed the wide layout functionality based on user feedback. See this PR.
Doing so resulted in backlash from other users as their existing panel designs broke.
This PR hopes to find the middle ground - adding a new panel editor option to the stat panel that allows user to explicitly control whether or not they want wide layout enabled. Adding another panel editor option isn't super ideal, though this option only is enabled when
text mode
is set toValue and name
.A key question to consider here is what the default value of
wideLayout
should be (true
vsfalse
). Either way users from one camp or the other will need to make manual changes to their stat panels to fix their designs. IMO given the majority of stat panels created at this point have been with the wide layout functionality, a default value oftrue
makes the most sense.TODO (once initial approach is verified)
stat.demo.mov
Orientation behavior (no impact)
orientation.impact.mov
Stat panel test dashboard
Stat!-1695827506475.json.txt
Fixes https://github.com/grafana/support-escalations/issues/7886
Fixes #77092