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

Change interaction UI for adding users when creating streams #29825

Closed
timabbott opened this issue Apr 23, 2024 · 3 comments · Fixed by #30610
Closed

Change interaction UI for adding users when creating streams #29825

timabbott opened this issue Apr 23, 2024 · 3 comments · Fixed by #30610

Comments

@timabbott
Copy link
Sponsor Member

timabbott commented Apr 23, 2024

Problem statement:

During onboarding or when creating a new channel, admin tries to add users to a new channel through the pills typeahead. But sometimes, they may click the create button without clicking the add button and assume that the people that they selected through the typeahead were already added. This leads to confusion in the future, when it turns out that those users weren't added.

Concepts:

  • Input pills are the source of truth on which users are to be added.
  • Subscriber list is a preview of this input, that will show them what it might look like once the channel has been created.

Expected behaviour:

Typeahead behaviour

  • We will not explode pills once the user selects a group or channel from the typeahead.
  • All individual users after selecting a group from the typeahead will be added to the subscriber list below along with a remove button in their respective row.
  • The current behaviour is that if a group consisting of Iago and Aaron is added to the input box, we will still display Iago as an option. This behaviour will not change.

Clicking on the remove button:

  • Clicking on the remove button will have no effect on the pills.
  • If Iago was added individually through a pill, and the admin clicks on remove in the subscriber list. A strikethrough will appear through the row. We will also toggle the remove button to the Add button. The input pill will remain unchanged. Discussion on how to display the strike through is in a different message.
  • If Aaron was added to the subscriber list via a group. A strikethrough will appear through the row. We will also toggle the remove button to the Add button. The input pill will remain unchanged. We will strike out both pill text and email text. See Option 2.png
  • Even if Remove button has been clicked for all the users from the above group addition, we will not remove the pill.
  • Once the user clicks on Create button to create the channel, all the strikethrough-ed users will not be part of the user id array being sent to create the channel.

Pills behaviour:

  • Adding a pill will add a row to the subscriber list or multiple rows if it's a group or channel.
  • Removing a pill will disappear its row(s) from the subscriber list, without any strikethroughs or intermediate states.
  • There will no more add button for the input box, selecting a pill in the typeahead will auto add it.

General:

  • All the state of the actions above will be preserved if the user goes back and forth between naming the channel and adding the subscribers as it does right now.
  • Clicking on cancel will get rid of the state.
  • Add all users behaviour will remain unchanged

CZO thread

@zulipbot
Copy link
Member

Hello @zulip/server-onboarding, @zulip/server-streams members, this issue was labeled with the "area: onboarding", "area: stream settings" labels, so you may want to check it out!

@alya
Copy link
Contributor

alya commented Apr 23, 2024

The current plan is to sequence this after the part that's still in #29403.

@shubham-padia
Copy link
Member

Asked some clarifying questions here: CZO thread

shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Clicking remove in the subscriber list table should strikethrough
according to the new behaviour but we will do that in the next
commit.
One additional detail to the specs described in zulip#29825 is that we
will not have a pill for the current user. Discussion can be found
here: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Disabled.2Fun-editable.20input.20pill/near/1838691
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 27, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 28, 2024
Clicking remove in the subscriber list table should strikethrough
according to the new behaviour but we will do that in the next
commit.
One additional detail to the specs described in zulip#29825 is that we
will not have a pill for the current user. Discussion can be found
here: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Disabled.2Fun-editable.20input.20pill/near/1838691
shubham-padia added a commit to shubham-padia/zulip that referenced this issue Jun 28, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
timabbott pushed a commit that referenced this issue Jun 28, 2024
Clicking remove in the subscriber list table should strikethrough
according to the new behaviour but we will do that in the next
commit.
One additional detail to the specs described in #29825 is that we
will not have a pill for the current user. Discussion can be found
here: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Disabled.2Fun-editable.20input.20pill/near/1838691
shubhiscoding pushed a commit to shubhiscoding/zulip that referenced this issue Jul 15, 2024
Clicking remove in the subscriber list table should strikethrough
according to the new behaviour but we will do that in the next
commit.
One additional detail to the specs described in zulip#29825 is that we
will not have a pill for the current user. Discussion can be found
here: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Disabled.2Fun-editable.20input.20pill/near/1838691
shubhiscoding pushed a commit to shubhiscoding/zulip that referenced this issue Jul 15, 2024
Fixes zulip#29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants