From 310654749fad79386d1ee79f4bf4d9bc0508c8ea Mon Sep 17 00:00:00 2001 From: Shruti Patel Date: Mon, 6 Apr 2026 21:51:01 -0700 Subject: [PATCH] Update subtitle rendering in notebook Analysis Cards (#5112) Summary: Matches the web UI change from D97406631 for notebook (Jupyter/Bento) rendering of Ax analysis cards. **Before**: Subtitles were hidden behind a clickable
/ element with an info icon -- users had to click to reveal the subtitle text. **After**: Subtitles are now shown as visible, secondary-styled text directly beneath the title, truncated to a single line via an ellipsis. A "See more"/"See less" toggle appears automatically when the subtitle overflows. Differential Revision: D98690381 --- ax/core/analysis_card.py | 70 +++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/ax/core/analysis_card.py b/ax/core/analysis_card.py index 1c76068cfe9..2819eb59163 100644 --- a/ax/core/analysis_card.py +++ b/ax/core/analysis_card.py @@ -19,7 +19,10 @@ from plotly.offline import get_plotlyjs # Simple HTML template for rendering a card with a title, subtitle, and body with -# scrollable overflow. +# scrollable overflow. Subtitles are rendered in a
with max-height overflow +# so that any HTML content (tables, lists, etc.) is valid and clipped correctly +# in the collapsed state. A "See more"/"See less" toggle appears when content +# overflows (matching the web UI pattern). html_card_template = """
-
- {title_str} -

{subtitle_str}

-
+ {title_str} +
{subtitle_str}
+
{body_html}
+ """ # Simple HTML template for rendering a *group* card with a title, subtitle, and