Page MenuHomePhabricator

Coordination with UserInfoCard work
Closed, ResolvedPublic

Description

Hi @TheDJ, @Enterprisey and @Nakon (tagging you three as you're listed as members of Navigation-Popups-Gadget )

I'm filing this task to give a heads-up about the work that Trust and Safety Product Team is doing as part of WE4.2 Anti-abuse, to build T384725: [Epic] WE4.2.18 UserInfoCard experiment for assisting patrollers and moderators. There's a certain amount of overlap between what navigation popups provides when hovering over user links, and what we intend to build with the UserInfoCard. A couple of differences:

  • We're building the UserInfoCard into an extension (CheckUser for now, perhaps split to another one later). This makes our code discoverable via codesearch, allows us access to testing frameworks and linters, and makes it easier for other extensions to extend the feature.
  • We'll be computing most of the data server side with a single API request to fetch data, for performance purposes
  • We intend to make this tool available to logged-in users by default, with an opt-out option
  • Our tool requires pressing a button instead of using mouse over, so it can work on mobile/desktop, and so we can understand usage more clearly

Our tool won't interfere with how Navigation Popups functions on user pages, but eventually we should figure out what would make sense to move into the UserInfoCard and what to retain in the Gadget. We intend to make the UserInfoCard extensible, so perhaps the code in the Navigation Popups gadget could eventually extend the UserInfoCard to provide additional data / functionality we aren't including in our initial version. Your thoughts and suggestions are very welcome. Thanks!

Event Timeline

I've spent a fair bit of time not trying to rewrite Navigation-Popups-Gadget. I'm unsure why this effort is spent building a new <UserInfoCard> component instead of spending the time making Reference previews, article previews, and the like user/script extensible and then building this feature on top of them ?

As it currently stands there are at least two other features (referenced above) that duplicate a portion of Navigation popups functionality. While navpopups is in sore need of a rewrite and would benefit from having a modern frontend similar to the one you describe here, I don't see having a monkey patch three different solutions as being a particularly good outcome.

Thanks for your feedback, @Soda.

I'm unsure why this effort is spent building a new <UserInfoCard> component instead of spending the time making Reference previews, article previews, and the like user/script extensible and then building this feature on top of them ?

In my opinion, building the user info card in an extension will be more effective over a user script or gadget, from the point of view of stability, performance, discoverability, development velocity, and maintainability. I understand where you are coming from, and hope you can see my point of view on this as well.

Thanks for your feedback, @Soda.

I'm unsure why this effort is spent building a new <UserInfoCard> component instead of spending the time making Reference previews, article previews, and the like user/script extensible and then building this feature on top of them ?

In my opinion, building the user info card in an extension will be more effective over a user script or gadget, from the point of view of stability, performance, discoverability, development velocity, and maintainability. I understand where you are coming from, and hope you can see my point of view on this as well.

I am not asking you to implement a user script or a gadget here. I think that is a misunderstanding.

As it currently stands the Popups extension provides two of the pieces of functionality (article previews/reference previews) that currently replicate NavigationPopups (the gadget).

I am surprised that you are not building this functionality into that extension (the popups extension) (which should already have some of the necessary building blocks) but are instead dedicating time to doing this in a completely separate extension. I feel like if y'all are going to make this feature user-extensible, y'all should do it in the popups extension since that would allow the user-extensibility part of the project to also benefit article and reference previews ? (both of which NavigationPopups would benefit from extending as well).

Thanks for your feedback, @Soda.

I'm unsure why this effort is spent building a new <UserInfoCard> component instead of spending the time making Reference previews, article previews, and the like user/script extensible and then building this feature on top of them ?

In my opinion, building the user info card in an extension will be more effective over a user script or gadget, from the point of view of stability, performance, discoverability, development velocity, and maintainability. I understand where you are coming from, and hope you can see my point of view on this as well.

I am not asking you to implement a user script or a gadget here. I think that is a misunderstanding.

As it currently stands the Popups extension provides two of the pieces of functionality (article previews/reference previews) that currently replicate NavigationPopups (the gadget).

I am surprised that you are not building this functionality into that extension (the popups extension) (which should already have some of the necessary building blocks) but are instead dedicating time to doing this in a completely separate extension. I feel like if y'all are going to make this feature user-extensible, y'all should do it in the popups extension since that would allow the user-extensibility part of the project to also benefit article and reference previews ? (both of which NavigationPopups would benefit from extending as well).

Sorry, I had completely misunderstood. Yes, building in Page-Previews extension makes sense, although I'm asking the Web team if this is OK with them, as they're the maintainers.

Sorry, I had completely misunderstood. Yes, building in Page-Previews extension makes sense, although I'm asking the Web team if this is OK with them, as they're the maintainers.

I spoke a bit with Web team folks, and... it's complicated, both from a code and social / stewardship perspective. I think in the short term, we'll continue building this feature in Extension:CheckUser (frontend, API) and Extension:GrowthExperiments (data store used with GrowthExperiments-ImpactModule). If the feature is successful, we could split the feature out into its own extension (Extension:UserInfoCard), or have another conversation about Page-Previews and its scope, and how this feature could co-exist with other code there.

I have no opinion on this as long as not both are triggered at the same time (popups/preview extension should have the code for something like that)

Change #1129953 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/CheckUser@master] POC: Custom preview

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

I have no opinion on this as long as not both are triggered at the same time (popups/preview extension should have the code for something like that)

Provided the links do not have a data-title attribute it should be impossible for the two to clash.

For completeness I made a proof of concept (For patch demo purposes) to show what this would look like.

I imagine it would require some updates in page previews:

  • To support stickiness (e.g. the close button rather than show/hide on hover)
  • The ability to support rendering of Vue components. You could create an extract with an element with an ID and then mount a Vue app on it, but that's not been done before. https://gerrit.wikimedia.org/r/1129953
  • It would require some design input for disabling which currently are reader-focused.

Change #1129953 abandoned by Jdlrobson:

[mediawiki/extensions/CheckUser@master] POC: Custom preview

Reason:

demo purposes only

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

Sorry, I had completely misunderstood. Yes, building in Page-Previews extension makes sense, although I'm asking the Web team if this is OK with them, as they're the maintainers.

I spoke a bit with Web team folks, and... it's complicated, both from a code and social / stewardship perspective. I think in the short term, we'll continue building this feature in Extension:CheckUser (frontend, API) and Extension:GrowthExperiments (data store used with GrowthExperiments-ImpactModule). If the feature is successful, we could split the feature out into its own extension (Extension:UserInfoCard), or have another conversation about Page-Previews and its scope, and how this feature could co-exist with other code there.

As mentioned above, we decided not to go with reusing Page Previews. I'm resolving this task, but please reopen if there is more to discuss. Our rollout plan is being worked on in T386439: UserInfoCard: Rollout and metrics monitoring

kostajh claimed this task.