WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 6 days ago

#44000 new enhancement

Add notification bubble to Tools menu for GDPR export/erase requests

Reported by: scott.deluzio Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Privacy Keywords: has-patch gdpr
Focuses: Cc:

Description

Currently, when a user has confirmed their GDPR export or erase request the site admin does not receive a notification or any visual indication that the request has been confirmed. Outside of visiting the Export/Erase pages they will have no way of knowing whether or not the request has been confirmed. I'm suggesting a notification bubble (similar to when there are comments or plugin updates available) that will indicate the total number of export and erase requests that have been confirmed.

Attachments (7)

44000.patch (2.1 KB) - added by scott.deluzio 3 weeks ago.
Adds notification bubble to Tools menu for GDPR export/erase confirmations
remove-export-requests-with-44000.patch.jpg (26.7 KB) - added by birgire 3 weeks ago.
44000.2.diff (2.3 KB) - added by birgire 3 weeks ago.
tools-bubble-count.jpg (11.4 KB) - added by birgire 3 weeks ago.
44000.3.diff (1.7 KB) - added by birgire 2 weeks ago.
44000.4.diff (3.9 KB) - added by birgire 2 weeks ago.
tools-submenu-bubbles.JPG (14.3 KB) - added by birgire 2 weeks ago.

Download all attachments as: .zip

Change History (17)

@scott.deluzio
3 weeks ago

Adds notification bubble to Tools menu for GDPR export/erase confirmations

#1 @scott.deluzio
3 weeks ago

  • Keywords gdpr added

#2 @birgire
3 weeks ago

@scott.deluzio thanks for the patch.

I tested 44000.patch but got three notices when I deleted requests.

See remove-export-requests-with-44000.patch.jpg.

Last edited 3 weeks ago by birgire (previous) (diff)

@birgire
3 weeks ago

#3 @birgire
3 weeks ago

44000.2.diff is a suggestion that uses the wp_count_user_requests() function approach in #44034. The patch there would need to be applied here as well to test.

This counts the confirmed user requests for both export and erase, adds them together and displays a bubble count next to the Tools menu. See tools-bubble-count.jpg.

It also checks for the erase_others_personal_data and erase_others_personal_data capabilities, before displaying the bubble count.

So this approach can handle the case if user has e.g. erase_others_personal_data but not export_others_personal_data, so it would only display the bubble count for confirmed erase requests.

Further adjustments would be to add bubble counts to the sub-menus.

Last edited 3 weeks ago by birgire (previous) (diff)

#4 @birgire
2 weeks ago

44000.3.diff takes a similar approach as #43954 (43954.2.diff) and adds the Tools bubble directly into the wp-admin/menu.php file, instead of using a filter. It also re-uses the .plugin-count and .plugin-updates CSS classes as well.

I don't think we can add the submenus directly to the wp-admin/menu.php file as well, because we don't have specific submenu files, to use the in the $submenu['tools.php'] array. So we could look further into what's the best way to add bubbles to the submenus here.

ps: We array cast the counting object, in 44000.2.diff and 44000.3.diff, since it seems problematic to do $obj->request-confirmed with a dash in the property name.

Last edited 2 weeks ago by birgire (previous) (diff)

@birgire
2 weeks ago

@birgire
2 weeks ago

#5 @birgire
2 weeks ago

44000.4.diff adds the bubble count to the corresponding submenus of the Tools menu, but there's not enough space for it, as we can see in tools-submenu-bubbles.JPG.

#6 @scott.deluzio
2 weeks ago

@birgire thanks for the feedback/updates on this. Regarding the issue you pointed out in 44000.4.diff with there not being enough space for the bubble. Could that be resolved by a float:left; style on the bubble? The bubbles would then be on the correct line, and the text would then wrap to a new line.

Alternatively, renaming the submenus to shorter names would fix this issue. Something like Export PII, and Erase PII, perhaps?

This ticket was mentioned in Slack in #gdpr-compliance by scottdeluzio. View the logs.


2 weeks ago

#8 follow-up: @birgire
2 weeks ago

@scott.deluzio, thanks for the feedback

Hopefully there are some workarounds to avoid two lines per menu item

but I don't see an obvious solution at the moment.

I fear that renaming the menu items would be hard, but that would solve the problem :)

What does PII stand for?

I also played with the width of the menu wrap wider to see the effect on the "Export Personal Data" item:

178px (allows 4 digits)
174px (allows 3 digits)
169px (allows 2 digits)
160px (allows no digit)

but the 160px width is most likely not going to be changed.

#9 @desrosj
11 days ago

  • Component changed from General to Privacy

Moving to the new Privacy component.

#10 in reply to: ↑ 8 @scott.deluzio
6 days ago

Replying to birgire:

What does PII stand for?

PII stands for Personally Identifiable Information. However, with your comment I realize that is not obvious to everyone, and isn't likely to translate well either so perhaps that isn't the best idea.

Note: See TracTickets for help on using tickets.