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

C24_WMDE_Mobile_DE_09 #624

Merged
merged 10 commits into from
Nov 21, 2024
Merged

C24_WMDE_Mobile_DE_09 #624

merged 10 commits into from
Nov 21, 2024

Conversation

moiikana
Copy link
Contributor

@moiikana moiikana commented Nov 15, 2024

based on 08 VAR

var has 10 reasons popup
and tracks

  • The overlay is displayed.

  • One of the reasons was expanded (and which).

  • The button at the bottom of the overlay is clicked.

https://phabricator.wikimedia.org/T379953

@moiikana moiikana force-pushed the C24_WMDE_Mobile_DE_09 branch 2 times, most recently from 2431a6b to 1e19bb6 Compare November 15, 2024 14:55
@moiikana moiikana force-pushed the C24_WMDE_Mobile_DE_09 branch 8 times, most recently from cc7ed54 to 2f9ad23 Compare November 15, 2024 15:47
Base automatically changed from 10-reasons to main November 18, 2024 09:30
@moiikana moiikana force-pushed the C24_WMDE_Mobile_DE_09 branch 11 times, most recently from 03af03b to 2219d12 Compare November 18, 2024 15:15
@moiikana moiikana marked this pull request as ready for review November 18, 2024 15:57
banners/mobile/C24_WMDE_Mobile_DE_09/MinimisedTracker.ts Outdated Show resolved Hide resolved
@@ -1,7 +1,7 @@
<template>
<dialog class="wmde-banner-10-reasons" ref="reasonsDialogue">
<div class="wmde-banner-10-reasons-close">
<button @click="$emit( 'hide' )">
Copy link
Member

Choose a reason for hiding this comment

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

I like the simpler event names that don't repeat the component name in them, they'll be easier to read in the template. But that's just my personal taste.

Copy link
Member

Choose a reason for hiding this comment

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

I see that you're trying to make this more consistent with the Use of Funds, but I'd prefer if this component fired different events for the close and CTA click, as this removes the need for an enum, and the requirement for an if branch in all the banner components.

Copy link
Contributor Author

@moiikana moiikana Nov 19, 2024

Choose a reason for hiding this comment

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

I like the simpler event names that don't repeat the component name in them, they'll be easier to read in the template. But that's just my personal taste.

I hope I understood your point, but if we e.g. have 3 popup features that all send "hide" to the parent,
I feared that the browser / DOM event handling could be messing up which event came from which component.
If that's not the case and events stay within their "contact way to the parent" then we can have simpler event names, yes.

Copy link
Member

Choose a reason for hiding this comment

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

Vue emits aren't generic browser events, and it binds the handlers directly (eg @hide="doThisThing"). So 3 components can all emit "hide" events, and as long as they're bound to different functions it'll be okay.

test/features/ReasonsToDonate.ts Outdated Show resolved Hide resolved
test/features/ReasonsToDonate.ts Show resolved Hide resolved
Copy link
Member

@Abban Abban left a comment

Choose a reason for hiding this comment

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

Some suggestions for fixing the tests

@@ -1,7 +1,7 @@
<template>
<dialog class="wmde-banner-10-reasons" ref="reasonsDialogue">
<div class="wmde-banner-10-reasons-close">
<button @click="$emit( 'hide' )">
Copy link
Member

Choose a reason for hiding this comment

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

I see that you're trying to make this more consistent with the Use of Funds, but I'd prefer if this component fired different events for the close and CTA click, as this removes the need for an enum, and the requirement for an if branch in all the banner components.

test/features/ReasonsToDonate.ts Outdated Show resolved Hide resolved
test/features/ReasonsToDonate.ts Outdated Show resolved Hide resolved
test/features/ReasonsToDonate.ts Show resolved Hide resolved
test/features/ReasonsToDonate.ts Outdated Show resolved Hide resolved
- var uses 10 reasons popup
- tracks shown, cta-click and accordion item clicks

- make minibanners the same size

- remove old MinimisedTracker (leftover)

- add tests for tracking

https://phabricator.wikimedia.org/T379953
@Abban
Copy link
Member

Abban commented Nov 19, 2024

I created a follow up PR that adds explicit styles for the links in the content, and swaps the links to buttons #626

Abban and others added 5 commits November 19, 2024 15:30
This adds some styles so we can use buttons in the
slider and full page content in the mobile de
banners.

Ticket: https://phabricator.wikimedia.org/T379953
- is based on the control banner of desktop-de-13

Ticket: https://phabricator.wikimedia.org/T379950
- adds additional copy
- displays the "10 good reasons" overlay when the link in the added copy is clicked
- adds styles for the "10 good reasons" button link

Ticket: https://phabricator.wikimedia.org/T379953
Dann entscheiden Sie sich, eine der seltenen Ausnahmen zu sein, und geben Sie etwas zurück.
Falls Sie zögern,
<a
id="reasons-to-donate-link"
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this id, it's appearing on the page twice

Falls Sie zögern,
<a
id="reasons-to-donate-link"
class="wmde-banner-reasons-to-donate-link t-reasons-to-donate-link"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class="wmde-banner-reasons-to-donate-link t-reasons-to-donate-link"
class="wmde-banner-reasons-to-donate-link"

@@ -1,7 +1,7 @@
<template>
<dialog class="wmde-banner-10-reasons" ref="reasonsDialogue">
<div class="wmde-banner-10-reasons-close">
<button @click="$emit( 'hide' )">
Copy link
Member

Choose a reason for hiding this comment

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

Vue emits aren't generic browser events, and it binds the handlers directly (eg @hide="doThisThing"). So 3 components can all emit "hide" events, and as long as they're bound to different functions it'll be okay.

@Abban Abban merged commit 448749d into main Nov 21, 2024
1 check passed
@Abban Abban deleted the C24_WMDE_Mobile_DE_09 branch November 21, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants