Project

General

Profile

Actions

Feature #15700

closed

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

Added by Raymond Hoh over 2 years ago. Updated over 2 years ago.

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

0%

Estimated time:
Deployment actions:

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 sitesResolvedRaymond Hoh2017-06-19

Actions
Actions #1

Updated by Raymond Hoh over 2 years ago

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

Updated by Boone Gorges over 2 years 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.

Actions #3

Updated by Raymond Hoh over 2 years 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.

Actions #4

Updated by Boone Gorges over 2 years ago

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

Actions #5

Updated by Colin McDonald over 2 years 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.

Actions #6

Updated by Raymond Hoh over 2 years 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.

Actions #7

Updated by Colin McDonald over 2 years ago

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

Actions #8

Updated by Boone Gorges over 2 years ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF