Page MenuHomePhabricator

Dashboard module: Active discussions
Closed, ResolvedPublic5 Estimated Story Points

Description

User story: As a moderator, I want to learn about active discussions about the policies and guidelines on my project, so that I can stay up to date and engage in conversation.

Designs

Desktop

Active discussions.png (406×743 px, 39 KB)

Mobile

Active Discussions.png (880×375 px, 46 KB)

Mobile - mobile AD popup.png (600×375 px, 42 KB)

Description
In T402822: [SPIKE] How can we use DiscussionTools to retrieve the most active discussions on certain noticeboards? [8H] we investigated the technical approach for this task, and improvements were made to DiscussionTools to help us in T405056: Add latest comment timestamp, number of comments, and number of editors in Discussion Tools API.

While we might imagining defining these in Community Configuration in the future, for now we can start with the following noticeboards for our pilot wikis:

This module has been soft-launched behind a URL parameter. If you add ?personaldashboard_activediscussions_show=true, then the module will show up.

Acceptance criteria

  • Given one or more predetermined discussion pages, list 3 discussions that have more than one participant
  • Sort discussions by most recent activity (the 3 discussions should be the ones with most recent comments)
  • Discussion cards should list:
    • The noticeboard name
    • The discussion title
    • The number of comments
    • The number of participants
    • The time since the latest comment (in the same way that DiscussionTools lists this in the discussion itself)
  • At the top of the module, there should be the following text:
    • Stay up to date with the latest discussions and join the conversation with other Wikipedia editors.
  • Clicking a discussion entry should open the discussion in a new tab
  • Clicking the latest comment timestamp links should open the latest comment from that discussion
  • Each discussion should only be displayed once in the module, but many discussions can be listed from the same page.
  • Page titles should have wikitext parse but formatting stripped, as we did for Review changes (T416314)

See also:

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Tagging DT for information, since we're going to use the API here.

Samwalton9-WMF set the point value for this task to 5.Feb 3 2026, 3:38 PM
Samwalton9-WMF moved this task from To be estimated to Estimated on the Moderator-Tools-Team board.

If you want to use the DT API for something like this, we might want to prioritize T416038 (patch) to give you an overview API, rather than making you basically fetch the full text of each discussion page to dig through it.

Scardenasmolinar changed the task status from Open to In Progress.Feb 5 2026, 7:13 PM
Scardenasmolinar claimed this task.
Scardenasmolinar moved this task from Ready to In Progress on the Moderator-Tools-Team (Kanban) board.

@DLynch, this would be ideal for this module! I have just started working on this and can focus on the UI side while we wait for T416038: Provide an API for basic data about a talk page to be merged.

Change #1239277 had a related patch set uploaded (by Scardenasmolinar; author: Scardenasmolinar):

[mediawiki/extensions/PersonalDashboard@master] Create Active Discussions module

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

@Samwalton9-WMF on the mobile view: do we need the "view more things" button at the bottom that links to the same view as clicking anywhere in the module?

@Scardenasmolinar The footer button is showing a placeholder message in my local environment. It seems like the message key wasn't added to the messages array in extension.json. Perhaps i18n/ext.personalDashboard.activeDiscussions.mobile could be merged into i18n/ext.personalDashboard.activeDiscussions since there is no longer a resources/ext.personalDashboard.activeDiscussions.mobile directory?

SCR-20260303-njnl-2.png (1×744 px, 89 KB)

@Scardenasmolinar The footer button is showing a placeholder message in my local environment. It seems like the message key wasn't added to the messages array in extension.json. Perhaps i18n/ext.personalDashboard.activeDiscussions.mobile could be merged into i18n/ext.personalDashboard.activeDiscussions since there is no longer a resources/ext.personalDashboard.activeDiscussions.mobile directory?

SCR-20260303-njnl-2.png (1×744 px, 89 KB)

I noticed that and almost have a patch to fix this.

That error has been fixed, and everything seems to be working fine, but I am getting a console error on the mobile version:

Screenshot 2026-03-03 at 19.31.41.png (115×1 px, 42 KB)

Not sure why this is happening. Maybe a race condition?

Test wiki created on Patch demo by SCardenas (WMF) using patch(es) linked to this task:
https://48fca55624.catalyst.wmcloud.org/w/

Test wiki on Patch demo by SCardenas (WMF) using patch(es) linked to this task was deleted:

https://48fca55624.catalyst.wmcloud.org/w/

Kgraessle subscribed.

Minor design fixes:

Desktop:

Screenshot 2026-03-04 at 11.05.41 AM.png (224×866 px, 30 KB)

In the figma it looks like the person icon and the discussion bubble icon are aligned on the right side. Also I think the page title text should have less padding on top.

Mobile:

Screenshot 2026-03-04 at 11.21.09 AM.png (713×419 px, 42 KB)

It looks like we're missing the subheader text here, also the icons should wrap to a new row in the mobile design.

Mobile Summary:
We should probably also limit the amount of text that shows up here:

Screenshot 2026-03-04 at 11.19.29 AM.png (290×1 px, 66 KB)

All views:
Timestamp of active discussion is underlined.

It looks like we're missing the subheader text here, also the icons should wrap to a new row in the mobile design.

I know it's part of the design, but it's not showing in the Recent Activity or the Policies module either. Maybe this is a bug?

Other than that, I think I addressed most of the bugs, with the exception of the icons wrapping:

Screenshot 2026-03-04 at 21.06.42.png (159×1 px, 26 KB)

