Page MenuHomePhabricator

NewImpact: Limit article table list to 5 articles with data and 5 articles pending data
Closed, ResolvedPublic

Description

The business rules in T313310: Impact module: Implement table list component say that we should only show a maximum of 5 articles. But when there is pending page view data, we output more than 5:

image.png (1×1 px, 211 KB)

We should fix that on the server-side, to only output data for the top 5 articles.

Acceptance Criteria

  1. Show up to 5 articles that have view numbers.
  2. Show up to 5 articles that do not yet have view numbers with the clock icon. These will appear in order of recency (most recent first), below articles that do have view figures.
Completion checklist

Functionality

  • The patches have been code reviewed and merged
  • The task passes its acceptance criteria

Engineering

  • There are existing and passing unit/integration tests
  • Tests for every involved patch should pass
  • Coverage for every involved project should have improved or stayed the same

Design & QA

  • If the task is UX/Design related: it must be reviewed and approved by the UX/Design team
  • Must be reviewed and approved by Quality Assurance.

Documentation

  • Related and updated documentation done where necessary

Event Timeline

@RHo @KStoller-WMF actually, I am a little unclear what the business rules are for this scenario. T313310 says:

Then I see a list of up to 5 articles that are the most viewed articles that I have edited in the last 30 days.

But if I make a new edit, I should see the clock icon for that article, is that right? In which case, should the newness of the edit with a clock icon take precedence over articles that have higher number of page views?

@RHo @KStoller-WMF actually, I am a little unclear what the business rules are for this scenario. T313310 says:

Then I see a list of up to 5 articles that are the most viewed articles that I have edited in the last 30 days.

But if I make a new edit, I should see the clock icon for that article, is that right? In which case, should the newness of the edit with a clock icon take precedence over articles that have higher number of page views?

Hi @kostajh, yes the clock icon should be shown for that article since views are not "counted" yet so would technically not be most viewed. However, we do want to show the article just edited with the clock icon so that those who have just edited can see their progress and get a sense that this is where they should return to look at impact numbers again. @KStoller-WMF – how about this as a proposed additional/updated business rule:

  1. Show up to 5 articles that have view numbers.
  2. Show up to 5 articles that do not yet have view numbers with the clock icon. These will appear in order of recency (most recent first), below articles that do have view figures.

Example: There is the max 5 articles with view figures, plus 2 (of the max. 5 possible) articles that do not yet have view figures. "Linux Magazine" is shown above "Monosodium glutamate" because it was edited last (most recently).

image.png (920×758 px, 164 KB)

One more thing about the clock icon: do we need to show it for articles that the user just edited? We already have page view data for that article, so might as well include it in the total? The exception would be if the user has created a new article, in which case we could show "0". That might simplify things.

One more thing about the clock icon: do we need to show it for articles that the user just edited? We already have page view data for that article, so might as well include it in the total? The exception would be if the user has created a new article, in which case we could show "0". That might simplify things.

Hi @kostajh - unless there has been a change in view calculations, it should still be based on view counts since the person edited (as it is now) up until the last X days, so the clock should remain for recently viewed articles.

image.png (512×1 px, 72 KB)

IIRC the reason we had it as this logic is that if showing last 60days regardless of when the person edited may be a little misleading (since the person only just edited, the views are not seeing their work/impact) and may encourage people to edit "popular" articles for the sake of seeing high values.

Also, please see my comment below about counting the "clock" articles separately:

@RHo @KStoller-WMF actually, I am a little unclear what the business rules are for this scenario. T313310 says:

Then I see a list of up to 5 articles that are the most viewed articles that I have edited in the last 30 days.

But if I make a new edit, I should see the clock icon for that article, is that right? In which case, should the newness of the edit with a clock icon take precedence over articles that have higher number of page views?

Hi @kostajh, yes the clock icon should be shown for that article since views are not "counted" yet so would technically not be most viewed. However, we do want to show the article just edited with the clock icon so that those who have just edited can see their progress and get a sense that this is where they should return to look at impact numbers again. @KStoller-WMF – how about this as a proposed additional/updated business rule:

  1. Show up to 5 articles that have view numbers.
  2. Show up to 5 articles that do not yet have view numbers with the clock icon. These will appear in order of recency (most recent first), below articles that do have view figures.

Example: There is the max 5 articles with view figures, plus 2 (of the max. 5 possible) articles that do not yet have view figures. "Linux Magazine" is shown above "Monosodium glutamate" because it was edited last (most recently).

