Commit Graph

14831 Commits

Author SHA1 Message Date
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00
Hemant Umre be0098146c
settings: Sort Uploaded files with newest on top.
When a user opens the [Setting > Uploaded files] initially in the
'Data Uploaded' column, files are sorted from oldest to newest.
Instead, sorting this panel from newest to oldest. Because it's
more likely that the user is interested in their recently uploaded
files, e.g. if they uploaded something by accident.

Fixes #23737.
2023-02-23 15:56:50 -08:00
Sahil Batra 8316bad108 user_profile: Show icons for external account fields in full modal.
Previously, we showed the icons for "Twitter" and "Github" type
external account custom profile fields in the user-info popover.
This commit changes the code to show the icons in full profile
modal as well.
2023-02-23 15:45:26 -08:00
David Rosa 295b49e487 help: Document how to change the language of the mobile app. 2023-02-23 15:04:38 -08:00
Aman Agrawal 8946e9eaa5 css: Change look of date and time in message list.
Fixes #21752.
2023-02-23 14:38:33 -08:00
Aman Agrawal 659ad1544b message_edit_history: Center align date. 2023-02-23 14:30:20 -08:00
Joseph Hughes 90ace319d5 message_feed_ui: Right align date separators.
Align the date separators in the message feed with the timestamps so
that all date information is easier to read top-down.
2023-02-23 14:30:20 -08:00
Joseph Hughes d9874b1e2d message_feed_ui: Increase contrast on msg divider elements.
Increase contrast on date dividers, msg times and sub/unsub msg.
Some text in the message feed UI has been percieved as too dimmed.
This commit aims to increase the contrast on some elements to
counter this. Remove border-top from date-divider so that the line
is of 1px.
2023-02-23 14:30:20 -08:00
Joseph Hughes b746823e2e message_feed_ui: Remove group date dividers.
This commit removes the group date dividers from the message feed UI,
leaving only the dividers between individual messages. These are
considered unecessary as the recipient bar displays the date.

The change concerns message_list_view.js along with the templates
message_group.hbs and recipient_row.hbs.

Fixes #22966.
2023-02-23 14:30:20 -08:00
Joseph Hughes 8cf2a1df6b message_feed_ui: Remove previous date from date separators.
This commit updates the date row between messages and message
groups, removing the date of the previous message along with
the down arrow for the next message.

The goal of this commit is to declutter the message feed UI
as part of the redesign.

The change concerns the render functions in
timerender.js along with the files that reference these.

Fixes: #22967.
2023-02-23 14:30:20 -08:00
Aman Agrawal 343536d4bc css: Remove blue color, underline and transition effect from msg time.
This looks most likely a regression. Added `.messagebox-content`
to move priority of color set by us on `.messsage_time` above others.
2023-02-23 14:30:20 -08:00
Aman Agrawal 5a3d3f5303 css: Use variables for colors used to display message time.
This makes color changes easy to review and maintain in the
codebase.

This is also an attempt towards removing dark_theme.css
as we will only need to override color variables for these
elements in `body.dark-theme` in zulip.css without need of
overriding colors for any specific elements.
2023-02-23 14:30:19 -08:00
Anders Kaseorg ed069ebe0e docs: Remove spaces before commas.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-22 17:17:25 -08:00
evykassirer 541d3ffa06 compose: Replace empty message banner with red outline for compose box.
Previously, we showed an empty message banner if the user tried
to send an empty message. We only showed it for users with
"ctrl+enter to send" because we thought it might be easy for a
user to press just enter accidentally.

However, this missed the case where the user clicks on the Enter
button. We want to show the user something in this case to tell
them that they're missing message content.

To avoid more complicated logic, this PR removes the banner
completely and changes the compose box border to red if the
user tries to send an empty message (for all cases).

The red line goes away as soon as the composebox has non-whitespace
characters.
2023-02-22 17:15:18 -08:00
Tim Abbott 631ca13428 Revert "typeahead: Fix bug where typeahead showed momentarily on shift + tab."
This reverts commit 9def249af1.

This broke the '>' typeahead.
2023-02-22 17:07:06 -08:00
Sahil Batra 416c7c2199 user_groups: Add require_system_group parameter.
This commit adds require_system_group parameter to
get_realm_user_groups_for_dropdown_list_widget.
We currently pass this parameter as "true" always,
but this will be needed in future when we will allow
to set groups other than system groups in settings.
2023-02-22 12:17:46 -08:00
Hemant Umre 2e2b4f5325 stream_settings: Fix Announce stream disables unexpectedly.
While switching from a private stream in the stream editing UI to
the stream creation UI, Announce stream becomes disabled. The state
of Announce stream option should not be affected by where the create
stream UI is opened.

Made the privacy_type selector more specific since it was also
selecting the last opened stream privacy type.