Test wiki created on Patch demo by Samwalton9 (WMF) using patch(es) linked to this task:
https://35d4e842e6.catalyst.wmcloud.org/w/

Thanks for fixing the above issues, it's looking really great!
I did notice a few more design changes upon second review:

It looks like the timestamp formatting is the same as Recent Activity module and not the discussion tools formatting:

Current format:

Screenshot 2026-03-06 at 10.32.34 AM.png (188×857 px, 22 KB)

Desired format (maybe?) @Samwalton9-WMF :

Screenshot 2026-03-06 at 10.32.28 AM.png (98×577 px, 15 KB)

The other thing I noticed is that the border around the cards in figma is more like the Policy Module (e.g: the border edges are around the entire card vs missing left/right borders).

Screenshot 2026-03-06 at 11.09.39 AM.png (423×901 px, 49 KB)

Screenshot 2026-03-06 at 11.09.44 AM.png (671×471 px, 77 KB)

Regarding timestamps, in the design mockups I used the format that DiscussionTools uses in its section subheadings:

Screenshot 2026-03-06 at 12.41.50.png (118×1 px, 31 KB)

Is it possible to copy the logic to display e.g. "4 minutes ago" instead of a specific time/day?

I don't mind punting this to a follow-up ticket.

The other thing I noticed is that the border around the cards in figma is more like the Policy Module (e.g: the border edges are around the entire card vs missing left/right borders).

@Samwalton9-WMF, before making this change, I want to make sure if I should. I ask because the design resembles the Policies module, but the Policies module rows are not clickable. The behavior is the same as the Risky Edits module, which doesn't have side borders per row. Should I add them?

I don't have strong opinions on this but I can see the argument for having the same design as the Review Changes module, let's do it!

Test wiki created on Patch demo by SCardenas (WMF) using patch(es) linked to this task:
https://a1d0f1093a.catalyst.wmcloud.org/w/

Hi,
It looks like the icons are not aligning to the right and there's some extra spacing between them as well.
Attaching screenshots:

Mobile:

Screenshot 2026-03-12 at 11.36.04 AM.png (432×1 px, 57 KB)

Desktop:

Screenshot 2026-03-12 at 11.34.39 AM.png (398×1 px, 51 KB)

That's weird. I think that was from one patch that was out of date because this is what I'm seeing with my latest version:

Screenshot 2026-03-12 at 13.30.13.png (434×703 px, 49 KB)

That's weird. I think that was from one patch that was out of date because this is what I'm seeing with my latest version:

Screenshot 2026-03-12 at 13.30.13.png (434×703 px, 49 KB)

Oh strange, it looks great now.

I did notice one small thing in that screenshot you posted above, the list card border goes all the way to the right which is different from Review Changes module.

Other than that I'm good to +2 this once we've chatted about feature flag strategy for rolling out new modules. Thanks for all your work on this module.

I have added a feature flag to soft-launch this module. If you add personaldashboard_activediscussions_show=true as a URL parameter, then the module will show up.

Hi, a few styling things I noticed.

In the mobile summary view there's some extra padding above the Active Discussions module.
Also, it looks like the risky article edits card has a border around it now, I fixed this locally by updating the .cdx-card selector in the ListCardMobile.vue, do you mind adding this to your patch before we merge it?

Screenshot 2026-03-17 at 11.15.38 AM.png (762×1 px, 74 KB)

.cdx-card.ext-personal-dashboard-moderation-card-mobile-summary {
	border: unset;
	border-bottom: unset;

	&.cdx-card {
		padding: 0 0 1rem 0;
	}

	&:hover {
		background-color: unset;
	}

	&.cdx-button {
		font-size: @font-size-medium;
	}
}

Also the border on the list card for active discussions goes all the way to the right:

Screenshot 2026-03-17 at 11.56.40 AM.png (452×1 px, 53 KB)

Hi, a few styling things I noticed.

In the mobile summary view there's some extra padding above the Active Discussions module.
Also, it looks like the risky article edits card has a border around it now, I fixed this locally by updating the .cdx-card selector in the ListCardMobile.vue, do you mind adding this to your patch before we merge it?

Screenshot 2026-03-17 at 11.15.38 AM.png (762×1 px, 74 KB)

.cdx-card.ext-personal-dashboard-moderation-card-mobile-summary {
	border: unset;
	border-bottom: unset;

	&.cdx-card {
		padding: 0 0 1rem 0;
	}

	&:hover {
		background-color: unset;
	}

	&.cdx-button {
		font-size: @font-size-medium;
	}
}

Also the border on the list card for active discussions goes all the way to the right:

Screenshot 2026-03-17 at 11.56.40 AM.png (452×1 px, 53 KB)

Done! Thanks for catching that!

Change #1239277 merged by jenkins-bot:

[mediawiki/extensions/PersonalDashboard@master] Create Active Discussions module

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

Change #1255967 had a related patch set uploaded (by Scardenasmolinar; author: Scardenasmolinar):

[mediawiki/extensions/PersonalDashboard@master] Change wgPersonalDashboardActiveDiscussionsPages from key-value to array

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

Change #1255967 had a related patch set uploaded (by Scardenasmolinar; author: Scardenasmolinar):

[mediawiki/extensions/PersonalDashboard@master] Change wgPersonalDashboardActiveDiscussionsPages from key-value to array

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

Change #1255967 merged by jenkins-bot:

[mediawiki/extensions/PersonalDashboard@master] Change wgPersonalDashboardActiveDiscussionsPages from key-value to array

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

jsn.sherman moved this task from QA to Done on the Moderator-Tools-Team (Kanban) board.