image.png (920×758 px, 164 KB)

  1. Show up to 5 articles that have view numbers.
  2. Show up to 5 articles that do not yet have view numbers with the clock icon. These will appear in order of recency (most recent first), below articles that do have view figures.

That sounds fine with me. I agree it's better UX to show more than 5 if the user has several recent edits with no view count data yet.

I also agree that ideally we are showing the view count based on views since the user edited that particular article. Not instantly show the total in the last 60 days, as that user's edit didn't receive those views. Is that not how the logic is working?

Sgs changed the task status from Open to In Progress.Nov 14 2022, 4:57 PM
Sgs claimed this task.
Sgs removed Sgs as the assignee of this task.Nov 16 2022, 11:20 AM
Sgs subscribed.

Removing assign to avoid cookie licking.

kostajh renamed this task from NewImpact: Limit article table list to 5 articles to NewImpact: Limit article table list to 5 articles with data and 5 articles pending data.Nov 17 2022, 8:20 AM
  1. Show up to 5 articles that have view numbers.
  2. Show up to 5 articles that do not yet have view numbers with the clock icon. These will appear in order of recency (most recent first), below articles that do have view figures.

That sounds fine with me. I agree it's better UX to show more than 5 if the user has several recent edits with no view count data yet.

I also agree that ideally we are showing the view count based on views since the user edited that particular article. Not instantly show the total in the last 60 days, as that user's edit didn't receive those views. Is that not how the logic is working?

I filed T323253: NewImpact module: Page view data should be limited to when user made their first edit about that one; it's possible that the same patch would address that task and this one.

@RHo - I don't think this was in the design specs, but should we include the same tooltip for the clock icon as used for the old impact module?

Screen Shot 2022-11-17 at 9.45.35 AM.png (842×1 px, 397 KB)

Copy:

Since you first edited this article today, pageviews have not yet been calculated. Check back tomorrow!

I'm assuming we should either make the clock grey if there is no interaction, or keep it blue and add in this tool tip?
My preference would be to add in this explanation text, as I don't think it's obvious to newcomers otherwise why some articles have pageview stats and some don't.

Change 858547 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Adjust API output for top articles

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

Change 858548 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

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

@RHo - I don't think this was in the design specs, but should we include the same tooltip for the clock icon as used for the old impact module?

Screen Shot 2022-11-17 at 9.45.35 AM.png (842×1 px, 397 KB)

Copy:

Since you first edited this article today, pageviews have not yet been calculated. Check back tomorrow!

I'm assuming we should either make the clock grey if there is no interaction, or keep it blue and add in this tool tip?
My preference would be to add in this explanation text, as I don't think it's obvious to newcomers otherwise why some articles have pageview stats and some don't.

! In T322410#8405058, @gerritbot wrote:

Change 858548 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

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

I added the existing empty pageviews tooltip to the clock, which IMHO is good enough for now. Its message is Pageviews have not yet been calculated. Check back tomorrow!

Just noting that since we haven't implemented the drop down to allow users to adjust the data they see (T220143: Impact Module: Provide an option to show pageviews earlier than the 60-day limit from the PageViewInfo extension, T220139: New Impact Module: Filter/Sort options to customize the top edited articles of the impact module), the effect of this change is that a user who edits 5 articles with high page views counts will basically always see those there, and not any newer articles with smaller page views. But we can deal with that in T316699: [EPIC] Growth: Positive reinforcement - Iteration 2.

Change 858460 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Show 5 top viewed pages

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

Change 858547 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Adjust API output for top articles

Reason:

Squashed into parent, will address unresolved comments in parent as well

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

Change 858548 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

Reason:

Squashed into parent

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

Change 858460 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Show 5 top viewed pages

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

kostajh changed the task status from In Progress to Open.Nov 22 2022, 1:25 PM
kostajh moved this task from Code Review to QA on the Growth-Team (Sprint 0 (Growth Team)) board.

@RHo - I don't think this was in the design specs, but should we include the same tooltip for the clock icon as used for the old impact module?

Screen Shot 2022-11-17 at 9.45.35 AM.png (842×1 px, 397 KB)

Copy:

Since you first edited this article today, pageviews have not yet been calculated. Check back tomorrow!

I'm assuming we should either make the clock grey if there is no interaction, or keep it blue and add in this tool tip?
My preference would be to add in this explanation text, as I don't think it's obvious to newcomers otherwise why some articles have pageview stats and some don't.

! In T322410#8405058, @gerritbot wrote:

Change 858548 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

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

