Commit Graph

13155 Commits

Author SHA1 Message Date
Kevin 1d54b383bd compose: Fix keyboard UI with new global time widget.
Fixes #20130
2021-12-09 09:00:33 -08:00
Alya Abbott e70ec964dc portico: Add use case buttons to /why-zulip and /hello. 2021-12-09 08:58:45 -08:00
Aman Agrawal c35ab98d03 hello: Move call to action button style to a specific class. 2021-12-09 08:58:45 -08:00
Tim Abbott 36f03ccd5c message_events: Fix edit history live update when moving topics.
As noted in the TODO that we delete with this commit, we never
implemented live-updated for edit history when moving a message to
another topic.

Implementing this involves somewhat ugly copy-paste of the logic for a
content edit, but structurally is pretty simple.

It also makes #20451 much more visible.
2021-12-08 21:35:44 -08:00
Nikhil Maske 091772b534 hotspots: Remove intro_reply hotspot.
Zulip shows two guides on How to reply, first one by
the welcome bot and second one is intro_reply hotspot.
To simply and avoid redundancy, intro_reply hotspot is
removed.

Fixes #20482.
2021-12-07 21:55:59 -08:00
Sahil Batra 116a0f6f9d stream_settings: Sort subscriber list by name always.
This commit changes the behavior of subscriber list to
always be sorted by name instead of sorting them by email
when emails are accessible.

This change is fine because we will be using user-level
email address visibility and in that case the email of
some users will be visible and email of some will be not.
2021-12-07 21:44:40 -08:00
Sahil Batra 1ce869f16c settings_users: Fix comment in bot_info function. 2021-12-07 21:42:24 -08:00
Sahil Batra a1a5a1643f settings: Remove unused show_email parameter.
We show "Email" column heading always in users list and
subscriber list irrespective of the email-address visibility
setting after 46660e5, so we do need to pass show_email
parameter to render_admin_tab and render_stream_settings.
2021-12-07 21:42:23 -08:00
Tim Abbott 48dccfd37a css: Fix night theme radio inputs.
Radio inputs that are not selected are technically independent
:read-only inputs, not a single input with multiple values; this
results in this selector for read-only inputs not behaving as
expected.

Fixes #20221.
2021-12-07 14:32:37 -08:00
S-Abhishek 186d1a83e9 narrow_banner: Move empty narrow messages to handlebar templates.
Removed existing empty narrow divs from app/home.html and created
a new javascript module to dynamically load empty narrow messages
using handlebar template.

Fixes #18797
2021-12-07 13:38:48 -08:00
Lauryn Menard 58438c362f documentation: Fix text wrapping and alignment of ordered lists.
Moves CSS rules that rely on list items in an ordered list being
wrapped in a `<p>` tag so that they apply to the list item itself.
Uses `position: absolute` to set the `::before` pseudo-element in
place and `position: relative` to adjust the list items so that they
do not overlap.

Ideally, when Safari supports the `content` property for `::marker`
pseudo-elements, this issue can be revisited.

Fixes #20440.
2021-12-07 11:53:14 -08:00
Sahil Batra 9bb506c6f7 streams: Fix live-update bug of disabling web-public option instead of hiding.
The web-public option was disabled instead of being hidden in stream creation
form during live update triggerred from setting enable_spectator_access to
False. It was not being hidden since we have made web-public as the first
option and it is selected by default.

This commit fixes the bug to hide the option and also makes the code more
readable.
2021-12-07 11:44:45 -08:00
Sahil Batra 265a587470 streams: Consider only visible choices while selecting default choice.
We should only consider visible choices while selecting the default
stream-privacy choice in stream creation form. Previously, we were
only checking whether the option is disabled, but this resulted in
a case where no option was selected when the realm-level setting
was set to not allow web-public streams as the choice was only
hidden and not disabled.
2021-12-07 11:44:45 -08:00
Sahil Batra 1049867485 streams: Reorder stream-privacy choices in UI.
This commit moves 'Web public' option to top in
the stream privacy choices in stream creation
form and changing privacy modal.
2021-12-07 11:44:45 -08:00
Steve Howell 1509e7f355 templates: Always indent "each" blocks. 2021-12-06 14:58:29 -08:00
Tim Abbott fdfaa321b3 css: Fix Saving/saved buttons in stream settings.
This is likely not the correct long-term fix, but it's an effective
tactical fix for this button.  Added a TODO noting the expected
direction for a long term solution.

