Skip to content

feat: allow hiding section header accordions#435

Merged
abidlabs merged 16 commits into
mainfrom
332-feat-no-accord
Mar 4, 2026
Merged

feat: allow hiding section header accordions#435
abidlabs merged 16 commits into
mainfrom
332-feat-no-accord

Conversation

@Saba9
Copy link
Copy Markdown
Collaborator

@Saba9 Saba9 commented Feb 21, 2026

Short description

This PR adds a "Show section headers" checkbox below the embed options panel (default checked). When unchecked, accordion wrappers around metric groups are hidden. The state is also encoded in the iframe URL so that the embed reflects the setting.

Shown (default)

image

Hidden

image

AI Disclosure

  • I used AI to implement the feature and tweaked it myself

Type of Change

  • New feature (non-breaking)

Related Issues

Closes: #332

Testing and linting

  • python -m pytest — 89 passed, 11 skipped
  • ruff check --fix --select I && ruff format — all checks passed

@gradio-pr-bot
Copy link
Copy Markdown
Contributor

gradio-pr-bot commented Feb 21, 2026

🪼 branch checks and previews

Name Status URL
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Copy Markdown
Contributor

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
trackio minor

  • feat: allow hiding section header accordions

‼️ Changeset not approved. Ensure the version bump is appropriate for all packages before approving.

  • Maintainers can approve the changeset by checking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Saba9 Saba9 requested review from abidlabs and znation February 21, 2026 05:43
Comment thread trackio/ui/main.py Outdated
Copy link
Copy Markdown
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

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

Just a question above @Saba9^

The state is also encoded in the iframe URL so that the embed reflects the setting.

Also can we have some docs for the iframe url query parameters, can we add this parameter too?

@Saba9
Copy link
Copy Markdown
Collaborator Author

Saba9 commented Feb 24, 2026

@abidlabs Thanks for the feedback! It should all be implemented now.

@abidlabs
Copy link
Copy Markdown
Member

@Saba9 so the next version of Gradio (which should be released today/tomorrow) should make this feature easier to implement because it will allow the creation of custom accordions. So let's set this PR to draft status. Once the next version of Gradio is out, I'll adapt this PR to use that feature.

cc @aliabid94 for visibility

@abidlabs abidlabs marked this pull request as draft February 24, 2026 17:11
@abidlabs abidlabs dismissed their stale review February 26, 2026 19:44

addressed

@abidlabs abidlabs marked this pull request as ready for review March 4, 2026 19:47
Copy link
Copy Markdown
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

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

LGTM @Saba9! I changed the implementation to use gr.HTML custom layouts which were introduced recently in Gradio.

The UI is effectively the same, but the implementation is a little simpler (at least on the python side), while giving us complete flexibility to customize the UI of the accordions down the line if we want.

@abidlabs abidlabs merged commit 4a47112 into main Mar 4, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When embedding trackio plots, have a way to embed just the charts without the accordion

5 participants