Skip to content

Feature: "show all groups" control for dimensions with more than 12 groups in the web profiler #740

Description

@yakew7

Where: assets/profiler-ui.js (dimCard), assets/profiler-compare.js, faircode/SPEC.md section 7.

Current gap: DISPLAY_GROUPS = 12 (explicitly commented "mirror faircode/report.py") truncates every dimension's bar-chart display to the first 12 groups; when a dimension (e.g. a high-cardinality geography column) has more, the UI only renders a static line: '<div class="dim-more">… and ' + (d.groups.length - DISPLAY_GROUPS) + ' more groups</div>' with no button, link, or expand affordance - grep -n "showMore\|expand" assets/profiler-ui.js returns nothing. The only way to see the remaining groups is to leave the visual UI and use "Copy as JSON" to inspect raw text, or switch to the CLI's --json. SPEC.md section 7 mandates the truncation and the omitted-count message but doesn't require (or forbid) a way to actually view the rest.

Repro:

$ grep -n "DISPLAY_GROUPS\|dim-more" assets/profiler-ui.js
11: DISPLAY_GROUPS = 12  // mirror faircode/report.py
...: '<div class="dim-more">… and ' + (d.groups.length - DISPLAY_GROUPS) + ' more groups</div>'
$ grep -n "showMore\|expand" assets/profiler-ui.js
(no output)

Suggested approach: make the "… and N more groups" text an actual <button> that expands the same dim-card in place to show the full d.groups list (same bar-row markup, just without the slice(0, DISPLAY_GROUPS) cap), toggling back to "Show fewer" - same pattern for the dim-reference and compare's cd.groups truncation.

Activity

  1. yakew7 commented on Sep 30, 2026

    @yakew7
    OwnerAuthor

    Fixed in 95a8b29: dimCard() (assets/profiler-ui.js) and driftCard() (assets/profiler-compare.js) now render every group up front but hide everything past the 12-group display cap in a collapsed block with a "Show N more groups" toggle button, instead of silently truncating. Verified the hidden/aria-expanded/button-text state transitions with a hand-built minimal DOM stub in Node (no jsdom in this repo).

  2. added 3 commits that reference this issue on Sep 30, 2026
    95a8b29
    9d79f73
    0399ded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions