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): Summary page timeline #11393

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

Conversation

yashikakhurana
Copy link
Contributor

Because

  • We want to show the timeline on the new summary page

This commit

  • Adds new status timeline

Note: On the same timeline, in the next PR, I will add the functionality to go back from preview to draft or preview to launch

Fixes #11361
Screenshot 2024-09-19 at 5 15 39 PM
Screenshot 2024-09-19 at 5 10 35 PM
Screenshot 2024-09-19 at 5 09 49 PM
Screenshot 2024-09-19 at 5 08 56 PM

Future design
image (7)

Copy link
Contributor

@mikewilli mikewilli left a comment

Choose a reason for hiding this comment

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

Nice! On the current summary page the Timeline section shows a current state label (which I think is what this is replacing), but also a timeline with Start | Enrollment End | End dates. Will that timeline come later? How will it fit in with this? Or since it looks like there are some design docs, I could look there if they answer my questions and you don't mind sharing a link!

Also left you a question on the date logic and a suggestion for the state titles.

preview_changelog = (
self.changes.filter(new_status=self.Status.PREVIEW)
.order_by("changed_on")
.first()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be first or last? If it changes out of preview and back into preview would we want to show the first or most recent date?

Copy link
Contributor

Choose a reason for hiding this comment

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

(and same question for draft_date)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ya a good question, I can think of reasons to want to do either. I'd slot this under 'pick one and wait for user feedback'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I had the same doubt and thought to use the first one, but we can change depending who users want to see it

<div class="d-flex align-items-center justify-content-between position-relative">
<!-- Draft Status -->
<div class="border border-dark rounded p-3 text-center flex-grow-1 mx-2 {% if experiment.status == 'Draft' %}bg-primary text-white{% else %}bg-light{% endif %}">
<div>Draft</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest making these something like <h5> so they stand out from the dates a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-09-23 at 8 04 55 PM

@jaredlockhart
Copy link
Collaborator

@yashikakhurana Yay!!!! Let's iterate on this together over zoom.

@yashikakhurana
Copy link
Contributor Author

@jaredlockhart @mikewilli new ui
Screenshot 2024-09-24 at 7 16 32 PM

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.

Coming along! Couple problems:

image
  • Name is bleeding under the timeline
  • The dates are unreadable
image
  • The background of some status blocks is grey and others are white

Maybe instead of having only the current status filled in and the rest be white, we should do it more like, each gets filled in, the current one is brightest, and the rest are grey like this?

image

also i tried moving the dates out from the statuses just to make it less visually clunky, i dunno, worth playing with.

Try generating experiments from each lifecycle to see what it looks like in every state.

@yashikakhurana
Copy link
Contributor Author

Screenshot 2024-09-25 at 2 29 18 AM

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.

Yes looks fantastic!!! But I just realized we can simplify this.

<div class="col-6">
<ul class="list-group list-group-horizontal justify-content-between mb-3">
<!-- Draft Status -->
<li class="list-group-item flex-fill text-center d-flex flex-column justify-content-center {% if experiment.status == 'Draft' and experiment.publish_status == 'Idle' %} bg-primary text-light {% else %} mode-sensitive text-dark {% endif %}">
Copy link
Collaborator

@jaredlockhart jaredlockhart Sep 24, 2024

Choose a reason for hiding this comment

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

def timeline_dates(self):
    return [
        (self.Status.DRAFT.value, self.......),
        .....
    ]
<ul class="....">
  {% for status, date in experiment.timeline_dates %}
    <li class="list-group-item .....>
      <strong>{{ status}}</strong>
      <small>{{ date|default:"---" }}</small>
    </li>
  {% endfor %}
</ul>

@jaredlockhart
Copy link
Collaborator

Oh and if you get a chance I also realized, once we hit LIVE we should put the 'computed_end_date' under Complete, ie so it'll show the projected date in the future we expect to end.

@mikewilli
Copy link
Contributor

From my comment:

On the current summary page the Timeline section shows [...] a timeline with Start | Enrollment End | End dates. Will that timeline come later? How will it fit in with this?

With the latest updates, I think Start date is covered by Live, and End is covered by Complete, but will we show the Enrollment End date on this page or anywhere else?

By the way, I love all the changes, the page is looking great!

@yashikakhurana
Copy link
Contributor Author

From my comment:

On the current summary page the Timeline section shows [...] a timeline with Start | Enrollment End | End dates. Will that timeline come later? How will it fit in with this?

With the latest updates, I think Start date is covered by Live, and End is covered by Complete, but will we show the Enrollment End date on this page or anywhere else?

By the way, I love all the changes, the page is looking great!

good question, let me see how we can incorporate that in this design, I will file a separate ticket to add Total duration, Enrollment days and enrollment end date

@yashikakhurana
Copy link
Contributor Author

Screenshot 2024-09-25 at 5 42 46 PM with new computed end date logic

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.

Summary page timeline
3 participants