department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Homepage modal: update release logic to make modal visible to a % of users when flipper is enabled #12057

Closed jilladams closed 1 year ago

jilladams commented 1 year ago

Description

12/21 new scope request from Dave C: investigate and estimate what would be required to display the homepage modal to a % of users and gradually ramp to 100%, rather than binary off/on flipper.

This is complicated as the gradual-roll-out logic that comes with flipper pertains to authenticated users only. So: we will need to implement this for _un_authenticated users as well.

The chatbot previously did some similar % release to unauthed users, and our team removed the logic that controlled it. That logic is applicable / reusable for this use case.

% rollout will begin with 25%. Release plan will document the plan for progression.

Nice to have: testing, future proofing

  1. This will be the 2nd time we've needed a method for % phased rollout to unauthed users. It behooves us to think about how to make this extensible / reusable for future needs. Ryan notes:
    • The previous implementation is not utilizing any sort of hook, which likely has the effect of running the calculation logic every time the render function is called (which is likely a lot more than once.
    • A custom hook is probably the way to go, and that'd make this reusable as well.

This issue is time-sensitive, so if making this reusable increases LOE, it can be broken out into a separate ticket.

  1. For testing purposes, it would be very helpful to have a means of forcing the modal to appear even if you are not in the 25%.

Additional context

va_home_preview_modal flipper is still available for off/on logic to display the modal at all.

Acceptance Criteria

CMS Team

Please check the team(s) that will do this work.

jilladams commented 1 year ago

Spike notes: https://dsva.slack.com/archives/C52CL1PKQ/p1671643860406759 tl;dr: we can use the chatbot logic. Converting to become an implementation ticket.

jilladams commented 1 year ago

Since this was primarily tested locally, and not possible to confirm in a review instance with the given QA steps, I'm moving to PO Review column for Staging verification once it hits staging.

jilladams commented 1 year ago

Tested on Staging & verified:

Positive: Modal should appear for user assigned show-homepage-soft-launch-modal <=25

Negative: modal should not appear for show-homepage-soft-launch-modal >25

I then reset the show-homepage-soft-launch-modal to 13, reload: modal appears.

Great success. Closing.