Skip to content

Commit

Permalink
Merge pull request #80 from mDOT-Center/YL-test
Browse files Browse the repository at this point in the history
UI updates
  • Loading branch information
victoriali8023 committed Jan 11, 2024
2 parents 7f2e088 + 22a19af commit 851eb64
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
1 change: 1 addition & 0 deletions apps/home/routes.py
Expand Up @@ -418,6 +418,7 @@ def covariates_settings(setting_type, project_uuid, cov_id=None):
covariates_types=covariates_types, cov_name=cov_name, settings=settings, project_uuid=project_uuid,
cov_id=cov_id)
elif setting_type == "covariate_main_effect":
cov_name = all_covariates.get(cov_id, {}).get("covariate_name")
is_tailoring = project_details_obj.covariates.get(cov_id).get("tailoring_variable", "no")
cov_name = all_covariates.get(cov_id, {}).get("covariate_name")
return render_template("design/covariates/covariate_main_effect.html", segment="covariates", formula=formula,
Expand Down
11 changes: 5 additions & 6 deletions apps/templates/design/config_summary/summary.html
Expand Up @@ -60,10 +60,9 @@
});
});

var low_bound = document.getElementById('configuration_note_low_bound').value;
var high_bound = document.getElementById('configuration_note_high_bound').value;
document.getElementById('configuration_note_low_bound').innerHTML = round(low_bound, 2);
document.getElementById('configuration_note_high_bound').innerHTML = round(high_bound, 2);





</script>
Expand Down Expand Up @@ -140,9 +139,9 @@ <h6> Input different possible tailoring variable values to see how the intervent
The intervention probability will change (be personalized) as data accrues during the study but will
never go
below
<span id="configuration_note_low_bound">{{settings.get("intervention_probability_lower_bound")|float*100}}</span>%
<span id="configuration_note_low_bound">{{settings.get("intervention_probability_lower_bound")|float}}</span>
or above
<span id="configuration_note_high_bound">{{settings.get("intervention_probability_upper_bound")|float*100}}</span>%
<span id="configuration_note_high_bound">{{settings.get("intervention_probability_upper_bound")|float}}</span>
given the lower and upper bounds you set to the probability of sending Intervention Option A.

</li>
Expand Down
4 changes: 2 additions & 2 deletions apps/templates/design/covariates/covariate_main_effect.html
Expand Up @@ -36,7 +36,7 @@ <h3>Model Settings / {{cov_name}} / Main Effect</h3>
<div class="col">
<div class="form-group">
<label class="form-control-label" for="main_effect_prior_mean">Prior
mean of the main effect <span data-toggle='tooltip'
mean of the main effect of the covariate <span data-toggle='tooltip'
data-bs-placement="right"
title='Prior is a probability distribution that encodes a scientist’s belief about an unknown quantity. Prior mean is the mean of the prior distribution. The algorithm will use both the scientist’s belief and the evidence from the data to make a decision.'> <i
class=" align-text-top questionmark far fa-question-circle"></i></span></label>
Expand All @@ -47,7 +47,7 @@ <h3>Model Settings / {{cov_name}} / Main Effect</h3>
<div class="form-group">
<label class="form-control-label"
for="main_effect_prior_standard_deviation">Prior standard
deviation of the main effect <span data-toggle='tooltip'
deviation of the main effect of the covariate <span data-toggle='tooltip'
data-bs-placement="right"
title='Prior is a probability distribution that encodes a scientist’s belief about an unknown quantity. Prior standard deviation is the standard deviation of the prior distribution. The algorithm will use both the scientist’s belief and the evidence from the data to make a decision.'> <i
class=" align-text-top questionmark far fa-question-circle"></i></span></label><br>
Expand Down
5 changes: 3 additions & 2 deletions apps/templates/design/intervention/intervention_option.html
Expand Up @@ -37,14 +37,15 @@ <h3>Intervention Settings / Intervention Options</h3>
Please read the explanation to make sure that you define them
correctly.</p>
<label class="form-control-label" for="intervention_option_a">Intervention
Option A (More Burdensome, e.g., Send an Activity Suggestion)</label>
Option A (tend to be more burdensome, e.g., Send an Activity Suggestion)</label>
<input value="{{settings.get('intervention_option_a','')}}" type="text"
id="intervention_option_a" name="intervention_option_a"
class="form-control" placeholder="Option A" required>
</div>
<div class="form-group">
<label class="form-control-label" for="intervention_option_b">Intervention
Option B (Less Burdensome, e.g., Do Nothing)</label>

Option B (tend to be less burdensome, e.g., Do Nothing)</label>
<input value="{{settings.get('intervention_option_b','')}}" type="text"
id="intervention_option_b" name="intervention_option_b"
class="form-control" placeholder="Option B" required>
Expand Down
13 changes: 12 additions & 1 deletion apps/templates/design/intervention/intervention_probability.html
Expand Up @@ -3,7 +3,18 @@
{% block title %} Intervention - Probability {% endblock %}

<!-- Specific CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
{% block stylesheets %}
<style>
#intervention_probability_lower_bound {
margin-right: 20px;
background-color: white;
}
#intervention_probability_upper_bound {
margin-right: 20px;
background-color: white;
}
</style>
{% endblock stylesheets %}

{% block content %}

Expand Down
1 change: 1 addition & 0 deletions apps/templates/design/projects/general_settings.html
Expand Up @@ -96,6 +96,7 @@ <h3>General Settings / General Info</h3>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel"
aria-labelledby="home-tab">

<p> Intervention components are the means of
your intervention. For example, to help increase a person’s physical
activity level, you may consider an activity suggestion message as an
Expand Down
11 changes: 6 additions & 5 deletions apps/templates/includes/sidebar_project.html
Expand Up @@ -96,18 +96,19 @@
box-sizing: content-box;

flex: 0 1 auto;
width: 30px;
height: 3px;
margin-right: 3px;
margin-left: 3px;
width: 12px;
height: 12px;
margin-right: 12px;
margin-left: 12px;
text-indent: -999px;
cursor: pointer;
background-color: #5e72e4;
background-clip: padding-box;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
opacity: .5;
opacity: .4;
transition: opacity 0.6s ease;
border-radius: 50%;
}

</style>
Expand Down

0 comments on commit 851eb64

Please sign in to comment.