Closed lizzochek closed 1 day ago
@lizzochek Can you add some more details to the QA steps please ie. what each type is supposed to look like
It isn't switching for me based on the cookie:
currently on demo it does change correctly for me. Please make sure to reload the page. And the current takeover style is. also in black - maybe that is also confusing. The new one is ONLY 'A CTO's guide...', all other ones are from current page
Hey, the problem is still persisting, here we have a 'control' takeover, while the cookie is set to 'variant'. The reason for this is because the check for the cookie type is done server-side, before the JS has run. You need to move the takeover rendering into some JS that runs after the JS responsible for assigning the control/variant cookie.
EDIT: I believe this is how they are doing it on ubuntu.com, see https://github.com/canonical/ubuntu.com/blob/c289f51b28223d39ebc713c104301fefd075ce4b/templates/base_index.html#L1096
If this can't work here you might have to generate two different formats and only show the appropriate one.
@lizzochek Why when the cookie value is set to "variant" I'm only seeing one takeover. It is supposed to show different takeovers but with a different layout.
@akbarkz as far as I understood from our discussion, for the test template we are not fetching the data from discourse, therefore there is one takeover. do we need to show all the same takeovers as the 'control' option?
@lizzochek I think you understood it wrong then. We need to show only one different layout. But the takeovers content should remain the same. Meaning they should still change but show with a different layout.
Done
Added switching between 2 takeover types for different user groups. PUT SWITCH TO FALSE BEFORE MERGE
QA
Issue / Card
WD-11695