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

feat(nimbus): Approval and rejection flow #12090

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2ab1754
feat(nimbus): Summary page actions
yashikakhurana Nov 21, 2024
611c393
feat(nimbus): Cancel review flow
yashikakhurana Dec 11, 2024
cf977c6
feat(nimbus): Cancel review flow
yashikakhurana Dec 11, 2024
e1260b9
feat(nimbus): Cancel review flow
yashikakhurana Dec 11, 2024
9696f4a
feat(nimbus): Update urls
yashikakhurana Dec 11, 2024
0c770c3
test(nimbus): Test cases
yashikakhurana Dec 11, 2024
eefc8e1
test(nimbus): Test cases
yashikakhurana Dec 11, 2024
9d4eea5
Merge branch 'main' into 11757/draft_preview_flow
yashikakhurana Dec 11, 2024
0064d56
test(nimbus): Test cases
yashikakhurana Dec 11, 2024
47137d1
test(nimbus): Test cases
yashikakhurana Dec 11, 2024
84d22e5
test(nimbus): Test cases
yashikakhurana Dec 12, 2024
aa6e85d
test(nimbus): Test cases
yashikakhurana Dec 12, 2024
1c9e951
test(nimbus): Test cases
yashikakhurana Dec 12, 2024
6067e0b
Merge branch 'main' into 11757/draft_preview_flow
yashikakhurana Dec 12, 2024
fab606b
Some ideas from jared
jaredlockhart Dec 12, 2024
c98ad23
feat(nimbus): Launch control flow
yashikakhurana Dec 24, 2024
7cb83f2
Merge branch 'main' into 11757/draft_preview_flow
yashikakhurana Dec 24, 2024
30cd3f1
feat(nimbus): Launch control flow
yashikakhurana Dec 24, 2024
5fa331d
feat(nimbus): Launch control flow
yashikakhurana Dec 24, 2024
8e26539
feat(nimbus): Launch control flow
yashikakhurana Dec 24, 2024
b4a0153
feat(nimbus): Launch control flow
yashikakhurana Dec 24, 2024
c83735d
feat(nimbus): format
yashikakhurana Dec 24, 2024
9dcf31b
feat(nimbus)
yashikakhurana Jan 14, 2025
58f0c26
Merge branch 'main' into 11757/draft_preview_flow
yashikakhurana Jan 14, 2025
7b6eb7c
feat(nimbus): fix formating
yashikakhurana Jan 14, 2025
2e6f4ae
Merge branch 'main' into 11757/draft_preview_flow
yashikakhurana Jan 16, 2025
598a79c
feat(nimbus): Approval rejection flow
yashikakhurana Jan 22, 2025
3819ef9
feat(nimbus): Test approve and reject
yashikakhurana Jan 22, 2025
783d53b
feat(nimbus): Test approve and reject
yashikakhurana Jan 22, 2025
842d00d
Merge branch 'main' into 12072/approval_rejection
yashikakhurana Jan 28, 2025
cdb149d
feat(nimbus): Update status
yashikakhurana Jan 29, 2025
b98fa23
feat(nimbus): Sync remote settings
yashikakhurana Feb 3, 2025
8c81c43
Merge branch 'main' into 12072/approval_rejection
yashikakhurana Feb 5, 2025
b51b5eb
feat(nimbus): Change prefix
yashikakhurana Feb 22, 2025
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
Prev Previous commit
Next Next commit
test(nimbus): Test cases
  • Loading branch information
yashikakhurana committed Dec 12, 2024
commit aa6e85d0dacba3f5898127d3f137940e7eea71b6
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,17 @@
</div>
{% endfor %}
{% endif %}
<!-- Experiment Container -->
<div id="experiment-container">
<div id="experiment-timeline">
{% include "nimbus_experiments/timeline.html" %}
<div id="launch-controls">
{% if experiment.is_draft %}
{% include "nimbus_experiments/launch_controls.html" %}

</div>
<div id="launch-controls">
{% if experiment.is_draft %}
{% include "nimbus_experiments/launch_controls.html" %}

{% elif experiment.is_preview %}
{% include "nimbus_experiments/launch_with_preview_controls.html" %}
{% elif experiment.is_preview %}
{% include "nimbus_experiments/launch_with_preview_controls.html" %}

