Aggregation: Polish up aggregation UI
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/40766 Closes https://github.com/sourcegraph/sourcegraph/issues/40306 Closes https://github.com/sourcegraph/sourcegraph/issues/41053 Closes https://github.com/sourcegraph/sourcegraph/issues/41011
Background
This PR
- Make chart smaller 182px or 11.385rem by height
- Fixes missing label position
- Improve full UI mode layout (make it centered and wraps it with Card UI)
- Hide X ticks and make max label length dynamically defined based on UI mode in which we render chart (sidebar, full UI)
- Improve non-active background algorithm. This algorithm aims to solve problem with colors in general for all bar charts in the product, in case of aggregation UI chart this color is close to the
primary-
- Fix missing label tooltip copy
- Adds NonExhaustiveSearchAggregationResult label UI it closes this issue https://github.com/sourcegraph/sourcegraph/issues/41011 @AlicjaSuska I changed the copy there based on suggestions from Chris and Coury about limit hit.
Out of this PR scope (possibly)
- Min height of bars, is out of scope since current chart API doesn't expose this extension point. We will return to this problem in https://github.com/sourcegraph/sourcegraph/issues/40009
- Bar icon in sidebar section heading will be added in https://github.com/sourcegraph/sourcegraph/pull/40997
- Chart area should take up whole width and not be narrower because the rotated labels take up space – instead according to the design, we should hide labels that don't fit in. This is out of scope for the V1, since this change requires much more work on data viz UI than we can afford at the moment, we revisit this problem in https://github.com/sourcegraph/sourcegraph/issues/40009
Test plan
- Make sure that implementation doesn't have any misaligments compared to the designs
- Make sure that all blockers from this board are closed by this PR
App preview:
Check out the client app preview documentation to learn more.