The paragraph tag was being used along with the bold tag to style the
topic and stream in the popovers. The semantic meaning of these tags
are more specialized and should not be used in this context. Replaced
the <p> tags with the more general <div> tags and accounted for the
bold text via the `font-weight` CSS property.
The `.topic-name` class, used to style the topic/stream name in the
topic list in the left sidebar, was also being used to the style the
topic/stream name in the topic/stream popover. This lead to irrelevant
properties being applied to the popover > topic/stream name. Through
this commit, the styling for both of these different cases are now
separated using the appropriate selectors.
Fixes#27562.
We set the streams popover width to be equal to the width of the longest
menu item, via the min-content intrinsic sizing. We also set all the
menu items to `white-space: nowrap` to prevent them wrapping. These
two changes allow the menu items to dictate the width of the popover
instead of a static max-width property, and thus helps with languages
where the length of the translated item may be long enough to wrap.
We set the topics popover width to be equal to the width of the longest
menu item, via the min-content intrinsic sizing. We also set all the
menu items to `white-space: nowrap` to prevent them wrapping. These
two changes allow the menu items to dictate the width of the popover
instead of a static max-width property, and thus helps with languages
where the length of the translated item may be long enough to wrap.
The "User groups" panel is now removed from settings overlay
and we instead use new "#groups" UI.
This commit also makes some changes to tests to ensure coverage
for pill_typeahead.js which was previously done by
settings_user_group_legacy.test.js. We have still not got
complete coverage on user_pill.ts as we have removed
settings_user_group_legacy.test.js, but we just add the file
to EXEMPT_FILS list for now and will handle it in future.
Fixes#28012.
This commit updates the user group popovers to change the icon
and text of ".manage-group" option to match what we have in
gear menu and also change the heading and ".manage-group"
option to be left-aligned.
We now add a "Group settings" option in the gear menu to open
the new "#groups" UI and the "Manage group" option in user
group popover also opens the new UI.
We exchange the positions of the preview and upload buttons to make the
preview button the first one, as the preview button is different from
the other buttons in that it does not manipulate the contents of the
ompose box.
We reduced the width of "Actions" column too much in stream subscribers
and group members list when there were no users matching the text in
search input and it did not look good because of "Actions" heading
being shifted to extreme right.
This commit fixes it by removing the "actions" class on the heading,
which was used to set the width to "1%" which is needed for tables
with only icons in buttons to avoid unused space but not here.
As a result of removing this class, the CSS of "min-width: 100px"
is being applied to the column, but that's fine atleast for stream
subscribers list as it did not look good before due to scrollbar
overlapping the buttons and it looks better now.
For the group members list, we set min-width to 80px, as we do
not require 100px width and it is enough to avoid overlapping
scrollbars to an extent.
The overlapping scrollbars problem is still not fixed completely
but that will handled in a separate commit. This commit was
just to make the heading row look better when there are no users
in the list.
We pass `next` parameter with /self-hosted-billing to redirect
users to the intended page after login.
Fixed realm_uuid incorrectly required in remote_realm_upgrade_page.
This commit moves dropdown widget for "can_access_all_users_group"
setting inside ".organization-permissions-parent" element which
makes it consistent with other settings and also reduces the
width of its container which is important in further commits to
show the tooltip about plan change on this setting correctly.
This commit updates the message shown for empty group members
list to use "members" instead of "subscribers" and also updates
the wording of messages in both stream subscribers and group
members list to match with the one shown in right sidebar users
list.
We also show different message when there are no subscribers or
members matching the filter text.
This commit adds code to disable "Add" button in the members list
if the input is empty by adding a common class to "Add" button
for stream subscribers in group members and using the existing
code in add_subscribers_pill.js.
This commit adds support to join and leave buttons from the
left section using the plus/checkmark icon present towards
left in each group row.
Fixes part of #25538.
This commit adds a button to join or leave a user group
in the right section of stream settings overlay to the
right of tabs like we have for streams.
Fixes part of #25538.
There is no need for "hide" class in ".user_group_settings_wrapper"
element as we hide the ".right .settings" element in JS using jquery
"hide" and we also do not remove the "hide" class while showing the
group settings because we use the jquery "show" function for it.
This commit fixes the extra space and additional border that was being
added to the gear menu popover when the user did not have permission to
invite users.
This commit updates label for new user's role dropdown to use
"Users" instead of "User(s)" because that caused some problems
in translating the text.
We should ideally be using the ICU plural syntax for such cases,
but since it is used as label, we cannot use the plural syntax
there. So we instead just change it to always have "Users"
plural like we do at some other places in that modal.
Now, the topic wildcard mention follows the following
rules:
* If the topic has less than 15 participants , anyone
can use @ topic mentions.
* For more than 15, the org setting 'wildcard_mention_policy'
determines who can use @ topic mentions.
Earlier, topic wildcard mentions followed the same restriction
as stream wildcard mentions, which was incorrect.
Fixes part of #27700.
We simplify the banner message by replacing the
"stream wildcard mentions" text with `"@stream mentions`,
`"@-all mentions"`, or `"@-everyone mentions"` text.
This commit updates the backend code to allow changing
can_access_all_users_group setting in development environment
and also adds a dropdown in webapp UI which is only shown in
development environment.
This commit re-arranges the settings in "Organization permissions"
section -
- A new section "Guests" is added which now contains the guest
indicator setting checkbox.
- Moved "User identity" and "Guests" sections above "Other permissions"
section.
This makes it possible for a self-hosted realm administrator to
directly access a logged-page on the push notifications bouncer
service, enabling billing, support contacts, and other administrator
for enterprise customers to be managed without manual setup.
As reported on #27270, the emoji picker in the set status modal was
not opening when pressing enter. This commit adds a keypress event
listener to the emoji picker in the set status modal, and opens the
emoji picker when the enter key is pressed.
Fixes part of #27270.
In this commit, we update the formatting of the tooltip over the stream
name to match other two line tooltips in the app. We also remove the
stream privacy icon from the tooltip, as it is already displayed in
the message view header.
We include setup tips to the user invite modal for the following
cases:
At the top of the invite modal
- If the org description is missing.
- If the org profile picture is missing.
- If the custom profile fields have not been added, where we also
provide a link to the default user settings for the time being,
until we have a better way to compare if the default user settings
have been changed.
We also use the new banner ui to display these tips. In doing so, we
extract the banner component from `compose_banner.hbs` to
`popover_banner.hbs`, removing any compose specific code from the
banner component.
Fixes: #24262
Co-authored-by: Lalit <lalitkumarsingh3716@gmail.com>
Earlier the `/poll` slash command was the only way to create polls.
To increase user friendliness with a GUI, a button to launch a modal
to create a poll, has been added to the compose box. This button is
enabled only when the compose box is empty, to avoid complexities with
losing / having to save as draft any message already being composed.
The modal has a form which on submission frames a message using the
`/poll` syntax and the data input in the form, and sets the content of
the compose box to that message, which the user can then send. The
question field is mandatory for form submission.
Fixes: #20304.
This is a prep commit for the next commit, which will add a modal for
creating polls. The container div allows a tooltip to be added to the
button in a disabled state (which is needed for the poll modal).
Note that toggling off spoiler formatting works if either all the
content inside, or the header (if it exists) or both are selected.
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
Note that toggling off, only works for code blocks without a specified
language. So toggling formatting off only works for code blocks like:
```
code
```
and not:
```javascript
code
```
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
This is a preparatory commit for new formatting buttons which are added
in the following commits.
Earlier we used multiple classes, each of which handled the hiding or
showing of the element it was applied to, at each breakpoint. Now all
the media queries of those classes have been combined into a new class,
for cleaner and more reusable code. This new combined media query is
also updated to accommodate the new formatting buttons.
In the previous menu for moving messages, the default option was
"Move this and all following messages." However, this default choice
was not always aligned with user intentions, particularly when moving
the first or last message in a topic. In such cases, the desired
behavior often corresponds to "Move all messages in this topic" for the
first message and "Move only this message" for the last message.
To address this, we have updated the default options as follows:
1. **When moving the first message in a topic:** The default option is
now "Move all messages in this topic." This change better represents
the user's intention when moving the initial message in a topic.
2. **When moving the last message in a topic:** The default option has
been adjusted to "Move only this message." This change ensures that
users can easily move the last message without affecting other messages
in the topic.
These changes are designed to enhance the user experience and
facilitate the management of topics, especially when users follow or
unmute topics.
Fixes: #27298.
Earlier, a 'large @-mention notification' warning that pops up
for stream wildcard mentions was shown for topic wildcard mentions
too, which is incorrect.
This commit fixes the incorrect behavior. We no longer show the
banner for @-topic mentions.
We don't need a banner for @-topic mentions, as those are much less
likely to be used without thinking about it and would rarely be spammy
for a lot of people.
Fixes#27767.
This is preparation for #27637, where it will be nice to be able
to be able to parse a url such as `/#streams/1/announce/general`
and use the `general` string to directly open a stream subscription
tab without converting it to `general_settings`.
At present, it's not obvious that clicking on the stream name in the
top navbar will take the user to stream settings. To make it more
apparent, we add a tooltip to the stream name, explicitly indicating its
functionality.
We also add a second line to the tooltip thar displays the number of
subscribers to the stream and remove the tooltip from the number of
subscribers indicator on the top navbar. These changes are in preparation
for removing the number of subscribers indicator from the top navbar.
Fixes#27360.
Co-authored-by: Sayam Samal <samal.sayam@gmail.com>
This commit adds new API endpoint to get stream email which is
used by the web-app as well to get the email when a user tries
to open the stream email modal.
The stream email is returned only to the users who have access
to it. Specifically for private streams only subscribed users
have access to its email. And for public streams, all non-guest
users and only subscribed guests have access to its email.
All users can access email of web-public streams.
We need to use the `navigate-link-on-enter` class for the scheduled
messages link in the popover, since it's a popover menu item with a
`href` attribute. The reason for using this class has been documented
in 246c1d7b4e.