Fixes #20481.
2021-12-06 14:40:21 -08:00
Aman Agrawal 7dea22c532 dark_theme: Keep modal related css together. 2021-12-06 10:37:21 -08:00
Aman Agrawal 8123ebbfc0 modal: Fix button colors in dark theme.
Use the dark purple color we use for `send` buttom on the
`confirm` button.

Fix color of `cancel` and `disabled` buttons in dark mode.
2021-12-06 10:37:21 -08:00
Aman Agrawal a23cc709e8 resize: Hide popover on width change on mobile devices.
It is possible for user to change the width by using
screen rotation after the page has been loaded on mobile.

If only height has changed, it is most likely due to a
virtual keyboard, we don't hide popover in that case.

Fixes #20439
2021-12-06 10:36:20 -08:00
Steve Howell f5bb43aba2 bug fix: Restore placeholder text for adding members.
In 4792af5682 I reformatted the template in such a way
that the div was no longer empty, and therefore
the :empty pseudoclass was not properly applied to
show the placeholder.
2021-12-04 15:35:24 -08:00
Steve Howell 44f935695d templates: Improve comments for recipient_row.hbs.
We also squash some whitespace in the HTML, although
it's mostly irrelevant since you can't copy/paste
the text.
2021-12-04 15:35:24 -08:00
Aman Agrawal ec48f29daf compose: Check if compose control btn popover has the clicked element.
This is necessary to avoid a poptention bug where the popover
is open but the button is clicked somewhere else.
2021-12-04 06:52:18 -08:00
Aman Agrawal d749438551 compose_ui: Use white spinner on both dark and light theme.
Fixed alignment slightly.
2021-12-04 06:52:18 -08:00
Yash Rathore 345616ad02
user_sidebar: Set personal presence dot based on the user's settings. (#20376)
If a user chooses to not broadcast their presence status to others, we
still show the user as available in their own user sidebar. Instead, one's
own availability should appear the same as it does for other users.

With tweaks from YashRE42: rebasing to use user_settings instead of
page_params, as introduced in the series of commits ending with
8755a76cf6, adding code comments and
moving the redraw call to `server_events_dispatch.js`.

Fixes part of #18846.  Further work is required to display the user's own idle
status properly to complete #18846.

Co-authored-by: YashRE42 <33805964+YashRE42@users.noreply.github.com>

Co-authored-by: Ganeshprasad Biradar <biradarganesh25@gmail.com>
2021-12-03 16:20:20 -08:00
Sahil Batra c648982996 settings: Fix behavior of realm-level notification batching settings UI.
Changing realm-level notification batching period setting from UI
was broken after adding the "Custom" option in 4f63378e7f because it
handled only user-level setting code and not realm-level setting.
This commit fixes it.
2021-12-03 16:03:02 -08:00
Sahil Batra 08038ef140 settings: Refactor set_notification_batching_ui function.
This commit refactors the set_notification_batching_ui to
use settings_org.change_element_block_display_property function
for toggling the visibility of custom input.

We add id to the email_notification_batching_period_edit_minutes
element such that we can use change_element_block_display_property
function because it requires id of element as an argument.

This commit also removes the value attribute of the custom
input since its value was set undefined in the template
and then was set in set_notification_batching_ui, so there
is no use of keeping the value attribute in templates.

This is a prep commit for fixing the behavior of this element
in realm-level default settings.
2021-12-03 16:03:02 -08:00
Aman Agrawal c894f50f3c recent_topics: Extend persistent focus bug to all RT elements.
The bug fix for RT search, also needs to be applied to other
elements.

