91b83cf09f migrated delete_topic modal
to confirm_dialog. confirm_dialog closes the modal after clicking on
the Confirm button. So manually closing the modal is redundant.
On mobile, when you go to our /help pages, you cannot scroll the
sidebar content. As for testing, the bug can be reproduced by
using a mobile display in Chrome inspector. One caveat of this
bug is that if you go to /help with a mobile display toggled,
the scrollbar won't work. However, if you switch between
different mobile displays, it starts working.
This commit adds some JS that sets the right CSS properties
when the hamburger is clicked.
Cross realm bots will soon stop being a thing. This param is responsible
for displaying "System Bot" in the user info popover - so this rename is the
right way to handle the situation.
We will likely want to rename the `cross_realm_bots` section as well,
but that is a more involved API migration.
This fixes the following flow being broken:
* You start on
http://zulipdev.com:9991/accounts/go/?next=/upgrade%23sponsorship
(which we link to from e.g. /plans/)
* The form on that page has
`action=/accounts/go/?next=%2Fupgrade%23sponsorship`, i.e. it has correctly
URL-encoded the `next `value.
* You enter a realm name and hit submit.
* That redirects you to
`http://realm-26.zulipdev.com:9991/upgrade#sponsorship`, would is
correct if you are already logged in.
* However, if you're not logged in, `/upgrade` will serve a redirect
to the login page, landing you at
`http://realm-26.zulipdev.com:9991/devlogin/?next=/upgrade/#sponsorship`.
This page works. But in production, it would instead be:
`http://realm-26.zulipdev.com:9991/login/?next=/upgrade/#sponsorship`.
On this page, password login works but social login does not.
Note that the `next=` value is no longer URL-encoded, and thus is
parsed by the browser as `?next=/upgrade` + a hash of
`#sponsorship`.
* If you now login with Google auth, you find yourself on
`http://realm-26.zulipdev.com:9991/#sponsorship` (no /upgrade).
The root cause was that we have a bit of JavaScript in signup.js and
dev-login.js that is intended to handle this; but it was broken for
the social login case for unknown legacy reasons.
This bug appears to date from the original
b62bdde303 which introduced `next`
support for social backends in the first place.
This commit adds more specific screenshots to our events and
research pages. The newer screenshots are properly sized such that
they fit well in a 400px width.
We also move a quote to improve the visual design.
The screenshots we have currently don't really fit into the width
available and the font looks too small. This commit adds newer
screenshots that have been scaled to fit a width of 400px such that
the font is readable with a small amount of content.
This is a prep commit to add the status emoji feature.
This function will add missing/extra parameters to the
emoji info object, that would need by the template to
render an emoji.
Co-authored-by: Yash Rathore <33805964+YashRE42@users.noreply.github.com>
This is a prep commit to add the status emoji feature.
We update the templates associated with the emoji
picker to add class `status_emoji` to `emoji` in the
popover. So we can later add the events when the user
selects the emoji.
We also update the functions in `emoji_picker.js` to
support opening emoji picker popover in the 'set_status_
overlay`.
We also increase the `z-index` of the `popover-flex`
class (This class is only added to popover-emoji content
if the view is mobile), so in the mobile view the emoji
popover doesn't go behind the '#set_user_status_modal'.
We rely on calling eventually_render_bots from the event handling
code path for bot events to both updating the list and switching
the tab.
Now we decouple the logic and make render_bots take care of
rendering the list of bots only and switch the tab upon calling
the success handler of creating the bot.
Fixes: zulip#17743
As it turns out, anchor links on headings only worked on our /help and
/api pages but were broken everywhere else. This commit adds the
required JS to scroll properly when an anchor link on any of our
various landing pages is clicked. We already have similar code to
accomplish this in help.js.
We verified with console logging, browser Sources inspection, and
checking source files that help.js and landing-page.js are never
included in the same page, but we add comments to make this
architecture clear.
Fixes#19349.
The distance of compose-box from the top is hardcoded in the existing
code as `50px`, which only considers the height of the `.header`, plus the
padding-bottom of the header. This results in a bug where the top bar of
compose-box gets hidden behind the header if navbar_alerts is also present
in the view.
This commit calculates the top distance of the compose-box dynamically,
whenever the compose-box is opened and set the `top` property of the
compose-box accordingly.
Tested on my Ubuntu development environment.
Fixes: #19249.
For spectators (logged view), we send user_id=0 via page_params.
The people module does not know about this user ID, and so throws the
exception. Earlier `people.get_by_user_id` was not called on page load,
but only when determining settings permissions with `settings_data.user_has_permission`.
But 231c536cad made it so that that function
is always called, so we need to handle the spectator case explicitly.
Co-authored-by: Gaurav Pandey <gauravguitarrocks@gmail.com>
The CSS properties used to make the `#compose-textarea` full-size
were missing for the `#preview_message_area`, thus, it was just
getting to the height as specified in the `max-height` property
of `#preview_compose_box`.
Adding the missing CSS properties resolved the problem, but only
for not-too-long messages. For very-long messages, the preview
message area was overflowing the parent container (attaining the
maximum height possible according to the content, due to the absence
of max-height), which led to the controls below compose-box to
disappear.
Adding an additional property of `height: 1.5em` solved this problem,
as if a height lower than min-height is set to an element, it attains
its min-height.
Tested manually on my Ubuntu Development environment.
Fixes: #19243.
This commit adds the support to toggle `send_notification`
checkbox by clicking over its corresponding label as well.
It is a similar case as the checkboxes within organization
settings.
This commit adds the support to toggle `send_notification`
checkbox by clicking over its corresponding label as well.
It is a similar case as the checkboxes within organization
settings.
These descriptions are both more accurate (there were embarrassingly a
few errors in the previous text about what was actually included in
what plan), as well as making clear that Zulip's free self-hostable
version includes essentially all the non-services features of
enterprise editions of competing products.
This commits replaces the custom `send_notification` message_edit
checkboxes with our `settings_checkbox` partial.
The main intention is to also support the feature of selecting a
checkbox by clicking over its corresponding label as we have
in the case of the organization settings checkboxes.
Due to above change, this commit also removes the redundant
`break-row` HTML class along with it styles.
All the inputs of form has 'width: 100%' property but then
also the width of inputs were different because of box-sizing
property. The select input had 'box-sizing: border-box' style
but the others did not, so this commit adds this style to
the other inputs - text type input and the textarea input,
to fix the alignment.
Adding 'box-sizing: border-box' changes the actual height of
the normal text type input because the default input height
of 20px set by bootstrap now includes padding and border also,
so we add 'height: 30px' style to make its height same as the
select input.
Fixes#19332.
These modern landing pages cover use cases previously not detailed on
our website. Technically, we had a /for/research page before, but it
wasn't finished or linked everywhere.
Removed "function-url-quotes" stylelint rule
since I need to use quotes in url to use an
svg as list bullet point. There are spacing issues
using it as an image. Also, using quotes in url
is actually the recommended way to do it otherwise
there could be issue with escaping.
This is a prep commit for the Stripe checkout migration.
create_ajax_request function used to create an ajax request to our
billing API and on completion redirect to one of the URLs in our
website. The stripe migration requires the ajax request function to
execute Stripe javascript code post the request completion to redirect
to Stripe checkout page. So this commit updates the function to accept a
callback function which gets executed post the request completion.
Our logic for filtering subscribed users in stream setting was
buggy and gave irrelevant filters based on email matching.
We correct it by using same logic as we use for filtering in
buddy list.
A recent PR introduced a bug where navigation dropdowns on the
landing page would not open for tablet/mobile screens. This
commit fixes that issue by using the proper media query to
differentiate between touch and mouse-based devices.
We have merged the '/settings/display' and 'settings/notifications'
endpoints to '/settings' in backend. This commit updates the frontend
code to '/settings' endpoint for updating notification settings
instead of '/settings/notifications' endpoint.
We have merged the '/settings/display' and 'settings/notifications'
endpoints to '/settings' in backend. This commit updates the
frontend code to '/settings' endpoint for updating display settings
instead of '/settings/display' endpoint.
We move templates related to listing streams in left pannel of
stream settings overlay to stream_settings folder by making
following changes:
* Rename `subscriptions.hbs` to `browse_streams_list.hbs`.
* Move `settings_stream_list.hbs` to stream_settings folder.
* Rename `subscription.hbs` to `browse_streams_list_item.hbs`.
* Move `settings_stream_list_item.hbs` to stream_settings folder.
We do following changes to two small independet templates used
in stream_settings area:
* Move subscription_setting_icon.hbs to stream settings folder
to have a consistent folder structure for stream settings templates.
* Rename `subscription_count.hbs` to `subscriber_count.hbs`.
* Move `subscriber_count.hbs` to `stream_settings` folder.
Following changes are done to subscription_table_body.hbs:
* Rename subscription_table_body.hbs to stream_settings_overlay.hbs,
to have a uniform naming pattern for stream settings templates.
* Move it to stream_settings folder.
The timestamp in edit history ui also has .message_time.
We had a tippy hover event attached to .message_time
whose code assumes it to belong to an actual message
which caused an error on hovering the message timestamp
in edit history.
This commit fixes it by making the selector more specific.
Because the right_sidebar initialization calls user_has_permission, in
organizations that has a waiting period before users become full
members, and only full members can send invitations, Zulip will throw
an exception on startup.
This makes several changes:
* Fixes a bug where the help text explaining our policies was not displayed.
* No help text was defined for many organization types.
* Copy-edits the help text somewhat.
* Offers all of the organization type options.
* Removes the 100% coverage requirement because it's annoying to test
the e.currentTarget click handler.
We rename loader.svg to loader-white.svg as this svg contains
white rectangles for clarity as we have also added loader-black.svg
which is same but with black rectangles instead of white.
We use img tag for showing the loading spinner in message edit form
and dialog-widget submit button, instead of object tag because using
object tag gives the following error- "Refused to display
'https://chat.zulip.org/' in a frame because it set 'X-Frame-Options'
to 'deny'." in the browser console.
As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.
We also need to add a new svg file similar to loader.svg with the
change that the retangles are filled with black color. This needs
to be done because we cannot get access to the svg document if we
use img tag and so we cannot change the color of rectangles using
jquery as we were doing before to show the spinner depending on
day/night mode. So, now we just set the src attribute of img tag
to the correct svg file depending on day/night mode.
Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
We use img tag for showing the loading spinner in image_upload_widget
instead of object tag because using object tag gives the following
error "Refused to display 'https://chat.zulip.org/' in a frame because
it set 'X-Frame-Options' to 'deny'." in console.
As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.
Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
We do following changes in this commit to have a uniform file
structure for stream setting templates.
* Move change_stream_info_modal.hbs to stream_settings folder.
* Rename subscription_stream_privacy_modal.hbs to
stream_privacy_setting_modal.hbs.
* Move stream_privacy_setting_modal.hbs to stream_settings folder.
This commmit does following two changes to subscription_settings.hbs:
* Rename subscription_settings to stream_settings to have a uniform
naming pattern for stream settings.
* Move it to stream_settings folder.
This commit does following two changes:
* Rename subscription_privacy template to stream_privacy_icon so
that its purpose is clear from its name.
* Move it stream_settings folder.
We handled tooltips for failed message action buttons separately
through our default tippy-zulip-tooltip class because of
a diffrent html structure for these buttons. But as we refactored
html for those buttons to have same structure as for other buttons
in message action this extra check is no more needed.
We had tooltips bound to failed message action icons, because of
slightly different html structure for these action buttons as
compared to other message action buttons. There were some minor
problems due to this. First there was difference of delay
in which we show other normal action button tooltips. Second
we had to add extra checks to handle tooltip content for these
buttons in tippyjs module.
This is fixed by having same html structure for failed message
buttons as for other message action buttons.
Earlier, the `stream_header_colorblock` wasn't properly styled
with the dropdown toggle button from a UI perspective. This was so
because they had a few space between them due to inconsistencies
in their border radius.
This commit adds an border-radius property to the move topic
dropdown toggle button to eliminate the above issue and
improve it's overall look.
Earlier, the `stream_header_colorblock` wasn't properly styled
with the dropdown toggle button from a UI perspective. This was so
because they had a few space between them due to inconsistencies
in their border radius.
This commit adds an border-radius property to the message_edit
dropdown toggle button to eliminate the above issue and
improve it's overall look.
Previously, the message edit `stream_header_colorblock` used
to incorrectly extend down till the textarea which caused
the UI to be buggy.
Fixed this by adding a `margin-bottom` property similar to
what we did in case of Move topic dropdown.
This minor change accidentally was missed within commit
7c25bd1aa8.
Previously, Everytime the user triggers the Stream create UI
by pressing the `Create stream` button, the
`create_handlers_for_users` function would reinitialize which
created duplicate event handlers for its elements.
This could lead to multiple click events being triggered over the
same element.
One such example was filed as #19255, where the click event was
triggering twice and hence the "Copy from stream" dropdown
would remain folded (closed).
Fixed this by - Initializing the `create_handlers_for_users` function
within the main `set_up_handlers` function, which is triggered only
once upon the opening of Stream create UI.
Fixes#19255.
This commit fixes the bug of showing custom email to admin in
the user-info form even when email_address_visibility is set
to admins only.
This commit fixes it to show the correct email according to
email_address_visibility values.
This commit restructures the top-level navigation on our landing
page using dropdowns in a manner that allows us to advertise some
important pages to our visitors:
- Use cases for companies, open source projects, and communities.
- Miscellaneous pages about the product are now accessible from the
"Product" dropdown.
- "Resources" are a few key resources our users may want to consult
if they need help or support.
Implemented dropdown_list_widget in message_edit UI
which enables the functionality to search for streams
while moving a particular message across streams.
This matches the UI we have in the "move topic" widget.
Fixes#18416.
Previously, non-admin emoji authors were allowed to
delete the emoji only if add_emoji_by_admins_only
was false. But, as add_emoji_by_admins_only setting
is for who can add emoji and not delete emojis, it
should not affect the behavior of deleting emojis
and users should always be allowed to delete the
emojis which. they added themselves
This commit changes the behavior to show the tip, explaining
which user roles are allowed to edit user groups, to user
with all roles because it is better to show the user which
other roles are allowed to edit. Previously the tip was shown
to non-admin users only.
This commit changes the bot-edit modal to use dialog_widget instead of
edit_fields_modal.
This commit also removes edit_fields_modal module as it is no longer used.
This commit changes the edit-user-info modal to use
dialog_widget instead of edit_fields_modal.
The edit_fields_modal module will be removed in
further commits to avoid code duplication.
This commit changes the edit-linkifier modal to use
dialog_widget instead of edit_fields_modal.
The edit_fields_modal module will be removed in
further commits to avoid code duplication.
We show red color for confirmation modals and green for other
modals with input fields.
As of this commit, only confirmation modals use dialog_widget but
some other modals with input fields will be migrated to use
dialog_widget.
We used html_submit_button to pass text to be present in the modal
submit button. There are only two possible options as of now -
"Confirm" and "Save changes" and the correct one can be determined
using is_confirm_modal parameter. So, we remove this paramter for
now and we can add it later if we have more type of modals using
this widget.
This commit adds a new dialog_widget.js file containing most
of the code of confirm_dialog.js with some minor changes and
changes confirm_dialog to be a wrapper around dialog_widget.js.
We pass 'is_confim_dialog' as true in dialog_widget for a
confirm_dialog modal. This commit also renames confirm_dialog.hbs
and confirm_dialog_heading.hbs to dialog_widget.js,
dialog_widget.hbs and dialog_widget_heading.hbs respectively.
This commit renames the variables, functions used in confirm_dialog.js
and classes and ids used in confirm_dialog.hbs.
This change is made so that we can easily migrate edit_fields_modal to
use this same code with some more changes.
We will change the file names and correspondingly import variables in
the next commit.
The expand-compose icon currently overlaps with the
recipient input field of private message compose box.
Reduce the size of the division to fix overlap.
Added CSS property of cursor as pointer to the copy
icon in about_zulip section which indicates the
icon to be clickable.
(This minor adjustment was probably missed in a74b52db22)
As we want subscriber list to occupy rest of available space
in the tab, we use relative units (vh) and calc to set the
max-height property dynamically without losing scroll behavior
for stream list.
This avoids showing a highlighted checkmark for resolve topics, which
looks weird given that the topic name itself contains a "resolve
topic" checkmark.
We are doing this to avoid annoying behavior, when
"enter sends" is enabled, and the user accidentally hits
"Enter" and has to deal with the error message.
Fixes#19182
We improved it in the following ways:
* Show the error message with the maximum character
limit.
* Disable the send button.
* When the user tries to send the message via hotkeys
i.e, When "Press enter to send" is enabled or the user
uses "Shift" + "Enter" shortcut, Flash the red border
around the compose box.
Also renamed `check_and_set_overflow_text` to
`check_overflow_text` for better clarity.
This bug was found when the user tries to send a
over character limit message, i.e It has failed the
validation but it still shows the "Sending..." text.
This commit essentially migrates our custom email tooltip
to tippy tooltip for displaying user's email when their
names would overflow past the right edge of user popover.
This also removes the `email_tooltip` and `tooltip_holder` HTML
classes aloong with their CSS styles as they no longer used.
We use subs as a common variable name for a collection of stream
data structure used in settings, in lot of modules. So this
rename clears a bunch of related shadowed variables.
Another minor issue fixed in this commit is behaviour of cursor
on hovering message retention setting label. We fix it by changing
this element this to be a div instead by label. It could be fixed
by adding a css rule for this instead of changing it to div rather
than label but this looked more stable to future refactors.
Labels for stream post/privacy value settings were not properly
linked with their input element so clicking on labels did not
toggle radio buttons. We fix this by having inputs elements inside
label elements to have correct linking.
We remove icons (hash | lock | globe) in permission description of
an stream, as it is pretty obvious as we use them at quite a number
of places with stream names, also it does not fits well with rest of
the text in that area.
Previously stream permissions were hard to find and understand
as they were displayed like a paragraph in description format.
We improve them by using a list item for each different permission.
We had a common title `stream settings` for two cases
when no stream was selected and also when settings for
a particular stream were shown.
To improve this situation we now show `Settings for {stream_name}`
when settings for a particular stream are shown.
We move away from a single scrollable page to have a tabs settings
structure instead.
This commit consists of the minimal changes required to set up toggler
component. And the subsequent commits would include all the UI UX
changes required for updating the layouts.
Co-authored-by: Ryan Rehman <ryanrehman99@gmail.com>
Similar to what mentioned in 2e196fd5d3
previous sea-green colour didn't meet the WCAG AA standard
guidelines for color contrast. This changes meets WCAG AAA
standard.
When editing a topic name (and the topic name has some link
in it) through the recipient bar, the external link icon
overlaps with the stream name. Shifting the code now
ensures that the external link icon would appear to the
right of the topic edit form box.
Also see: https://chat.zulip.org/#narrow/stream/9-issues/topic/topic.20edit.20recipient.20bar
This commits removes the redundant `compute_show_invites` function
which computes the `show_invites` page parameter in `lib/users.py`.
It is so because, commit 13399833b0 removed
the `show_invites` context variable passed in index.html.
Hence, the `show_invites` page_param key is no
longer required to compute in backend as it can be switched with
`settings_data.user_can_invite_others_to_realm()` in the frontend.
This commits also removes the `test_compute*` tests in
`test_home` that concerned with the `show_invites` page parameter
as they are no longer required.
This reverts commit 5a61c9bb14 (#18849),
which had a number of bugs:
• It had a poor interaction with Ctrl+Shift+L resulting in double link
formatting.
• It didn’t work at all in Firefox.
• It didn’t check whether what you’re pasting into is even a compose
box.
• On pasting into the message edit box, it would throw “Error: Cannot
read property 'text' of undefined”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We extract the code for checking night mode setting on
the basis of color_scheme value and using matchMedia when
color_scheme is set to automatic. This is currently used
in rendering the correct logo only.
This is a prep commit for fixing loading indicator not
visible on message-edit button in night-mode.
Our dropdown-toggle buttons are meant to have the same size as select
elements, but looked weird if you selected a stream with non-English
characters in its name.
We fix this by copying some styling details settings from our common
input/select styling.
Fixes#18479.
This commit makes a working toggler in compose_actions that adds the
compose-fullscreen class to the compose that removes the max-height
from the compose textarea and adds flex elements above so that the
height automatically adjust with the device height. This results in
making the compose box full screen sized.
The compose_height.js maintains the state of the height of the compose
box. Also, when the compose box is closed, the compose box is reset to
it's default behaviour and original height. So, everytime user need
not toggle off the compose full size and only for specific message
it is used.
It also adds destroy autosize on compose_height state change.
It destroys the autosize of textarea when the full
screen sized compose box is toggled on. And everytime when it is
turned off, it reinitialises the autosize. This also adds a
condition in autosize_textarea to only autosize when composebox
is not in full height state.
Fixes#17660
We extends composebox_typeahead to support autocompletion
suggestions on editing the topic of a message from message
edit form as well as from recipient bar.
Tweaked by tabbott to have correct keyboard interaction without
needing to patch Bootstrap.
Fixes: #16368.
This change ensures that we pop up the typeahead when one
has entered just `@`. This will make clear to the user
about the @-mentions feature in Zulip.
This also makes us consistent with expectations from other
chatting apps like Slack, Discord, etc.
Added few test cases and modified the present ones.
Fixes: #19142.
Fix a bug where the compose box cut the message without warning the user
the message pasted was longer than the allowed. It was fixed by stopping
cutting the message off and showing an indicator whenever the limit exceeds
and removing the indicator as soon as message gets less than that.
The cut off for showing the indicator is set as 90% of the limit.
Fixes#15909
Co-authored-by: João Maurício <carvalho.joaomauricio@gmail.com>
We show the text, which is either the linkifier label or the URL
(depending what generated the topic link).
For the desktop app at least, we probably as a follow-up want to also
show the URL.
(Though maybe it'd be better to just make the desktop app display the
URL).
Generally, tooltips placed at top look good. If the tooltip cannot
fit at top, it will by default be placed at opposite side.
Removed the unnecessary top placement definitions.
We add some additional delay so that user doesn't have to see
them every time but it is the delay is short enough so that
a user can view the full name of long streams without waiting
too long.
This commit changes the pastehandler to have a case when
a url is tried to paste on composebox. It instead of
directly pasting it, changes the content as we do using
ctrl + shift + L, just the difference is here it uses,
the copied text instead of url and cursor moves forward.
Fixes#18692
This commit migrates the `navbar.html` Django template
to handlebars by creating a new file as `navbar.hbs`
within `/static/templates` which is then rendered
using `ui_init` module.
As a part of migration, we also remove the `search_pills_enabled`
and `embedded` parameters from the context attribute as they
are no longer needed now.
Fixes part of #18792.
Right now, on clicking `quote and reply` on any message, the quoted
message is always inserted at the top of compose-box irrespective of
the current cursor position. Also, after insertion of the quoted
message, the cursor is shifted at the end of the compose box.
This commit changes this behaviour to insertion of quoted message
at the current cursor position with a newline at the end of quote
and moving the cursor position to that newline after insertion.
A newline is added at the beginning of quoted message only if there
was some content already present in compose box before the previous
cursor position.
Tested on Google Chrome and Firefox browsers on Ubuntu dev environment.
Fixes: #16836
Similar to the previous commit, the tooltip was not
completely visible in this case and this bug was
similar to the one corrected in recipient bar icons.
Here, the tooltip was partially visible. This bug was similar
to the one that is corrected for recipient bar icons.
I have removed the class attribute `tippy-zulip-tooltip`
for Filter stream title as this will be handled by the
new changes.
This commit renames confirm_dialog_yes_button class to
confirm_dialog_submit_button. This will help in keeping
a general class name when deduplicating the code for
confirm_dialog and edit_fields_modal.
This commit renames the html_yes_button parameter of confirm
dialog widget to html_submit_button and also all the related
variables in confirm_dialog.js.
This will help in keeping a general name when deduplicating
the code for confirm_dialog and edit_fields_modal.
This commit changes the error message element of confirm_dialog to be
above the text of dialog and to be a nice box using already defined
"alert" class.
This commit renames modal_body_html and modal_label to
html_body and html_heading respectively. This change
will help us easily deduplicating the confirm_dialog
and edit_fields_modal code.
Currently, the "Home" link at the top takes one to the doc root,
i.e., /help or /api. This is a little misleading since "Home"
seems to be more synonymous with the Zulip homepage.
This commit adds a proper backlink to the top logo that takes you to
the homepage and renames "Home" to be more specific. The text after
"|" will now take you to the doc root instead (/help or /api). Note
that this allows us to link the /help and /api pages from the
homepage while ensuring that backlinks allow the visitor to get back
to the homepage.
This commit first moves the compose.validate() function out
with the functions that are needed by it. Then one by one
checked for which function is now not needed in compose.js.
This moves all validation related functions out of "compose.js"
to "compose_validate.js".
Splitting compose announce variables out of compose.js.
This commit moves the "user_acknowledged_all_everyone" and
"user_acknowledged_announce" out of compose.js to reduce
cyclic dependency of compose_validate on compose.js.
Moving wildcard mentions to compose_validate.
The wildcard mention settings are mostly used while validating.
Also to reduce the cyclic dependence of compose in
compose_validate, the related wildcard mentions are moved out to
compose_vaidate.js.
This also converts reset_acknowledged functions to set values
by passing values.
This commit migrates the `right_sidebar.html` Django template
to handlebars by creating a new file as `right_sidebar.hbs`
which is then rendered using `ui_init` module.
It also removes the tests in `test_home` due to the template
migration, since these elements aren't rendered on the backend
anymore.
We also remove `test_compute_show_invites_and_add_streams*`.
Fixes part of #18792.
This commit migrates the `left_sidebar.html` Django template
to handlebars by creating a new file as `left_sidebar.hbs`
which is then rendered using `ui_init` module.
These are the minor changes introduced by virtue of template
migration -
- The `compute_show_invites_and_add_streams` function now
only concerns with the invite_to_realm_policy.
- Renamed the `compute_show_invites_and_add_streams` function
to `compute_show_invites` due to the above change.
- Fixes relevant `test_home.py` tests due to the above
changes.
Fixes part of #18792.
We've been unhappy with this fragile nth-last-child logic since the
big navbar rewrite a few years ago.
Now that we have TippyJS tooltips in the navbar area, it actually
causes a bug: Hovering the "subscribe count" widget makes the search
icon jump.
Fix this by just adding a CSS class to the two elements that are
intended to be modified by this logic.
We currently have the resolved topics prefix shown as part of
the topic name in the left sidebar. However this causes inconsistency
while showing topic names. Hence this adds support for showing the
prefix in the cutter to the left of the topic name.
Fixes#18989.
This commit changes the code to scroll to the top after closing the
message edit form to make sure the cursor it at same position and
the scroll does not distract the user when the request of message
edit is processing. Though the scrolling is not visible distinctly
in much case and is visible only when there is some delay, but it
is fine to change this code as the logic is correct and to be on
safer side.
We now show loading indicator inside the 'save' button
instead of hiding the buttons to show the loading
indicator. Both the save and clear buttons are disabled
when the request is processing. We do not change color
of the buttons just change the cursor to indicate that
button are disabled and nothing happens on clicking them.
The reason for disabling the cancel button is that it
is actually not possible to cancel the action once
loading has started, so it is actually better to disable
it only such that users are not confused.
This commit adds a wrapper div element around the button
because we wanted to add two css properties to the button-
'pointer-events: none' such that nothing happens on click
and 'cursor: not-allowed' to indicate that buttons are
disabled. But these boht styles cannot be added to same
element because 'pointer-events: none' overrides the
'cursor: not-allowed' style and normal cursor is visible.
That's why we add a wrapper to add 'cursor: not-allowed'
style to it and add 'pointer-events: none' to the button.