I added the existing empty pageviews tooltip to the clock, which IMHO is good enough for now. Its message is Pageviews have not yet been calculated. Check back tomorrow!

Hi @KStoller-WMF and @kostajh - I'm a little confused. AFAICT we already have this existing tooltip when hovering over the clock - it maps to this message string on translatewiki.

image.png (640×900 px, 82 KB)

@RHo - I don't think this was in the design specs, but should we include the same tooltip for the clock icon as used for the old impact module?

Screen Shot 2022-11-17 at 9.45.35 AM.png (842×1 px, 397 KB)

Copy:

Since you first edited this article today, pageviews have not yet been calculated. Check back tomorrow!

I'm assuming we should either make the clock grey if there is no interaction, or keep it blue and add in this tool tip?
My preference would be to add in this explanation text, as I don't think it's obvious to newcomers otherwise why some articles have pageview stats and some don't.

! In T322410#8405058, @gerritbot wrote:

Change 858548 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

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

I added the existing empty pageviews tooltip to the clock, which IMHO is good enough for now. Its message is Pageviews have not yet been calculated. Check back tomorrow!

Hi @KStoller-WMF and @kostajh - I'm a little confused. AFAICT we already have this existing tooltip when hovering over the clock - it maps to this message string on translatewiki.

image.png (640×900 px, 82 KB)

Sorry for the confusion! What I proposed (and implemented) is to use the alternative string, "Pageviews have not yet been calculated. Check back tomorrow!". That was in the existing growthexperiments-homepage-impact-empty-pageviews-tooltip-short string, which we added back in rEGREea6129929bd3: Adding short version of the Impact 'nopageviews' tooltip. IMHO this string is better, because it doesn't assume that the user edited the article "today" – there might be cases where we don't have page view data for 24-48 hours, especially for new article creation, so I'd rather not misinform the user in those instances. Does that sound OK to you?

@RHo - I don't think this was in the design specs, but should we include the same tooltip for the clock icon as used for the old impact module?

Screen Shot 2022-11-17 at 9.45.35 AM.png (842×1 px, 397 KB)

Copy:

Since you first edited this article today, pageviews have not yet been calculated. Check back tomorrow!

I'm assuming we should either make the clock grey if there is no interaction, or keep it blue and add in this tool tip?
My preference would be to add in this explanation text, as I don't think it's obvious to newcomers otherwise why some articles have pageview stats and some don't.

! In T322410#8405058, @gerritbot wrote:

Change 858548 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Add empty pageviews tooltip

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

I added the existing empty pageviews tooltip to the clock, which IMHO is good enough for now. Its message is Pageviews have not yet been calculated. Check back tomorrow!

Hi @KStoller-WMF and @kostajh - I'm a little confused. AFAICT we already have this existing tooltip when hovering over the clock - it maps to this message string on translatewiki.

image.png (640×900 px, 82 KB)

Sorry for the confusion! What I proposed (and implemented) is to use the alternative string, "Pageviews have not yet been calculated. Check back tomorrow!". That was in the existing growthexperiments-homepage-impact-empty-pageviews-tooltip-short string, which we added back in rEGREea6129929bd3: Adding short version of the Impact 'nopageviews' tooltip. IMHO this string is better, because it doesn't assume that the user edited the article "today" – there might be cases where we don't have page view data for 24-48 hours, especially for new article creation, so I'd rather not misinform the user in those instances. Does that sound OK to you?

Ah OK, gotcha! I will update in the Copy/QQQ spreadsheet so that the tooltip uses growthexperiments-homepage-impact-empty-pageviews-tooltip-short instead of growthexperiments-homepage-impact-empty-pageviews-tooltip.

Hi again, @kostajh or @Sgs - this is maybe minor regression but I've noticed that the new impact module's clock icon has the message in a browser tooltip on hover, and is not keyboard accessible. It should appear and behave in the same way as before, which is a pop-over info text that is shown either on hover or via keyboard select:

Expected:
image.png (370×766 px, 55 KB)
Actual:
image.png (172×706 px, 34 KB)

Should I file a ticket or can it be resolved as part of this task?

Hi again, @kostajh or @Sgs - this is maybe minor regression but I've noticed that the new impact module's clock icon has the message in a browser tooltip on hover, and is not keyboard accessible. It should appear and behave in the same way as before, which is a pop-over info text that is shown either on hover or via keyboard select:

Expected:
image.png (370×766 px, 55 KB)
Actual:
image.png (172×706 px, 34 KB)

Should I file a ticket or can it be resolved as part of this task?

