Page MenuHomePhabricator

Add optional talk page icon to the mobile-html endpoint
Open, In Progress, MediumPublic

Description

Parent ticket: https://phabricator.wikimedia.org/T297630

We would like to add an entry point to the talk page in the app, shown as below:

Custom_experience_02.png (1×720 px, 584 KB)

Please add the bubble icon (as the same icon as the talk page icon), expose the talk page bubble aligned right on LtR, and aligned left on RtL.
background-image: var(--talk-page-icon);

The color of the button can be the same as the edit buttons.

The size of the icon should be at least 48px*48px

Please make a method of controlling the visibility of the button, e.g.: setTalkPageButton(isVisible)

Please also make sure to post message by using the postMessage(): example.

Event Timeline

cooltey renamed this task from Add talke page icon and subject number to the mobile-html endpoint to Add talk page icon and active number of discussion subjects to the mobile-html endpoint.Jan 7 2022, 9:52 PM
cooltey updated the task description. (Show Details)
LGoto triaged this task as Medium priority.Jan 10 2022, 5:06 PM
LGoto moved this task from Needs Triage to Tracking on the Wikipedia-Android-App-Backlog board.
MattCleinman renamed this task from Add talk page icon and active number of discussion subjects to the mobile-html endpoint to Add optional talk page icon to the mobile-html endpoint.Feb 8 2022, 9:27 PM
MattCleinman updated the task description. (Show Details)

Change 764328 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Add optional talk page icon to the mobile-html endpoint

https://gerrit.wikimedia.org/r/764328

Hi @cooltey ! Could you clarify which event should trigger 'Talk page' icon visibility? There is 'Reading Focus mode' mentioned in T297630, how can I reproduce it to hook setTalkPageButton(isVisible)?

Added pcs handler for icon visibility + tests. Note: I suppose, this icon also requires Voice Over feature that can be implemented with the scope of the next stage.

Hi @vadim-kovalenko
The behavior is similar to this one:
https://github.com/wikimedia/mobileapps/blob/7c00242953b2a2f4554580e88bcac14b668d455a/pagelib/docs/pcs/pcs.md#seteditbuttonsiseditable-isprotected-onsuccess

When the reading focus mode is on, all "edit" buttons in the mobile-html are invisible, which in the app we will call the function above to hide all edit buttons.

In this ticket, we would like to have a new function called setTalkPageButton(isVisible), so that we can control the visibility of the talk page bubble and its number.

Please let me know if you need more information, thanks!

Hi @cooltey ! Thank you for the clarification, I've implemented this in the patch above.

Checking in - What is the status on this task? Is the patch still under review? Thanks!

Change 764328 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Add optional talk page icon to the mobile-html endpoint

https://gerrit.wikimedia.org/r/764328

Looking at the ticket, I suppose we never explicitly said the default should be not visible, other than calling it “optional”.

Apologies for the late addition: The default should be that this is not visible. Nothing should change about the default display. But when setTalkPageButton(isVisible) is called w/ true, then this new display should show.

But when setTalkPageButton(isVisible) is called w/ true, then this new display should show.

Ideally, showing the Talk bubble should also be settable during the setup phase, so that the bubble appears when the page is first rendered. If we need to call setTalkPageButton() after the page is already loaded, it might cause a layout change, which is not desirable.

Is this optional setup call used as a feature flag or showing the talk button is going to remain optional ?

Is this optional setup call used as a feature flag or showing the talk button is going to remain optional ?

The talk button should remain optional at all times. (The app has a reading-focus setting that hides all editing-related features, and the talk button is one of them.)

Change 773516 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Add optional talk page icon to the mobile-html endpoint

https://gerrit.wikimedia.org/r/773516

Do we know when this will be complete and deployed? Thanks!

Change 773516 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Add optional talk page icon to the mobile-html endpoint

https://gerrit.wikimedia.org/r/773516

Confirmed that this is deployed and working, so unblocking the parent task. Thanks!

Hi @vadim-kovalenko

Just checked the implementation in the app, and I have noticed the bubble icon will make the description div move down a little bit. Would it be possible to avoid the layout jumps? Thanks!

cc @scblr

Demo video:
https://www.youtube.com/shorts/63oot342ivw

Change 790349 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Add optional talk page icon to the mobile-html endpoint

https://gerrit.wikimedia.org/r/790349

Thanks @cooltey for spotting this:

I have noticed the bubble icon will make the description div move down a little bit. Would it be possible to avoid the layout jumps? Thanks!

And @vadim-kovalenko for the great work so far!

👏👏👏

@vadim-kovalenko Thanks for your work on this. I want to make sure you saw the comment directly above this - this probably should move from the sign off column, to handle that tweak that is needed. Thank you!