From fbf5bc37df61c0349647217cbbf0ad7a9d197fc5 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 17 May 2026 00:24:43 -0700 Subject: Add QuoteTable as empty-state landing page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renders watchlist tickers as a styled psm-card data table (Symbol, Sector, Last, Δ, % Day, Volume) when no ticker is selected. Falls back to the existing placeholder when the watchlist is empty. Uses the same JS hidden-input click pattern as the sidebar watchlist. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index 8145d03..c9f36a7 100644 --- a/app.py +++ b/app.py @@ -587,6 +587,7 @@ pio.templates.default = "prism" from components.market_bar import render_market_bar from components.top_movers import render_top_movers from components.watchlist import render_watchlist +from components.quotetable import render_quotetable from components.overview import render_overview from components.financials import render_financials from components.valuation import render_valuation @@ -765,22 +766,26 @@ st.divider() # ── Main Content ────────────────────────────────────────────────────────────── if not ticker: - st.markdown(""" -
-
Search for a ticker to begin.
-
Enter a company name or symbol in the sidebar.
-
- """, unsafe_allow_html=True) + _watchlist = st.session_state.get("watchlist", []) + if _watchlist: + render_quotetable(_watchlist) + else: + st.markdown(""" +
+
Search for a ticker to begin.
+
Enter a company name or symbol in the sidebar.
+
+ """, unsafe_allow_html=True) st.stop() # ── Ticker Header + KPI Strip ───────────────────────────────────────────────── -- cgit v1.3-2-g0d8e From 5d24e21aa4ec234d51258b0741543b38c233c542 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 17 May 2026 00:36:07 -0700 Subject: Fix click receivers: visibility:hidden instead of display:none display:none removes elements from React's event processing, causing JS-dispatched input events to be silently dropped. Switching to visibility:hidden + height:0 keeps the inputs in the React tree so programmatic value changes trigger reruns correctly. Also covers the new qt_click_receiver for the quotetable. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index c9f36a7..e87482d 100644 --- a/app.py +++ b/app.py @@ -404,9 +404,15 @@ hr { ::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--ink-4); } -/* Hide the watchlist click receiver input */ -[data-testid="stSidebar"] [data-testid="stTextInput"]:has(input[aria-label="wl_click_receiver"]) { - display: none !important; +/* Hide click receiver inputs without removing them from React's event system */ +[data-testid="stSidebar"] [data-testid="stTextInput"]:has(input[aria-label="wl_click_receiver"]), +[data-testid="stTextInput"]:has(input[aria-label="qt_click_receiver"]) { + visibility: hidden !important; + height: 0 !important; + min-height: 0 !important; + overflow: hidden !important; + margin: 0 !important; + padding: 0 !important; } /* ── Ticker Header Band ──────────────────────────────────────────────────── */ -- cgit v1.3-2-g0d8e