Creates an incoming webhook integration for Patreon. The main
use case is getting notifications when new patrons sign up.
Fixes#18321.
Co-authored-by: Hari Prashant Bhimaraju <haripb01@gmail.com>
Co-authored-by: Sudipto Mondal <sudipto.mondal1997@gmail.com>
Clients like mobile add "-medium.png" to the url to get the
medium avatar if the avatar_url field of user object is set
to some string other than the gravatar URL.
This commit adds a symlink to offer the unknown user avatar at
unknown-user-avatar-medium.png as well so that mobile clients
can correctly render the medium avatars for inaccessible users.
Fixes#28071.
If the request's `Accept:` header signals a preference for serving
images over text, return an image representing the 404/403 instead of
serving a `text/html` response.
Fixes: #23739.
Documents new wildcard mention for topic participants updating
and making tweaks to all relevant pages.
Fixes#27657.
Co-authored-by: Alya Abbott <alya@zulip.com>
- Documents wildcard mentions (`@all`, `@everyone`, `@stream`),
linking to /help/mention-a-user-or-group#mention-everyone-on-a-stream
from the intro text.
Fixes#25783.
- Adds a new page under the "Reading messages" section documenting
the Inbox view on mobile.
- Adds Inbox, expand more, and expand less SVG mobile icons.
- Cross-links with "Recent conversations" and "All messages".
Updates the Asana documentation, which was a detailed version
of the Zapier documentation with screenshots specifically for
Asana, to instead start with the basic incoming webhook steps
and then point to the general Zapier documentation to complete
the integration.
This will be easier to maintain moving forward in the short
term as ideally we'll migrate to a system that documents all
of the integrations with Zulip that are available via Zapier.
Also, updates the current Zapier documentation to mention
Asana as one of the apps that can be integrated with Zulip.
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
`#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.
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>
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>
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.
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.
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.
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.
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.
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.
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>
The implementation of the emoji sorter relies on the presence of the
"is_realm_emoji" property. We want to be consistent with this
assumption.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This avoids the type narrowing problem when we call "is_unicode_emoji"
on an emoji object and access "emoji.emoji_code", which might be
"undefined".
In places where these helpers are accessed, we expect that
"reaction_type" is always present so that we can later correctly type
narrow Emoji into UnicodeEmoji. This updates the test cases to
respect that.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
"get_item"'s default value is not type-safe as we require its return
value to always be a "string". Note that since the mobile app does not
rely on this function directly, it is sufficient to only refactor the web
app for this transition.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
The loading message that occurs at the top of the narrow when first
loading the Zulip app (posted to the right of the centered Z spinner)
looked misaligned on smaller screen devices.
We fix this by just removing the 'Loading...' message, since the text
was unnecessary to communicate the idea that we're loading content.
(The text was also missing translation tags).
We add a box shadow at top of the recipient bar to hide message
text that are partially visible above the recipient bar. At 100%
zoom, this issue is not visible but it has been reported by a user
at 150% zoom.
Following this change we don't need to do change any of our JS
calculations since `y` position of header remains the same
and when determining if a header `is_sticky` that is the only
thing we verify.
The "hotkey-hint" class name used internally in
d66f2d900f conflicted with the
preexisting class name for hotkey hints into popovers, introduced in
80ff3d8da5.
Given that the new class is for a styling of hotkey hints designed for
use in tooltips, it was a bad name anyway, so just rename it to
tooltip-hotkey-hint. We rename the related cluster of variable names
to match this.
This is a follow up to 875ad8e implementing a better approach. We call
`cursor_at_start_of_whitespace_in_compose` from `focus_in_empty_compose`
itself if and when needed.
This commit adds code to live-update the inline-topic edit
icon on changing move_messages_within_stream_limit_seconds
or edit_topic_policy. We simply rerender the message list
as it becomes difficult to check for each recipient row
and update it because topic edit permission depends on
when the message was sent.
This also live-updates the resolve topic icon as it depends
on topic edit permission only.
This commit adds dropdown for move_messages_between_streams_limit_seconds
setting which is used to control for how long the user is allowed to
edit stream.