Skip to content

Commit 26a17c7

Browse files
committed
fix: add stat card CSS to iframe style blocks, fix accordion ordering via dependencies
1 parent 768d553 commit 26a17c7

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

notebooks/insights/defi-builder-journeys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,8 @@ def transform_pipeline_composition(
13281328

13291329

13301330
@app.cell(hide_code=True)
1331-
def section_conclusion(mo):
1331+
def section_conclusion(mo, pipeline_by_eco):
1332+
# pipeline_by_eco dependency ensures this renders after all content cells
13321333
mo.accordion({
13331334
"Metrics & Definitions": mo.md("""
13341335
- Ecosystem Classification:

notebooks/insights/developer-lifecycle.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ def _categorize(label):
152152
'body{font-size:14px;color:#0f172a;padding:4px}'
153153
'.ddp-select{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:0.8125em;color:#0f172a;background:#fff;cursor:pointer;outline:none}'
154154
'.ddp-select-label{font-size:0.6875em;color:#64748b;display:block;margin-bottom:2px}'
155+
'.ddp-stat-row{display:flex;gap:12px;margin:12px 0}'
156+
'.ddp-stat-box{border:1px solid #e2e8f0;border-radius:6px;padding:12px 16px;flex:1;min-width:120px}'
157+
'.ddp-stat-value{font-size:1.5em;font-weight:600;letter-spacing:-0.02em;color:#0f172a;line-height:1.2}'
158+
'.ddp-stat-label{font-size:0.6875em;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;margin-bottom:4px}'
159+
'.ddp-stat-caption{font-size:0.75em;color:#64748b;margin-top:4px}'
155160
'</style></head><body>'
156161
f'{_sel_html}'
157162
'<div id="stats" style="margin-bottom:12px"></div>'
@@ -251,6 +256,11 @@ def ecosystem_comparison_tabs(ACTIVE_LABELS, CHURNED_LABELS, DORMANT_LABELS, FT_
251256
'body{font-size:14px;color:#0f172a;padding:4px}'
252257
'.ddp-select{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:0.8125em;color:#0f172a;background:#fff;cursor:pointer;outline:none}'
253258
'.ddp-select-label{font-size:0.6875em;color:#64748b;display:block;margin-bottom:2px}'
259+
'.ddp-stat-row{display:flex;gap:12px;margin:12px 0}'
260+
'.ddp-stat-box{border:1px solid #e2e8f0;border-radius:6px;padding:12px 16px;flex:1;min-width:120px}'
261+
'.ddp-stat-value{font-size:1.5em;font-weight:600;letter-spacing:-0.02em;color:#0f172a;line-height:1.2}'
262+
'.ddp-stat-label{font-size:0.6875em;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;margin-bottom:4px}'
263+
'.ddp-stat-caption{font-size:0.75em;color:#64748b;margin-top:4px}'
254264
'</style></head><body>'
255265
f'{_sel_html}'
256266
'<div id="chart"></div>'

notebooks/insights/developer-report-2025.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def header_title(mo):
1111

1212

1313
@app.cell(hide_code=True)
14-
def header_accordion(mo):
14+
def header_accordion(mo, _report_complete):
1515
mo.accordion({
1616
"Metrics & Definitions": mo.md("""
1717
- **Time period**: January 2015 to December 2025 (full historical data)
@@ -1634,7 +1634,8 @@ def comparison_chart(df_all, mo, pd):
16341634
)
16351635
_src = _html_mod.escape(_inner, quote=True)
16361636
mo.Html(f'<iframe srcdoc="{_src}" class="ddp-chart-frame" scrolling="no"></iframe>')
1637-
return
1637+
_report_complete = True
1638+
return (_report_complete,)
16381639

16391640

16401641
if __name__ == "__main__":

notebooks/insights/developer-retention.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ def _stat(value, label, caption=''):
262262
'body{font-size:14px;color:#0f172a;padding:4px}'
263263
'.ddp-select{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:0.8125em;color:#0f172a;background:#fff;cursor:pointer;outline:none}'
264264
'.ddp-select-label{font-size:0.6875em;color:#64748b;display:block;margin-bottom:2px}'
265+
'.ddp-stat-row{display:flex;gap:12px;margin:12px 0}'
266+
'.ddp-stat-box{border:1px solid #e2e8f0;border-radius:6px;padding:12px 16px;flex:1;min-width:120px}'
267+
'.ddp-stat-value{font-size:1.5em;font-weight:600;letter-spacing:-0.02em;color:#0f172a;line-height:1.2}'
268+
'.ddp-stat-label{font-size:0.6875em;font-weight:500;color:#64748b;text-transform:uppercase;letter-spacing:0.03em;margin-bottom:4px}'
269+
'.ddp-stat-caption{font-size:0.75em;color:#64748b;margin-top:4px}'
265270
'</style></head><body>'
266271
f'{_sel_html}'
267272
'<div id="stats" style="margin-bottom:12px"></div>'

0 commit comments

Comments
 (0)