DemocracyLab / DemocracyLab/CivicTechExchange
Feature: Remove Project from Group
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
This feature allows for group owners to manage the projects associated with their group, specifically removing projects from a group. This will be accessible both from an individual project page and from a new Participating Projects page.
## Requirements
The design specification and functional requirements are at [this figma link](https://www.figma.com/file/WADcmVjJh5ARVoZ09xlpfdFN/DemocracyLab?type=design&node-id=54549-160595&mode=design&t=mEoCtYk2rfE1kpn5-4) which has wireflows, mockups, and a final design. However, to summarize:
- create a new Participating Projects page for each group, which should resolve at /groups/manage/_groupID_ (this matches the schema for editing or creating a group) -- this will be very similar to the "My Projects" page, except for a group instead of an individual.
- conditional rendering of buttons for group owners (don't let non-owners see or take these actions) on My Groups and individual project pages, which take you to the new Participating Projects page. See various uses of `isOwner`. Note the tricky bit will be a _group_ owner being able to see this button on project pages they don't own.
- Specifically, a group owner, group co-owner, or site admins should be able to see these buttons / take these actions on the appropriate pages.
- on remove, a message modal allowing a group owner to explain why they're removing a project followed by a removal confirmation modal, like [ConfirmationModal.jsx](https://github.com/DemocracyLab/CivicTechExchange/blob/99b12aa7c9c7765ab6384a82f91b4fd17c85c47e/common/components/common/confirmation/ConfirmationModal.jsx)
- create a deletion API function and on confirmation in the step above, submit an api request to remove the project from the group, perform any needed recaching (in [GroupAPIUtils](https://github.com/DemocracyLab/CivicTechExchange/blob/99b12aa7c9c7765ab6384a82f91b4fd17c85c47e/common/components/utils/GroupAPIUtils.js))
- After the project has been removed from the group, send an email using the message information collected in the modal above using the dlab email template in [emails.py](https://github.com/DemocracyLab/CivicTechExchange/blob/99b12aa7c9c7765ab6384a82f91b4fd17c85c47e/democracylab/emails.py)
Aside from creating a new page, all of these other items are things dlab does elsewhere on the site/in the code. Hopefully extending or adapting those features is straightforward. If not, please reach out for assistance and I'll try to point you in the right direction.
## Style information
The style information shown in the figma document is from the [DemocracyLab Design System](https://www.figma.com/file/3s8fFwU3Eddpmwn3boWTeY/DemocracyLab-Design-System-and-UI-Kit?node-id=121%3A80). It should be as simple as using the correct HTML tags and style is applied. However, the DS implementation on the live site is _not_ complete, so you may run into inconsistencies. If you do, please make note of them so we can get them fixed in a future issue. Fonts and buttons should be correct, but other elements may not be.
For buttons, use these variant names:
- Primary Button: `variant="primary"`
- Secondary Button: `variant="outline-secondary"`
- Tertiary Button: `variant="ghost"`
- Destructive Button: `variant="outline-destructive"`
### Questions?
If you have questions or need clarification, please post in `#f-removing_project_from_group` on our slack. The designers of this feature and I are in there, and we'll all be able to see and respond to questions so everyone can stay informed.
Contributor guide
Assessment
This issue has not been assessed yet.