Hmm, agreed that it is changed behavior from the old impact module. From an accessibility standpoint, I wonder if the behavior in the new impact module (the title attribute on the icon) is better, since it doesn't require the non-sighted user to tab into an interface to read the message?

Hi again, @kostajh or @Sgs - this is maybe minor regression but I've noticed that the new impact module's clock icon has the message in a browser tooltip on hover, and is not keyboard accessible. It should appear and behave in the same way as before, which is a pop-over info text that is shown either on hover or via keyboard select:

Expected:
image.png (370×766 px, 55 KB)
Actual:
image.png (172×706 px, 34 KB)

Should I file a ticket or can it be resolved as part of this task?

Hmm, agreed that it is changed behavior from the old impact module. From an accessibility standpoint, I wonder if the behavior in the new impact module (the title attribute on the icon) is better, since it doesn't require the non-sighted user to tab into an interface to read the message?

I think it may be worse since it is skipped entirely in keyboard navigation, so think it makes sense to go back to the original interaction.

I found this in the backlog T313176: Impact module: Top viewed articles counts is using unexpected count logic which is related to this task.
We should prioritise T313176 because currently the numbers are misleading and confusing if counts are based on since one's last edit on any article, and not connected to last edit on the specific article.

I found this in the backlog T313176: Impact module: Top viewed articles counts is using unexpected count logic which is related to this task.
We should prioritise T313176 because currently the numbers are misleading and confusing if counts are based on since one's last edit on any article, and not connected to last edit on the specific article.

Adding note from T313176#8418573: that task is now done :)

Hi again, @kostajh or @Sgs - this is maybe minor regression but I've noticed that the new impact module's clock icon has the message in a browser tooltip on hover, and is not keyboard accessible. It should appear and behave in the same way as before, which is a pop-over info text that is shown either on hover or via keyboard select:

Expected:
image.png (370×766 px, 55 KB)
Actual:
image.png (172×706 px, 34 KB)

Should I file a ticket or can it be resolved as part of this task?

Hmm, agreed that it is changed behavior from the old impact module. From an accessibility standpoint, I wonder if the behavior in the new impact module (the title attribute on the icon) is better, since it doesn't require the non-sighted user to tab into an interface to read the message?

I think it may be worse since it is skipped entirely in keyboard navigation, so think it makes sense to go back to the original interaction.

I'm moving that over to T313274 to discuss/act on.

Etonkovidova subscribed.

Checked in betalabs - five articles plus two articles with yet uncounted pageviews are displayed correctly - the scope of this task seem to be done:

Screen Shot 2022-11-28 at 6.19.33 PM.png (1×1 px, 144 KB)

However, two issues discussed in the comments - should they be resolved before deployment?
Added as a comment to T323253 (1) the pageviews for just made edits will be displayed immediately
The current behavior in betalabs:

Screen Shot 2022-11-28 at 5.00.29 PM.png (1×980 px, 112 KB)

In the current production, the pageviews won't be immediately available

Screen Shot 2022-11-28 at 5.51.46 PM.png (846×860 px, 89 KB)

(2) The change in the tooltip display

production wmf.10betlabs
Screen Shot 2022-11-28 at 5.51.46 PM.png (846×860 px, 89 KB)
Screen Shot 2022-11-28 at 6.14.40 PM.png (972×1 px, 148 KB)

Checked in betalabs - five articles plus two articles with yet uncounted pageviews are displayed correctly - the scope of this task seem to be done:

Screen Shot 2022-11-28 at 6.19.33 PM.png (1×1 px, 144 KB)

However, two issues discussed in the comments - should they be resolved before deployment?
Added as a comment to T323253 (1) the pageviews for just made edits will be displayed immediately
The current behavior in betalabs:

Screen Shot 2022-11-28 at 5.00.29 PM.png (1×980 px, 112 KB)

In the current production, the pageviews won't be immediately available

Screen Shot 2022-11-28 at 5.51.46 PM.png (846×860 px, 89 KB)

Let's deal with that one in T323253: NewImpact module: Page view data should be limited to when user made their first edit, which is back in ready for dev and marked high priority.

(2) The change in the tooltip display

production wmf.10betlabs
Screen Shot 2022-11-28 at 5.51.46 PM.png (846×860 px, 89 KB)
Screen Shot 2022-11-28 at 6.14.40 PM.png (972×1 px, 148 KB)

It's tracked in T322841#8428315, let's follow-up on that one there.

Thx, @kostajh! Marking this task as Resolved - T323253 and T322841 cover issues that are outside of the scope of this task.