Move Follower Gains calendar/New Followers per Day directly under the KPI row
Reordered: calendar row now comes first in the content area (right under the KPI tiles/Team member dropdown), followed by Visibility (full width), Posts (full width), then the Impressions/Engagement Rate/Demographics row. Refactored _build_person_dashboard/_build_empty_person_dashboard to return their pieces (source_note, calendar_row, charts_row) separately instead of a pre-assembled Div, so _render_team_tab controls the final ordering directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfb5fd251f
commit
cc827ca1e5
1 file changed
+10
-9
@@ -3052,7 +3052,7 @@ def _build_person_dashboard(name, data):
|
|||||||
_team_demographics_table(data["content_demographics"])), md=3),
|
_team_demographics_table(data["content_demographics"])), md=3),
|
||||||
], className="gx-3 mb-3")
|
], className="gx-3 mb-3")
|
||||||
|
|
||||||
return html.Div([source_note, calendar_row, charts_row])
|
return source_note, calendar_row, charts_row
|
||||||
|
|
||||||
|
|
||||||
_TEAM_EMPTY_PLACEHOLDER = html.Div("No data yet", className="text-muted text-center",
|
_TEAM_EMPTY_PLACEHOLDER = html.Div("No data yet", className="text-muted text-center",
|
||||||
@@ -3082,7 +3082,7 @@ def _build_empty_person_dashboard(name):
|
|||||||
dbc.Col(section("Content Demographics — Top 5 (who engages)", _TEAM_EMPTY_PLACEHOLDER), md=3),
|
dbc.Col(section("Content Demographics — Top 5 (who engages)", _TEAM_EMPTY_PLACEHOLDER), md=3),
|
||||||
], className="gx-3 mb-3")
|
], className="gx-3 mb-3")
|
||||||
|
|
||||||
return html.Div([source_note, calendar_row, charts_row])
|
return source_note, calendar_row, charts_row
|
||||||
|
|
||||||
|
|
||||||
@app.callback(
|
@app.callback(
|
||||||
@@ -3108,22 +3108,23 @@ def _render_team_tab(name):
|
|||||||
if not data:
|
if not data:
|
||||||
stat_row = _team_empty_stat_row()
|
stat_row = _team_empty_stat_row()
|
||||||
posts_section = section("Posts This Window — Originals vs Reposts", _TEAM_EMPTY_PLACEHOLDER)
|
posts_section = section("Posts This Window — Originals vs Reposts", _TEAM_EMPTY_PLACEHOLDER)
|
||||||
body = _build_empty_person_dashboard(name)
|
source_note, calendar_row, charts_row = _build_empty_person_dashboard(name)
|
||||||
disabled = True
|
disabled = True
|
||||||
else:
|
else:
|
||||||
stat_row = _team_stat_row(data)
|
stat_row = _team_stat_row(data)
|
||||||
post_details = post_details_tracker.load_post_details(DATA_DIR, UPLOAD_DIR)
|
post_details = post_details_tracker.load_post_details(DATA_DIR, UPLOAD_DIR)
|
||||||
posts_section = section("Posts This Window — Originals vs Reposts",
|
posts_section = section("Posts This Window — Originals vs Reposts",
|
||||||
_team_top_posts_table(data["top_posts"], post_details))
|
_team_top_posts_table(data["top_posts"], post_details))
|
||||||
body = _build_person_dashboard(name, data)
|
source_note, calendar_row, charts_row = _build_person_dashboard(name, data)
|
||||||
disabled = False
|
disabled = False
|
||||||
|
|
||||||
visibility_posts_row = dbc.Row([
|
# Follower Gains/New Followers per Day comes first, directly under the KPI row -
|
||||||
dbc.Col(visibility_row, md=3),
|
# Visibility/Posts and the rest of the charts follow below it.
|
||||||
dbc.Col(posts_section, md=9),
|
visibility_row_full = dbc.Row([dbc.Col(visibility_row, md=12)], className="gx-3 mb-3")
|
||||||
], className="gx-3 mb-3")
|
posts_row_full = dbc.Row([dbc.Col(posts_section, md=12)], className="gx-3 mb-3")
|
||||||
|
body = html.Div([source_note, calendar_row, visibility_row_full, posts_row_full, charts_row])
|
||||||
|
|
||||||
return stat_row, html.Div([visibility_posts_row, body]), disabled
|
return stat_row, body, disabled
|
||||||
|
|
||||||
|
|
||||||
@app.callback(
|
@app.callback(
|
||||||
|
|||||||
Reference in new issue
Block a user