Fixes #19458.
2021-12-03 14:39:48 -08:00
Aman Agrawal 2eaf869949 move_topic_to_stream: Fix clipped stream select dropdown.
The stream select dropdown's height was clipped by the modal
container which resulted in the dropdown only being displayed
partially. We could either move the dropdown to under `body` or use
`position: fixed` for it be able to show outside parent container.
We go for the later option.
2021-12-03 14:38:27 -08:00
Anders Kaseorg 951b81e2bd eslint: Fix unicorn/prefer-code-point.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-03 14:33:53 -08:00
Aman Agrawal 24900ec7f8 compose: Don't fix width of send button.
Since the width of `send` text can vary based on language. We
shouldn't fix its width.
2021-12-03 14:29:26 -08:00
Aman Agrawal c7f27f6c94 compose: Fix height of GIF icon.
The GIF icon was taking more height than it was alloted to.
The height taken also varied slighly based on external factors.
This pushed other buttons out of their desired position.
2021-12-03 14:29:26 -08:00
Aman Agrawal 02053f1319 compose: Add side margin to fa-exchange icon. 2021-12-03 14:29:26 -08:00
Aman Agrawal b4c2c97ffd compose: Extract method to get compose click target. 2021-12-03 14:29:26 -08:00
Aman Agrawal 9d330365fc compose: Stop propagating clicks for compose control buttons. 2021-12-03 14:29:26 -08:00
Aman Agrawal 7af573fa45 compose: Remove unused code.
Since we don't use video button in compose control buttons
popover, this will never be reached. We can add this code again
when we add video button to the popvoer.
2021-12-03 14:29:26 -08:00
My-Name-Is-Nabil edccb79010 settings: Apply dark theme to upgrade tips.
Fixes #20431 by changing dark theme colors of upgrade tips to match
colors of other dark theme tips (with the same structure as the
existing .tip class).
2021-12-03 14:22:18 -08:00
Aman Agrawal 788bf8b32e compose: Fix overflowing `.enter_sends` text on `<375px` screens. 2021-12-02 15:11:15 -08:00
Aman Agrawal baa1b4ed1d compose: Fix angle-up icon overlapping with topic input field.
The previous calculations were based on just the cross icon.
Adjusted for the angle-up icon which is 16px in width.
2021-12-02 15:11:15 -08:00
Aman Agrawal 50f916443d compose: Fix alignment of help link. 2021-12-02 15:11:15 -08:00
Aman Agrawal a84869c078 compose: Use a ligther red for character limit exceeded text. 2021-12-02 15:11:15 -08:00
Aman Agrawal ffd9d18577 compose: Enclose hotkeys in `kbd` tag.
We change how `kdb` is displayed in dark-theme for
compose so that they don't take too much user attention
when composing.
2021-12-02 15:11:15 -08:00
Aman Agrawal 7610b33963 flatpickr: Hide bottom arrow in dark mode.
Previous change didn't hide it in dark mode since this css was
being overridden.
2021-12-02 15:11:15 -08:00
Aman Agrawal 4ed6b441c7 flatpickr: Improve look of `Confirm` button.
Change text from OK to Confirm.
Remove icon.
2021-12-02 15:11:15 -08:00
Aman Agrawal aaa7150b8a compose: Move overflowing buttons to a popover.
We don't hide popover on click for formatting buttons, emoji picker and time
picker.
Emoji and time picker popovers need a reference to be displayed,
hence we don't hide them.
Not hiding formatting buttons is based on past discussion.

The current instance of compose popover is stored locally
so that we can access it across different modules.

The basic approach for hiding / displaying a button is based on
width and is executed at `sm` breakpoint as per our
`css_variables.js`.
Used handlebars and `hide/show-sm` css class to make this
work. This avoids using too much JS to hide/display elements.
2021-12-02 15:11:15 -08:00
Aman Agrawal b5f662c646 popover_menus: Extract common onShow methods. 2021-12-02 15:11:15 -08:00
Aman Agrawal 065b905f87 compose: Slightly move send button upwards.
This may have got misaligned after my last minutes changes to
the compose refactor PR.
2021-12-02 15:11:15 -08:00
Aman Agrawal 63c3f74056 compose: Rearrange compose bottom to separate out enter sends.
* We move enter sends into its own row separate from compose
control buttons and send button. This makes sure compose control
icons don't wrap on narrow widths.

* Move char limit indicator parallel to enter sends button.

* Left align character exceeded count at bottom.
2021-12-02 15:11:15 -08:00
Aman Agrawal a64f6edc2a compose: Use loading spinner as loading indicator. 2021-12-02 15:11:15 -08:00
Aman Agrawal 25ee6a795e compose: Never hide send button.
`Press Enter to send` used to hide `Send` button, we remove that
behaviour.

We show the current state of `Enter` hotkey action via text below
`Send` button which can toggle behaviour on click.
2021-12-02 15:11:15 -08:00
somesh202 219ecea659 people: Extract helper functions for medium avatar urls.
The new is obviously parallel with the small avatar URL construction,
and allows us to deduplicate this construction between the popovers
and full user profile logic for getting a medium avatar URL.

Fixes #20140.
2021-12-02 14:56:34 -08:00