Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #679 by adding button to show doppler slideshow #686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
v-model="dialog"
max-width="800px"
>
<template v-slot:activator="{ on, attrs }">
<v-btn
v-if="show_button"
v-bind="attrs"
v-on="on"
block
color="secondary"
elevation="2"
@click.stop="() => { opened = true; dialog_opened_callback() }"
>
View Doppler Calculation
</v-btn>
</template>
<v-card
class="mx-auto"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def DopplerSlideshow(
event_set_student_c,
event_next_callback,
event_mc_callback,
state_view
state_view,
show_button,
):
pass
13 changes: 10 additions & 3 deletions src/hubbleds/pages/01-spectra-&-velocity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,15 @@ def _on_validate_transition(validated):
)

# This whole slideshow is basically dop_cal5
if COMPONENT_STATE.value.current_step_between(
Marker.dop_cal4, Marker.che_mea1
):
if (
(
show_values.value and COMPONENT_STATE.value.current_step_between(
Marker.dop_cal4, Marker.dop_cal5
)
or
COMPONENT_STATE.value.current_step_between(
Marker.dop_cal4, Marker.che_mea1))
):
show_doppler_dialog = Ref(COMPONENT_STATE.fields.show_doppler_dialog)
step = Ref(COMPONENT_STATE.fields.doppler_state.step)
validation_5_failed = Ref(
Expand Down Expand Up @@ -761,6 +767,7 @@ def _velocity_calculated_callback(value):
add_example_measurements_to_glue()

DopplerSlideshow(
show_button=show_values.value and COMPONENT_STATE.value.current_step_between(Marker.dop_cal4, Marker.dop_cal5),
dialog=COMPONENT_STATE.value.show_doppler_dialog,
titles=COMPONENT_STATE.value.doppler_state.titles,
step=COMPONENT_STATE.value.doppler_state.step,
Expand Down