{% elif experiment.is_review %}
{% include "nimbus_experiments/review_controls.html" %}
{% elif experiment.is_review %}
{% include "nimbus_experiments/review_controls.html" %}

{% endif %}
</div>
{% endif %}
</div>
<!-- Takeaways Card -->
{% include "nimbus_experiments/takeaways_card.html" %}
Expand Down Expand Up @@ -383,4 +376,5 @@ <h6>
{{ block.super }}
<script src="{% static 'nimbus_ui_new/setup_selectpicker.bundle.js' %}"></script>
<script src="{% static 'nimbus_ui_new/control.bundle.js' %}"></script>
<script>htmx.logAll();</script>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ <h4 class="mb-0">{{ experiment.name }}</h4>
</p>
{% endif %}
</div>
{% include "nimbus_experiments/timeline.html" %}
<div id="experiment-timeline">
{% include "nimbus_experiments/timeline.html" %}

</div>
</div>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<form method="post"
action="{% url 'nimbus-new-launch-to-preview' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-launch-to-preview' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="innerHTML">
{% csrf_token %}
<button type="submit"
Expand All @@ -20,7 +20,7 @@
<form method="post"
action="{% url 'nimbus-new-launch-without-preview' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-launch-without-preview' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="outerHTML">
{% csrf_token %}
<button type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<form method="post"
action="{% url 'nimbus-new-launch-preview-to-review' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-launch-preview-to-review' slug=experiment.slug %}"
hx-target="#launch-controls"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="outerHTML"
id="preview-controls-form">
{% csrf_token %}
Expand Down Expand Up @@ -46,13 +46,13 @@
class="btn btn-primary mx-3"
id="request-launch-button"
hx-post="{% url 'nimbus-new-launch-preview-to-review' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="innerHTML"
disabled>Request Launch</button>
<button type="button"
class="btn btn-secondary"
hx-post="{% url 'nimbus-new-launch-preview-to-draft' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="innerHTML">Go Back to Draft</button>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<form method="post"
action="{% url 'nimbus-new-launch-to-preview' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-launch-to-preview' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-swap="innerHTML">
hx-target="#launch-controls, #experiment-timeline"
hx-swap="outerHTML">
{% csrf_token %}
<span class="text-danger">We recommend previewing before launch</span>
<button type="submit"
Expand All @@ -15,8 +15,8 @@
<form method="post"
action="{% url 'nimbus-new-launch-preview-to-review' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-launch-preview-to-review' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-swap="innerHTML">
hx-target="#launch-controls, #experiment-timeline"
hx-swap="outerHTML">
{% csrf_token %}
<div class="form-check">
<input type="checkbox"
Expand All @@ -41,6 +41,6 @@
<button type="button"
class="btn btn-secondary"
hx-post="{% url 'nimbus-new-launch-preview-to-draft' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-target="#launch-controls, #experiment-timeline"
hx-swap="innerHTML">Cancel</button>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<form method="post"
action="{% url 'nimbus-new-cancel-review' slug=experiment.slug %}"
hx-post="{% url 'nimbus-new-cancel-review' slug=experiment.slug %}"
hx-target="#experiment-container"
hx-swap="innerHTML">
hx-target="#launch-controls, #experiment-timeline"
hx-swap="outerHTML">
{% csrf_token %}
<div class="alert alert-warning">
<p>The experiment is currently under review. If you wish to cancel the review, click the button below:</p>
Expand Down
3 changes: 1 addition & 2 deletions experimenter/experimenter/nimbus_ui_new/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class UnsubscribeView(
form_class = UnsubscribeForm
template_name = "nimbus_experiments/subscribers_list.html"


class TimelineAndControlsMixin:
"""
Mixin to handle rendering of timeline and controls for a given experiment.
Expand All @@ -295,10 +296,8 @@ def render_response_with_timeline_and_controls(self, experiment, controls_templa

return HttpResponse(
f"""
<div id="experiment-container">
<div id="experiment-timeline">{timeline_html}</div>
<div id="launch-controls">{controls_html}</div>
</div>
"""
)

Expand Down