Fixes: #24238.
2023-02-22 11:53:26 -08:00
Mateusz Mandera 8ef889f392 presence: Use server-provided params in the webapp.
As of the previous commit, the server provides these parameters in
page_params. The defaults match the values hard-coded in the webapp so
far - so get rid of the hard-coded values in favor of taking them from
page_params.
2023-02-21 12:10:43 -08:00
Sahil Batra 33d06af6c2 user_profile: Deduplicate code for showing custom profile fields.
This commit deduplicates template code for showing custom profile
fields in user info popover and full profile modal by extracting
it in a new file and then using that template file to render
the fields in user info popover and full profile modal.

This commit does not change the design or behavior and they are
same as before.
2023-02-21 10:19:47 -08:00
Sahil Batra ca70089842 settings: Fix disabled select elements in modal.
The background-color and opacity is same for all
select elements in modals and settings in disabled
state, but due to the background of modal being
bright enough, the select element in modals would
not look disabled.

One possible solution could have been to set
"opacity: 1" but that changes opacity for text too
and makes it darker which is not the case for other
select elements.

So instead made the background slightly darker for
select elements inside the modal using hsla property.
It might not be exact same as the other select elements,
but it is still better than the previous behavior.

For role element in bot edit form, we used to set
opacity to 1 to fix this bug, and this commit removes
it as we have fixed it for all modals in general
2023-02-20 16:28:41 -08:00
Sahil Batra 1c055f402d settings: Add bootstrap-focus-style to select elements.
The class "bootstrap-focus-style" was not added to some
select elements in modals and this commit adds those.
2023-02-20 16:28:41 -08:00
Sahil Batra 27d2ac1e37 settings: Remove some duplicate CSS.
Since we added settings_select class to select elements
in both stream settings and user or realm settings in
previous commits, we can have common CSS defined at only
one place.
2023-02-20 16:28:41 -08:00
Sahil Batra c6ff8f0551 modals: Add modal_select class to select elements.
This commit adds modal_select class to select elements in
modals, such that we can add CSS using this class and not
using "select" as selector so that we can easily add a
select element in future with different CSS if needed.
2023-02-20 16:28:41 -08:00
Sahil Batra 6bd650bc9f stream_settings: Add settings_select class to select elements.
This commit adds settings_select class to select elements in
stream settings, such that we can add CSS using this class and
not using "select" as selector so that we can easily add a select
element in future with different CSS if needed.
2023-02-20 16:28:41 -08:00
Sahil Batra 1afc730da7 settings: Add settings_select class to select elements.
This commit adds settings_select class to select elements in
user and organization settings, such that we can add CSS
using this class and not using "select" as selector so that
we can easily add a select element in future with different
CSS if needed.
2023-02-20 16:28:41 -08:00
Sahil Singh 183f5016a1 settings: Indicate character limit on restoring long draft messages.
Currently, when restoring drafts with long
messages no character limit or the compose
banner is shown.

We fix this by adding a check for text
overflow whenever any draft is restored.
2023-02-20 16:23:08 -08:00
Aman Agrawal 845e873c44 narrow_state: Add function to check if message feed is visible.
We directly check if message feed is visible in the code instead
of indirectly checking so via recent topics. This helps read the
code clearly and would be helpful with the upcoming inbox view.
2023-02-20 13:08:42 -08:00
Aman Agrawal cc96be2bf9 recent_conversation: Delegate profile click handling to `body`.
`#recent_topics_table` may not be present in the DOM when
this click handler is initialized which can cause this
it to not work, delegating it to body ensures it will always work.
2023-02-20 13:04:13 -08:00
Aman Agrawal 4debef64e7 recent_conversation: Move click handlers out to an initialize function.
We are moving in the direction of removing click_handlers library.
2023-02-20 13:04:13 -08:00
Aman Agrawal 6e6fb47e20 muted_topics_ui: Extract mute_or_unmuted_topics. 2023-02-20 13:04:13 -08:00
Alex Vandiver 93e78ea72f spectators: Save a redirect to /register/. 2023-02-20 12:21:33 -08:00
Anders Kaseorg 99f1d08786 styles: Hoist @keyframes to top level.
This has always been in the global namespace.  Pretending that it’s
scoped when it isn’t and giving it a short name will lead to
confusion.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-20 12:10:18 -08:00
Anders Kaseorg f99cff0735 styles: Fix flatpickr dark theme in automatic mode.
Flatpickr had been unconditionally using the light theme in automatic
color scheme mode; this fixes it to follow the system preference like
the rest of the app.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-20 12:09:52 -08:00
Alex Vandiver 5d0d0ba4a9 static: Replace handlebars static images with their require'd versions. 2023-02-14 17:17:06 -05:00
Alex Vandiver e0a7658db7 ts: Pull in static assets via import. 2023-02-14 17:17:06 -05:00
Alex Vandiver ea2a0a7632 js: Pull in static assets via import. 2023-02-14 17:17:06 -05:00
Alex Vandiver 1f47d7793d landing-page: Stop relying on image paths. 2023-02-14 17:17:06 -05:00
Alex Vandiver 10b1e11410 styles: Remove unnecessary ../static/ in image path. 2023-02-14 17:17:06 -05:00
Alex Vandiver ab9f974f48 emoji_settings: Stop using the avatar as placeholder; it is never seen.
The design of this element was changed midway through #22504, and
despite a separate placeholder icon using used, the preview was still
reset to the default avatar -- but is always hidden when so set.
2023-02-14 17:17:06 -05:00
Anders Kaseorg 4cd847ac44 styles: Fix horizontal SimpleBar height for SimpleBar 6.
030b89b94e

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-13 15:45:12 -08:00
David Rosa 2b9b0acaa4 help: Update URL references to new "Configure email visibility" page. 2023-02-10 18:15:56 -08:00
Sahil Batra 9d1dc20e6e settings: Remove realm-level email_address_visibility setting.
This was replaced by the new user-level version in recent commits.

