Project

General

Profile

Feature #15700

Add leave site functionality to "Dashboard > My Sites" in admin area

Added by Raymond Hoh 3 months ago. Updated about 1 month ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress (misc)
Target version:
Start date:
2022-03-22
Due date:
% Done:

0%

Estimated time:

Description

In #8292, we implemented a "Leave site" feature when you're on your profile's "My Sites" page.

This ticket is to supplement (or supplant) this functionality with another way to leave sites. WordPress already has an internal page that shows which sites you are a member of on the "Dashboard > My Sites" page in the admin area.

We can add some functionality to this page to leave selected sites. Here's an implementation I did for another project:

The notable changes are:
- Adding a "Leave" checkbox. This checkbox only displays if you are not an administrator of the site
- Adding a line to display your role(s) for each site if you are not an administrator of the site

The Commons has a few things we have to keep into consideration such as ensuring the Membership Removal site option is respected (see https://redmine.gc.cuny.edu/issues/8292#note-11), but this should be trivial to add.

Let me know if anyone has any questions or things we need to think about before implementing this.


Related issues

Related to CUNY Academic Commons - Feature #8292: Users should be able to remove themselves from multi-author sitesResolved2017-06-19

History

#1 Updated by Raymond Hoh 3 months ago

  • Related to Feature #8292: Users should be able to remove themselves from multi-author sites added

#2 Updated by Boone Gorges 3 months ago

Adding this feature to My Sites seems like a good idea to me.

What is the purpose of the checkbox? Bulk actions, I guess? To me, this does not seem super important - single Leave links would be enough. But if it's already there, I guess it doesn't hurt to leave it.

Is there any kind of modal or interstitial warning about leaving the site? This feels especially important if 'Leave' is an action link that doesn't require the 'Save Changes' button to be clicked.

#3 Updated by Raymond Hoh 3 months ago

What is the purpose of the checkbox? Bulk actions, I guess?

Yes, it's for leaving sites in bulk.

Is there any kind of modal or interstitial warning about leaving the site? This feels especially important if 'Leave' is an action link that doesn't require the 'Save Changes' button to be clicked.

"Leave" is not an action link; it's a label for the checkbox, so there was not a need for a modal or interstitial.

#4 Updated by Boone Gorges 3 months ago

Cool. I think that's OK as long as everyone else is good with it.

#5 Updated by Colin McDonald 3 months ago

Sounds good to me - so if I check the Leave box in a few places, will there be a more universal Leave button that appears, or will clicking any Leave item then register it for all of the places I checked? Sorry if I'm missing something, and adding Sara as a watcher here too.

#6 Updated by Raymond Hoh 3 months ago

  • Status changed from New to Staged for Production Release

The "Leave" checkbox is now added to the "Dashboard > My Sites" page and is available for testing on cdev: https://github.com/cuny-academic-commons/cac/commit/85df6de2036f96047c9073a88e950e3e3c6fca2b

Sounds good to me - so if I check the Leave box in a few places, will there be a more universal Leave button that appears, or will clicking any Leave item then register it for all of the places I checked?

Sorry for not replying to this earlier, Colin. I believe we covered it on the call, but anyway, it's the latter. When the "Leave" checkboxes are ticked, you have to click on the "Save Changes" button to actually leave those specific sites. There is no additional confirmation at the moment.

If the "Leave" text is not clear enough, we could change that to something else. If the lack of confirmation is an issue, we could add an interstitual or simple javascript prompt before the submission occurs as well.

#7 Updated by Colin McDonald 2 months ago

Thanks Ray, I think this makes sense, and we'll give it a more thorough look in testing soon.

#8 Updated by Boone Gorges about 1 month ago

  • Status changed from Staged for Production Release to Resolved

Also available in: Atom PDF