This should greatly reduce the symptoms of a bug where a stale
realm_users cache (missing a newly created user) results in the web
client missing the new user and throwing exceptions.
This commit adds code to redirect '#groups/new' to '#groups/your'
if realm is on limited plan like we do when user does not have
permission to create groups.
This commit adds code to live update the UI when
can_create_user_groups setting changes.
The elements that are live updated are -
- Icon button at the top left panel
- Button shown in right panel when no group
is selected.
- Text shown in right panel mentioning whether
user has permission.
We do not live update the text shown when left
panel is empty as it is somewhat complex to
handle all conditions correctly for it.
"stream-advanced-configurations" was being used as ID for
advanced configurations section in both stream edit and
creation UI, which is not correct as ID should be unique.
This commit fixes it by removing the ID and instead using
class in selectors. Also, there was some unused CSS, as
we do not have dropdown widget buttons in advanced
configurations section, written using the duplicate ID so
removed that as well.
In update_web_public_stream_privacy_option_state, when showing
and hiding the web-public option, "hidden" prop was set while
hiding the option and ".show()" was called to show the option.
Now once the UI was live updated by calling "show" setting
hidden attribute again to hide did not work because
"display: block" CSS applied by calling "show" kept the
option visible. This commit updated code to show the option
by setting "hidden" attribute to "false".
This commit fixes the use of "stream_permission_settings"
as ID for "Channel permissions" subsection in both
stream edit and creation UI, which was not correct since
ID should be unique.
To fix this ID was removed from the element and following
changes are done -
- $("#stream_settings") element is now used as a container
for live update functions for stream edit UI.
- "stream-permissions" class is used to access the element
instead of ID.
- Advanced configurations container also had "stream-permissions"
class before, and that was removed in this commit so that
"Channel permissions" container can be identified uniquely
and thus some CSS changes were needed.
- Also, fixed "update_stream_privacy_choices" function to
not use ":visible" in selectors.
Previously, when leaving the group by clicking "checkmark"
icon in group row, group details were opened in right panel
as well due to event propagation.
We keep the behavior of opening the group in right panel
after joining the group by clicking on "+" icon in the
group row.
For narrow widths, left panel is kept open while joining
or leaving the group, same like we do for stream settings.
When clicking on "Cancel" button in the footer in stream
creation UI, left panel should be shown for mobile widths.
Previously, it resulted in a buggy view showing both left
and right panels.
This change makes the behavior consistent with what we
have for streams UI.
There is no change in behavior for wider screens.
Fixes#33627
In Move messages and Move topic modals,
Show a warning banner if any of current topic participants
are NOT subscribed to the destination stream.
Inside the banner, Show participant names if
number of conversation participants
is <= 5; otherwise, show only the count.
This commit adds the button hover state styles to focus state styles,
as focusing on the button with the keyboard is a similar action to
hovering over it with a mouse.
This commit improves the button outline on focus by changing the color
of the outline to black-on-light and white-on-dark, and tweaking the
outline width and offset.