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): Draft/Preview/Review workflow #11932

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

yashikakhurana
Copy link
Contributor

Because

We want to include workflow on the new summary page:

  • Send draft to preview
  • preview to review
  • preview to draft
  • review to draft
  • cancel review

This commit

  • Adds the preview, review workflow

Fixes #11757

Screen.Recording.2024-12-11.at.10.24.37.AM.mov

@yashikakhurana yashikakhurana changed the title 11757/draft preview flow feat(nimbus): Draft/Preview/Review workflow Dec 11, 2024
@yashikakhurana
Copy link
Contributor Author

wait for review, fixing some layouts

Copy link
Collaborator

@jaredlockhart jaredlockhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I tried locally and it works great! Needs to be updated to latest main and I think we can do the views/controls differently, but this is coming along great 🎉 🎉 🎉 🎉

Comment on lines 338 to 340
generate_nimbus_changelog(
experiment, self.request.user, self.get_changelog_message()
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add this here? This is already done by NimbusChangeLogFormMixin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh if I am overriding the save method, I noticed that it is not generating the changelogs, so for that, I needed to explicitly called the generate changelogs method

Comment on lines +4 to +11
<svg class="align-top"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 16 16"
width="16"
height="16">
<path d="M13.485 1.4a.5.5 0 0 1 .035.71L6.543 9.793 3.379 6.93a.5.5 0 1 1 .708-.707l2.1 2.1 6.514-7.1a.5.5 0 0 1 .707-.035z" />
</svg>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to use fontawesome here?

@@ -264,3 +271,93 @@ class UnsubscribeView(
):
form_class = UnsubscribeForm
template_name = "nimbus_experiments/subscribers_list.html"

class TimelineAndControlsMixin:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think a different way to do this is to move all this logic directly into the summary template, and then use hx-select and hx-target to just update the controls/timeline, rather than doing logic in the views here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draft to preview and preview to draft
2 participants