Update my_pages/developer_decisions.py
Browse files
my_pages/developer_decisions.py
CHANGED
|
@@ -22,23 +22,33 @@ def render():
|
|
| 22 |
cols = st.columns(len(pipeline_data))
|
| 23 |
for idx, stage in enumerate(pipeline_data.keys()):
|
| 24 |
with cols[idx]:
|
| 25 |
-
if st.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
st.session_state.active_stage = stage
|
| 27 |
st.session_state.active_substage = None
|
| 28 |
|
| 29 |
# Level 2: Sub-stages
|
| 30 |
if st.session_state.active_stage:
|
| 31 |
st.markdown(pipeline_data[st.session_state.active_stage]["explain_text"])
|
|
|
|
| 32 |
sub_stages = pipeline_data[st.session_state.active_stage]
|
| 33 |
sub_cols = st.columns(len(sub_stages)-1)
|
| 34 |
for idx, sub in enumerate(set(sub_stages.keys()) - {"explain_text"}):
|
| 35 |
with sub_cols[idx]:
|
| 36 |
-
if st.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
st.session_state.active_substage = sub
|
| 38 |
|
| 39 |
# Questions
|
| 40 |
if st.session_state.active_substage:
|
| 41 |
st.markdown(pipeline_data[st.session_state.active_stage][st.session_state.active_substage]["explain_text"])
|
|
|
|
| 42 |
questions = pipeline_data[st.session_state.active_stage][st.session_state.active_substage]["sub_decisions"]
|
| 43 |
for q in questions:
|
| 44 |
st.write(f"- {q}")
|
|
|
|
| 22 |
cols = st.columns(len(pipeline_data))
|
| 23 |
for idx, stage in enumerate(pipeline_data.keys()):
|
| 24 |
with cols[idx]:
|
| 25 |
+
if st.session_state.active_stage==stage:
|
| 26 |
+
button_click_s = st.button(stage, type="primary")
|
| 27 |
+
else:
|
| 28 |
+
button_click_s = st.button(stage)
|
| 29 |
+
if button_click_s:
|
| 30 |
st.session_state.active_stage = stage
|
| 31 |
st.session_state.active_substage = None
|
| 32 |
|
| 33 |
# Level 2: Sub-stages
|
| 34 |
if st.session_state.active_stage:
|
| 35 |
st.markdown(pipeline_data[st.session_state.active_stage]["explain_text"])
|
| 36 |
+
st.markdown("---")
|
| 37 |
sub_stages = pipeline_data[st.session_state.active_stage]
|
| 38 |
sub_cols = st.columns(len(sub_stages)-1)
|
| 39 |
for idx, sub in enumerate(set(sub_stages.keys()) - {"explain_text"}):
|
| 40 |
with sub_cols[idx]:
|
| 41 |
+
if st.session_state.active_substage==sub:
|
| 42 |
+
button_click_ss = st.button(sub, type="primary")
|
| 43 |
+
else:
|
| 44 |
+
button_click_ss = st.button(sub)
|
| 45 |
+
if button_click_ss:
|
| 46 |
st.session_state.active_substage = sub
|
| 47 |
|
| 48 |
# Questions
|
| 49 |
if st.session_state.active_substage:
|
| 50 |
st.markdown(pipeline_data[st.session_state.active_stage][st.session_state.active_substage]["explain_text"])
|
| 51 |
+
st.markdown("---")
|
| 52 |
questions = pipeline_data[st.session_state.active_stage][st.session_state.active_substage]["sub_decisions"]
|
| 53 |
for q in questions:
|
| 54 |
st.write(f"- {q}")
|