Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend: enable users to create restricted and open groups #8898

Open
12 tasks
seanh opened this issue Aug 23, 2024 · 1 comment
Open
12 tasks

Frontend: enable users to create restricted and open groups #8898

seanh opened this issue Aug 23, 2024 · 1 comment
Assignees

Comments

@seanh
Copy link
Contributor

seanh commented Aug 23, 2024

Implement the frontend (user interface and API call) to enable users to create restricted and open groups and to change the types of existing groups between private, restricted and open.

Part of ERD: Creating Restricted and Open Groups.

Depends on the backend API: #8896

Create group page

Here's the desired new design for the create-group page:

Image

Changes:

  • The title of the Create a new private group page should be changed to Create a new group
  • The tab title (<title> element in the HTML <head>) should be changed to Create a new group
  • The labels Name, Description and Group type should be bolded
  • The three group-type radio boxes must be added

Edit group page

Here's the desired new design for the edit-group page:

Image

Changes:

  • The labels Name, Description and Group type should be bolded
  • The three group-type radio boxes must be added

API call

Warning when changing the type of an existing group

When an existing private group is changed to open/restricted or vice-versa this changes the visibility of any pre-existing shared annotations in the group: annotations that were previously only visible to members of the group will now be publicly visible or vice-versa. We want to show the user a warning before letting them do this.

  • The warning dialog should appear when the user changes the selected radio box (not when they click the Save changes button)
  • The warning dialog will be shown when changing a group's type from private to open or restricted or from open or restricted to private
  • No warning needs to be shown when changing a restricted group to open or vice-versa because this doesn't change the visibility of annotations
  • No warning needs to be shown if the group doesn't contain any shared annotations, regardless of the old and new group types. (This includes if the group only contains private a.k.a "only me" annotations: no warning needs to be shown.)
  • No warning should ever be shown when creating a new group, even if changing the selected radio box back-and-forth, only when editing an existing group and changing its type.

Design for the warning dialog (note: not the final wording):
image

Final wording (see Slack thread):

Make 100 annotations public?

Are you sure you want to make "My Group" an open group? 100 annotations that are visible only to members of My Group will become publicly visible.

Alternative text when changing an open or restricted group to private:

Make 100 annotations private?

Are you sure you want to make "My Group" a private group? 100 annotations that are publicly visible will become only visible to members of My Group.

seanh added a commit that referenced this issue Aug 29, 2024
Add the group's type to the `js-config` on the group-edit page. The
frontend is going to need this for #8898.
seanh added a commit that referenced this issue Aug 29, 2024
Add the group's type to the `js-config` on the group-edit page. The
frontend is going to need this for #8898.
@seanh seanh assigned robertknight and unassigned acelaya Sep 6, 2024
@seanh
Copy link
Contributor Author

seanh commented Sep 6, 2024

I've added the type of the existing group to the js-config on the group-edit page so the frontend can know which radio box should be selected initially: #8911

Also added the number of shared annotations and replies in the group, which'll be needed for the warning dialog: #8939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants