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

Move room moderation actions to a menu #2123

Merged
merged 9 commits into from
Aug 28, 2019

Conversation

danxuliu
Copy link
Member

Draft until #2122 is merged (first commit of this pull request is Move checkbox to change between public and group room to a menu)

This pull request provides the groundwork needed to set the lobby state in the UI using a menu

@nickvergessen
Copy link
Member

Do not defer rendering CallInfoView again until the menu is inactive

That breaks exactly what it was protecting against:

  1. As moderator 1 open the password field and start typing
  2. As moderator 2 change the name of the conversation
  3. As moderator 1 cry because the sidebar refreshed and the password you typed is gone again...

@danxuliu
Copy link
Member Author

That breaks exactly what it was protecting against

No, it does not for two reasons:

  • As explained in the commit message renderWhenInactive was already broken for Nextcloud 17.
  • renderWhenInactive is not even used when the room name changes; it was only used when the room type changed and when a password was set or removed. CallInfoView as a whole is not rendered again when the room name changes, only the label, so if moderator 2 changes the name of the conversation moderator 1 will not cry because the password is not gone.

@nickvergessen
Copy link
Member

Ah the editable Name thing moved the event listener to another view...

@nickvergessen
Copy link
Member

The moderator menu can not be opened via keyboard (it immediatelly closes again)

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the keyboard opening bug ✔️
Ready to rebase and change state

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In Nextcloud 17 "OC._currentMenu" was removed, so "renderWhenInactive()"
always renders immediately. Instead of fixing that the method was
completly removed, as keeping the menu open instead of rendering again
the view does not provide much value (if the room is no longer public
the password will be unusable anyway, and having the password menu open
when another moderator sets or removes the password should not happen
too often).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The password input is no longer the only element of the menu so pressing
"Esc" does not close the menu.

There is no longer a password button in the CallInfoView, so now the
acceptance tests need to open the room moderation menu to know if the
conversation is password protected or not.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The same "Copy link" button was defined separately in the templates for
moderators and non moderator participants.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The "share-link-options" element acts as a spacer to move the room
moderation menu button to the right. However, given that the call button
width is limited to the 50% of its parent flex element and that element
has the full width of the sidebar the same effect can be achieved by
setting "margin-left: auto" on the room moderation button.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The rules just set the same values used by buttons by default.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Now that the management actions were moved to a menu there is enough
room to show a label for the "Copy link" button.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the move-room-moderation-actions-to-a-menu branch from 1c5cd17 to 3e3506b Compare August 28, 2019 08:12
@danxuliu
Copy link
Member Author

The moderator menu can not be opened via keyboard (it immediatelly closes again)

You need nextcloud/server#16863

@danxuliu danxuliu marked this pull request as ready for review August 28, 2019 08:13
@nickvergessen
Copy link
Member

That fixes it, right 👍

@nickvergessen nickvergessen merged commit 9101726 into master Aug 28, 2019
@delete-merged-branch delete-merged-branch bot deleted the move-room-moderation-actions-to-a-menu branch August 28, 2019 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants