Skip to content

Add "Join room" and "Sign in to start talking" buttons to thread message panel

Tomas Vik requested to merge 2424-add-sign-in-or-join-button into develop

Closes #2424 (closed)

Testing was blocked by https://dev.gitlab.org/gitlab/gitter/webapp/merge_requests/48 but now merged

This MR substitutes the chat message input with three different states based on the user who's looking at the thread message feed:

User The thread input replacement
Logged in user who can join the room Screenshot_2020-01-21_at_8.16.54_PM
Logged in user who can't join the room Screenshot_2020-01-21_at_8.16.29_PM
Not logged in user Screenshot_2020-01-21_at_8.17.10_PM

Reflecting the join request in the component

Kapture_2020-01-24_at_12.54.05

Testing strategy

  • have three rooms with threaded conversations enabled
    • normal public room without a welcome message
    • normal public room with a welcome message
    • GitHub public room that has the "Only GitHub users are allowed to join this room." option enabled
  • all the testing is in an open thread in the given room, never in the main message feed
  • when the user can join
    • joining a room with welcome message shows the welcome message
    • joining the room without the welcome message is immediate (no welcome message is shown)
  • when user can't join
    • visiting the GitHub only room using a GitLab user results in "Only GitHub users can join this room" message
    • have a member of the room mention the user who can't join by sending message to the forbidden room @<testUser>_gitlab (the detailed explanation why we have to test this is here: https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1742#note_276481842)
      • validate that when the GitLab user is online, they can see the correct message
      • validate taht when the GitLab user opens the website after they were mentioned, they can see the correct message
  • not logged in user
    • user will see a button "Sign in to start talking"
Edited by 🤖 GitLab Bot 🤖

Merge request reports