The `stream_id` property of a stream object was being wrongly accessed
as `id`, which does not exist, in the function
`get_available_streams_for_moving_messages()`
This led to the current stream not being rendered in the dropdown list
as expected in the `Move Topic` modal when the user does not have the
permission to post in the current stream.
We don't need to select the message after fetching messages if
the user changed the narrow in the meanwhile.
Note that in this context, message_lists.current ===
message_list.narrowed.
The new ordering matches that used in the Help Center search operators
page, which we just reordered to better highlight more frequently used
features.
Fixes#23768.
Previously, we used `sender:email`, for example, in our examples for
how to use search operators. This is correct for what ends up in the
search input, but the typeahead has a much nicer experience for
selecting a user, and the emails may be fake due to limited
email_address_visibility, so it's clearer to just refere to a user
here.
Fixes part of #23768.
Changes all the uses of the word "operators" to "filters" in the
in-app "Search operators" reference to align with the updated help
center documentation.
Fixes#23767.
Previously, the options in the stream selection dropdown were sorted in a case-sensitive
fashion, which felt a bit harder to use than just sorting alphabetically irrespective of case.
Fixes: #23283
This commit deletes all the functions, CSS and other code
for stream privacy modal since we have udpated the UI to
show stream permission settings always in "General" section
and not inside the modal.
Fixes a part of #19519.
This commit adds code to save changes in stream permission
settings.
This commit makes some changes to code in settings_org.js to
handle stream settings and add corresponding handler for
save button in stream_edit.js. We also add a new function
get_request_data_for_stream_privacy to get the data for
stream privacy which can be send with the API request.
Fixes part of #19519.
This commit adds code to discard changes in stream permission
settings.
This commit makes some changes to code in settings_org.js to
handle stream settings and add corresponding handler for
discard button in stream_edit.js.
Fixes part of #19519.
This commit adds code to show save-discard widget when stream
permission settings are changed and subsequently hide it when
the setting is again changed to original value.
Some important code changes -
- Added code in "settings_org.js" to handle stream settings.
- Added handler in "stream_edit.js" to show or hide the
save-discard widget when settings are changed.
Fixes part of #19519.
We now show the stream permission settings - stream privacy,
stream post policy and stream message retentions setting,
always in the "General" section of stream settings instead
of showing it in the modal. The setting elements are
disabled for users who cannot change them.
Some important changes are -
- Add proper classes and IDs to the elements such that
code in settings_org.js can be used to set and change these
settings.
- Code in "settings_org.js" is updated to be able to set
stream message retention setting while rendering the page.
- Added enable_or_disable_permission_settings_in_edit_panel
function in stream_ui_updates.js (since that will also be
used in live updating code) to disable the setting elements
if required.
- We also update update_web_public_stream_privacy_option_state
function such that we can correctly enable/disable web-public
option in stream edit panel based on permissions.
- Added code for save-discard widget in stream_settings.hbs in
this commit but code to implement the correct behavior of it
will be added in further commits.
Fixes part of #19519.
We change the CSS for save-discard widget to not be inside
"#settings_page" selector such that it can be used as a
common component for stream settings also.
This commit also updates the selectors to be more specific
such that the ".new-style.button" css cannot override
these rules.
This commit changes populate_data_for_request to have module-level scope
and not be defined in register_save_discard_widget_handlers, so that we
can use this function for stream settings too in further commits.
This class was used for setting margin-top as 0 but since the default value
of this property is already 0, this CSS is not required and thus we can
remove this class also since it is not used anywhere else.
Updates the default empty narrow banner text to be more generally
applicable, particularly in the case when all messages have been
moved to a new topic.
This commit removes ID from discard button in save-discard widget.
Generating IDs using variables results in difficulty to grep
the code and we can anyway access the discard button by using
ID of the settings-subsection-parent div. Also, we do not use
ID to access this button, so we can change this safely.
This commit removes ID from save button in save-discard widget.
Generating IDs using variables results in difficulty to grep
the code and we can anyway access the save button by using
ID of the settings-subsection-parent div.
We used id of save-button to get subsection parameter
which is passed to get_complete_data_for_subsection.
This commit now changes it to instead get subsection
from settings-subsection-parent div. We also change
the id of settings-subsection-parent div of organization
joining settings in this commit to be a more reasonable
name as per this change.
Previously user presence dot in the right sidebar becomes narrower
when there is unread counter, and as such, this commit adds a min-width
to the user presence dot.
Fixes: #23519
This is part several updates for #22524.
Notes:
* data-stream_name isn't needed in the template (before or after),
since there is not even an action button that could use it.
This is part several updates for #22524.
This commit also removes `compose_error.hide()` since there is only
one remaining use of it (which has been replaced by the contents of
`hide()`). Eventually `#compose-send-status` should be replaced
fully in a future PR, after we rewrite the upload banner to use
the new banner template.
Testing note: I removed the test test_compose_not_subscribed_clicked
since it heavily relies on the old way of rendering banners and is too
UI-focused (instead of logic focused) for me to feel like it's worth
testing that the banner is removed when clicking the button.
This is part several updates for #22524.
Testing note: I removed the test test_compose_all_everyone_confirm_clicked
since it heavily relies on the old way of rendering banners and is too
UI-focused (instead of logic focused) for me to feel like it's worth
testing that the banner is removed when clicking the button.
This is part several updates for #22524.
Testing note: I removed the tests test_compose_invite_users_clicked
and test_compose_invite_close_clicked, since they heavily relied on
the old way of rendering banners and were too UI-focused (instead of
logic focused) for me to feel like it was worth testing that the
banners removed when clicking the buttons.
Error banners were rendered in a different place than warnings.
Now compose errors and warnings share the same template and styling
in compose_banner.hbs
Testing notes:
* I removed test_message_overflow since it seemed not to test
anything that test_check_overflow_text wasn't already testing.
* private_message_recipient() can't be called to set emails to non-valid
emails, so `invalid_recipient` cannot be tested (and is likely very
difficult to trigger in production, if possible at all).
This is the beginning of a fix for #22524 which converts several
banners to a new style. As a part of that set of changes, this
commit creates the shared template and warning styling. The
resolved topic warning was picked (for no particular reason)
to migrate first. Further commits updating other banners
to follow.
If the selected message was different from the message where
actions popover was present, it resulted in emoji popover being
attached to the selected message instead of the one where
actions popover was present.
exclude_tippy_instance was not being used correctly since it was
never defined as an `opts` property for `hide_all_except_sidebars`.
Everything seems to be working fine without this. I recall that
popovers seems to be hidden before they were displayed for which
this was required but it doesn't seem to be needed anymore.
We need to fill width of `actions_hover` with padding of
`zulip-icon`, so that hovering over `.actions_hover` shows you
tooltip and clicking on it shows popover.
Since we are switching to tippyjs to display popovers, extracting
this data in a commit of its own, makes further changes easier to
review and merge.
Also, we could add tests with full coverage on the data
provided to popovers, possibly a good first issue for beginners.
While `reminder` feature is disabled right now, we need to delete
these functions to avoid conflicts when porting the actions
popover from bootstrap to tippy.