Previously, tooltip templates were identified using the
group's name in their `id` attributes.
This change uses the group's ID instead, which is more reliable.
This commit adds 'highlighted-element' class to <b> tags in
the following parts of the settings panel:
* who can access channel
* user member of a user group because of being part of a subgroup
already added.
'highlighted-element' class sets the 'font-weight: 600',
replacing the default of 700.
This commit updates the subscribers and group members table CSS to
use fixed layout. This helps in having user pill take the width if
available and we can show more characters.
Previously the width of name in user pill was set to have a max
width of 165px which meant the there was some empty unused space in
the rows especially on narrow screens when email column was hidden.
Fixes#35157.
This commit updates error banner shown when group is only used
as subgroups and not as permission.
If group is used as a permission, then we mention that in the
error banner and have a button to go to "Permissions" panel.
We show the same banner even when group is used as a subgroup
as well. But when group is only used as subgroups, we just
show a message containing names of all the supergroups.
This commit removes the "Remove" and "Unsubscribe" action buttons from
various tables and replaces them with icon buttons using the "close"
icon.
Additionally, previously the rows with and without a remove button had
different heights. This commit updates the fixed `px` values to `em`
units to ensure equal height for all rows, regardless of whether a
remove-subscription button is present.
Fixes: #34874.
Instead of changing the height of the button subheader depending
on the width of the modal, which was fiddly and error prone, we now
let grid determine the height of the button subheader, and determine
the height of the body through javascript resize calculations.
This commit fixes code to correctly show the long group
names by clipping them and showing ellipsis in group rows
in left panel and in the header shown in right section.
Group names are handled in a different way than stream
names because we need to show deactivated icons as well
for stream names.
The "sub_unsub_status" spinner was inside the div with the "check" class
, causing the tooltip to appear over the spinner, which should only be
visible on the check icon.
This commit moves the "sub_unsub_status" spinner div outside, ensuring
the tooltip is now visible only when hovering over the check icon.
Simplebar was not being implemented correctly in groups UI
left panel because $container and $simplebar_container args
passed to ListWidget.create were same elements and thus the
simplebar related elements were being removed when rendering
the list.
This commit fixes it by adding a wrapper element to be used
as simplebar container.
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.
We need this height to be flexible based on if the subheader has
overflowed into two rows or not, and our method of doing this
(with existing examples in the buddy list and stream list) is to
calculate what the height should be when a window is loaded or
resized.
Replaced `data-dismiss="modal"` attributes with class/ID-based event
handling to align with Micromodal usage. Also removed an unused CSS
rule which was defined.
Fixes#32877.
Co-authored-by: Sanchit Sharma <ssharmas10662@gmail.com>
Thanks to @sanchi-t, I've yanked a lot of code and approach
from his concurrent PR in 32475, especially the method of
toggling parent css class to hide/show relevant children.