Fixes #20035.
Fixes #18149.
2023-02-10 17:40:33 -08:00
Sahil Batra f4065b587b settings: Add dropdown for email_address_visibility setting.
This commit adds dropdown for user-level and realm-level
default of email address visibility setting.
2023-02-10 17:35:50 -08:00
Sahil Batra b84885184e settings: Use user-level email_address_visibility setting in UI.
This commit basically updates the frontend code to directly use
delivery_email field instead of functions like show_email or
email_for_user_settings at places where we want to show email.
We can do this change since we recently updated the server code
to always pass "delivery_email" code in the user objects with its
value being null if the real email is not accessible.

Showing email or "hidden" or nothing at various places in UI like
in users list, subscriber list, user profile popover and modal is
same as before.

Major points -

- Removed show_email and email_for_user_settings functions since we
directly use delivery_email field now as explained above.

- While sorting by emails in the users list, users with real emails
hidden are always shown in last when sorting alphabetically and at
the top when sorting reverse alphabetically. Also, those users with
real emails hidden, are sorted by name among themselves. As we did
before, we do not allow sorting by email when all emails are hidden.

- There is no change in typeahead behavior at this point. We either
hide the email completely or show the real or fake email based on
user level setting.

- Added code to handle delivery_email events and appropriately add/remove
delivery_email field from person objects.
2023-02-10 17:35:50 -08:00
Ujjawal Modi a2bcf3a77c css: Use span rather than div for status_emoji elements.
These being possibly `display: block` in some settings resulted in
them taking up visible space oddly if the asset failed to load.

tabbott could not reproduce the original bug, perhaps because changes
in the emoji CSS do `display: inline-block` on div.emoji, but the
logical intent for this component suggests it should be a span in any
case.

Fixes #23516.
2023-02-10 17:29:24 -08:00
Tim Abbott 29c6b4b9f2 recent topics: Fix exception displaying PMs with 5+ senders.
The previous logic incorrectly tried to map elements of the list of
user IDs beyond 4 senders to their `.id` fields, which were undefined;
the correct thing to do is just use the list of user IDs that we
already have.
2023-02-10 17:16:20 -08:00
Aman Agrawal 39255a5ed0 portico_signin: Fix content wrapping too much.
Due to `max-width: min-content` being used and `min-width: max-content`
not being applied since it is not present outside of development
environment, the text wrapped after every word.

The intention of this CSS was to restrict the max-width of the
`white-box` and I think 800px is a good max-width after which
content should wrap.
2023-02-10 15:58:04 -08:00
David Rosa 3254023fa3 help: Update URLs to match "Restrict message editing and deletion" title.
Updates all references to the new URL and adds a URL redirect.

Follow up to #24329.
2023-02-10 15:56:16 -08:00
Lauryn Menard 1ddc27d91b pm-list-data: Remove unused `is_all_privates` function.
In commit 6f9e97921, the last use of `pm_list_data.is_all_privates`
was removed when we restructured how private messages are shown
in the left sidebar. Removes the function since it is now no longer
relevant.
2023-02-10 10:38:55 -08:00
Zixuan James Li 53aa3f6c71 typeahead: Add typescript type definitions for typeahead.
This allows us to import typeahead from people.ts with types. This is
possible since #22586 was merged.

And since "sort_emojis" is always supposed to be called with valid emoji
objects that have "reaction_type" with an optional "emoji_code", we add
a check before we see if the emoji is popular to avoid poking
popular_set with an undefined value.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-02-09 16:51:40 -08:00