Fix nested expander: show reason/snippet inline inside criteria toggle
Browse files- ui/tab_bidders.py +18 -20
ui/tab_bidders.py
CHANGED
|
@@ -178,26 +178,24 @@ def render() -> None:
|
|
| 178 |
|
| 179 |
reason = v.get("reason", "")
|
| 180 |
snippet = (v.get("source") or {}).get("snippet", "")
|
| 181 |
-
if reason
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
unsafe_allow_html=True,
|
| 200 |
-
)
|
| 201 |
|
| 202 |
st.markdown(
|
| 203 |
'<hr style="margin:2px 0;border:none;'
|
|
|
|
| 178 |
|
| 179 |
reason = v.get("reason", "")
|
| 180 |
snippet = (v.get("source") or {}).get("snippet", "")
|
| 181 |
+
if reason:
|
| 182 |
+
st.markdown(
|
| 183 |
+
f'<div style="background:rgba(37,99,235,0.08);'
|
| 184 |
+
f'border-left:3px solid #3B82F6;padding:8px 12px;'
|
| 185 |
+
f'border-radius:0 6px 6px 0;font-size:0.82rem;'
|
| 186 |
+
f'color:var(--text-color);margin-top:2px;">'
|
| 187 |
+
f'<strong>Reason:</strong> {reason}</div>',
|
| 188 |
+
unsafe_allow_html=True,
|
| 189 |
+
)
|
| 190 |
+
if snippet:
|
| 191 |
+
st.markdown(
|
| 192 |
+
f'<div style="background:rgba(245,158,11,0.08);'
|
| 193 |
+
f'border-left:3px solid #F59E0B;padding:8px 12px;'
|
| 194 |
+
f'border-radius:0 6px 6px 0;margin-top:4px;'
|
| 195 |
+
f'font-size:0.81rem;color:var(--text-color);font-style:italic;">'
|
| 196 |
+
f'“{snippet}”</div>',
|
| 197 |
+
unsafe_allow_html=True,
|
| 198 |
+
)
|
|
|
|
|
|
|
| 199 |
|
| 200 |
st.markdown(
|
| 201 |
'<hr style="margin:2px 0;border:none;'
|