The logic to avoid first unread message with a date row to not
have an unread marker works purely based on `z-index` and seems
to be working nicely.
This avoids a bug where the background color of the date row
of the first unread message is different from others.
We show a modal if user is not allowed to resolve or unresolve
topics due to time limit. The modal just contains the text
mentioning user cannot resolve topic without stating the
count of messages that are within the time limit as we do
not recommend partial resolving of topics.
This commit does not include any changes for resolving or
unresolving topic using "Move topic" or "Move message" modals,
as we will still consider them as simple topic move and show
the same modal that is shown in general for moving message.
This will help up achieve 2 things:
* Have a lot of common CSS for drafts and scheduled messages.
* Have common JS for things like keyboard navigation between drafts
and scheduled messages.
After some discussions in CZO, it was decided that we should reduce the
increment of minutes to one because the up/down arrow isn't very helpful
at all. Most of the time, users would manual type their desired time and
micro adjust with the arrow keys if needed.
This change also solves the issue where the time picker only counts
multiples of 5s as valid time as it was tied to the increment of minutes.
Previously, `place_caret_at_end` was only used for HTMLElement with
contenteditable="true", updated it so it takes HTMLElement as
argument and use logic to place cursor at end as per type of
element passed(i.e HTMLElement or HTMLInputElement).
This commits changes the placement of "Add streams" tooltip
and "Filter streams" tooltip to "bottom" when the
"Add streams" popover menu is opened and changes its back
to "top" when the popover menu is closed.
It makes use of the "id" attribute that has been assigned
to those tooltips in commit 01e6121e5a.
Fixes: #20675.
This commit appends the "Add streams" and "Filter streams"
tooltip to "document.body". It was required to make sure
the tooltip appears at the top when space in
"Direct Messages" section was not enough (when only 1 Direct
Message was present).
This commit also removes the "tippy-zulip-tooltip" class
from tooltips or else the tooltips would have shown their
default behaviour.
This commits adds an "id" attribute to the "Add streams" and
"Filter streams" tooltip. "Add streams" tooltip has been given
the id "add_streams_tooltip" and the "Filter streams" tooltip
has been given the id "filter_streams_tooltip".
This has been done to get access of these tooltips later.
This commits combines two different "delegate" functions that
provide identical functionality by combining values of the
"target" array in the function.
exempt_from_license_number_check was initially added allowing
organizations with it enabled to invite new users above their number of
licenses.
However, an organization with this permission enabled,
cannot upgrade if they weren't on a plan already - because when choosing
Manual license management, you cannot enter a number of licenses lower
than the current seat count. However, an organization like that probably
already has some users that they get free of charge - and thus they need
to be able to enter a lower number of licenses in order to upgrade.
This removes the production reporting to `/json/report/error` upon
`blueslip.error`, and replaces it with reporting to Sentry, if
enabled. Sentry provides better reporting and grouping for exceptions
than the email- and `#errors`-reporting provided by the
`/json/report/error` endpoint.
The development behaviour of rendering `blueslip.error` messages and
stacktraces immediately, and stopping execution, is preserved.
To better chain exception information, the whole previous exception is
passed to `blueslip.error`, not just the stack, and the second
parameter is formalized to be an object to map to Sentry's "context"
concept.
If the script comes from a different origin than the requesting page,
and is not marked `crossorigin="anonymous"`, the `window.onerror`
handler receives no information other than "Script error." in the
event of a runtime error.
This effectively silences blueslip errors in development if the user
is developing on a remote host (such as a DigitalOcean droplet), since
static resources are served from `hostname.zulipdev.org`, and the
realm is served from `realmname.hostname.zulipdev.org`. It also
silenced blueslip reporting in production for any non-default (non-"")
realms. Sentry reporting, Vagrant developments, and truly ancient or
insecure browsers were unaffected.
Add the necessary `crossorigin="anonymous"` attribute to the
`<script>` tag to allow blueslip access to this error information.
Currently, we only show the "Active just now" status once a user has gone
offline within the last 2 minutes. This ends up never showing up the
threshhold which the client marks an user as user is longer than 3 minutes.
Thus deemingthe user status as useless. After a discussion on CZO, it was
decided that we should remove this status altogether as the phrasing doesn't
make sense as well.
In #25012, which was intended to only modify the buddy list, we
accidentally changed the rendering of times for several other code
paths, including recent conversations, that were using the
last_status_from_time function, whose name really suggested it only
was used for the buddy list.
Extract a new function with a better name for the more common relative
time use case.
Currently, most of the Tippy tooltips on icons in both the message feed
and the compose box have a delay, so they don't appear immediately
on hover, which can be distracting.
This commit adds this same delay to a few elements in these components
that had an inconsistent essentially 0 delay; the buttons located on the right side
of the compose box as well as the messagebox copy codeblock button tooltip.
Fixes part of #24825.
We currently use the GitHub logo to show the bots settings in both
personal and organization settings. This icon is not a correct
representation since we use have support for several different bots
including but not limited to a GitHub integration bot.
This commit replaces the GitHub logo with Smart Toy material icon
from Google, while also adding the required licencing details at
docs/THIRDPARTY.
Part of #19797.
This commit fixes the vertical alignement of globe icon in
inline_decorated_stream_name template by setting it using
relative units instead of px so that it is better aligned
at multiple places with different sizes.
This commit adds privacy icons before the stream names in
dropdown-list widget for "New user announcements",
"New stream announcements" settings and for stream dropdown
in "Move message" and "Move topic" modal.
Fixes part of #22355.
Usually when a user uses the time picker, they're most likely going to
set the time to the hour rather than the current minute. These changes
will set the minutes to zero whenever we are opening the global time
picker.
Fixes: #23874.
Improves suggestions to not include `is:resolved` for searches
that have already specified a narrow with direct messages, since
there are no topics for direct messages. And improves suggestions
for searches that already have `is:resolved` to not include options
that narrow to direct messages.
Improves suggestions to not include `group-pm-with` for searches
that have already specified a narrow for stream messages. And
improves suggestions for searches that already have `group-pm-with`
to not include options that narrow to stream messages.
With commit f0d1332ba2, we no longer need to mock `topic_list.js`
in the `topic_list_data` node test. Instead, we can pass a string
directly to that function. The default is an empty string unless
there is a search input. Also, updates the default of the zoom to
be false instead of undefined in the tests.
When in a private narrow, the "Message X" button is disabled if direct
messages are not allowed in the organisation and the current recipient
is not a bot.
Note that when the recipient is a user group with 1, more or all bots,
the button is disabled then too as such PMs are not allowed. Only when
the recipient is a single bot, then it's not disabled, as DMs with one
bot are allowed even in organisations where DMs are disabled.
This commit adds code to disable the topic input in "Move topic"
modal if user cannot edit topics as per edit_topic_policy setting.
We do not check time-based permissions here as the first message
of the object may not be available. This commit also fixes a small
typo in the comment for that code along with updating the comment
to mention about disabling topic input.
If user tries to move messages older than the allowed time limit,
we show a confirmation modal stating that the older messages will
not be moved and only the alloed messages are moved if user clicks
on "Confirm" button.
Previously, editing topic of "(no topic)" messages was allowed
irrespective of time limit or the "edit_topic_policy" setting.
Since we are working in the direction of having "no topic" messages
feel reasonable, this commit changes the code to not consider them
as a special case and topic editing restrictions apply to them as
well now like all other messages.
We still highlight the topic edit icon in recipient bar without
hovering for "no topic" messages, but it is only shown when user
has permission to edit topics.
Until now, we had been inserting a hard-coded number of new lines before
and after a quoted message. Now we replace that with an optional parameter
to make it customizable for different use cases.
This is a preparatory commit for the next commits, which will allow
inserting other elements as a block in the compose box.
Updated topics_sidebar_actions.hbs to include a option to add/remove
unmute visibility_policy for a topic is in a muted stream,
if in development environment.
Added 2 new classes sidebar-popover-unmute-topic and
sidebar-popover-remove-unmute for unmute topic option. Also, Renamed
previous sidebar-popover-unmute-topic to sidebar-popover-remove-mute.
Added 4 new click handlersthat uses
user_topics.set_user_topic_visibility_policy() to update
topic's visibility_policy.
Fixes#24244
Updated user_topics.js to include all visibility policies
rather than just mute/inherit visibility policies.
Replaced muted_topics Map with `all_user_topics` Map which has
structure: {stream_id:{topic_name:{date_updated,visibility_policy}}}.
Removed add_muted_topic, remove_muted_topic functions which were
adding/removing topics in muted_topics Map. Added new function
update_user_topics which take parameter stream_id, topic,
visibility_policy, and date_updated(optional) which adds a topic
to all_user_topics with date_updated and visibility_policy,
if visibility_policy is not equal to inherit.
else, removes topic from all_user_topics.
Added get_topic_visibility_policy which returns visibility_policy
if stream_id is not undefined else return false.
Added 2 helper functions is_topic_muted and is_topic_unmuted which
uses get_topic_visibility_policy and return true if topic is
muted and unmuted respectively else return false.
Replaced switch case statement which was using add_muted_topic
and remove_muted_topic functions in set_user_topic with new function
update_user_topics.
Fixes#24244
Removed functions mute_topic and unmute_topic in muted_topics_ui.js
which were using old API endpoints to mute/unmute topics.
In user_topics.js added new function set_user_topic_visibility_policy
which uses new API endpoint `/user_topics` to update the topic's
visibility_policy to visibility_policy passed to
set_user_topic_visibility_policy function as a parameter.
In functions toggle_topic_mute and mute_or_unmute_topic, replaced
the calls of mute_topic and unmute_topic with the new
user_topics.set_user_topic_visibility_policy function.
Added "web/src/user_topics.js" in EXEMPT_FILES in test-js-with-node
as adding function `set_user_topic_visibility_policy` resulted in
user_topics.js losing 100% test coverage.
Fixes#24244
This commit adds "Nobody" group option to system_user_groups_list in
settings_config.js. We do not allow can_remove_subscribers_group to
be set to "Nobody" group currently, but it is nice to add support
for this here since it will be used in more settings in future.
This commit refactors get_realm_user_groups_for_dropdown_list_widget
function to use "group_permission_settings" module instead of
passing variables like "allow_internet_group", etc. individually
for each settings.
We lose some test coverage due to this commit, but that would be
fixed when we add some more group-based settings and allow groups
other than system groups in the group based settings.
This commit adds a new module group_permission_settings.ts
which is used to define configuration options like
allow_owners_group, allow_nobody_group, etc. for group-based
settings similar to GroupPermissionSetting dataclass we have
in backend.
Following important changes are being made here:
* color_class lib is removed since it not used anywhere now.
* We don't need the `dark_background` class since the background
color is already adjusted based on color scheme. So, all
instances of it being used is removed.
stream_privacy template has conditions to show stream privacy icon
for all the cases, so we use it here since we also want to show
`#` icon for public streams.
Until now, lists with 3+ digit markers would have their beginnings cut off
to align with 2 digit markers. We fix that by having custom styling for
markers where we align markers only up to 2 digits, and let larger numbers
take up more space pushing the list item content forward as required to fit
the marker.
Despite the timestamp being hidden while sending the message, the link
on the timestamp (message url) was still hoverable and clickable, and
had a tooltip.
Here we disable the tooltip, but
https://github.com/zulip/zulip/issues/25069 remains open for the link
part.
At times, it might get confusing for users who are on
slow connections if their messages has not been sent
even after 5s. Including a spinner that will only show
up after 5 seconds has elapsed will keep user informed
about their slow connection.
5s is set as minimum time because showing up a spinner
before than might be distracting for users on normal
connections.
Fixes: #19328.
This commit changes behaviour of banners
in user groups panel and emoji settings panel
under organization settings.
Now banner in these panels is only
shown when user is an administrator or user
does not have permissions to perform actions
on panel.
Fixes#24157.
The flatpickr keyboard UI functions are very confusing. We previously
had a bug where typing keys that were not keyboard shortcuts or
numeric values could throw an exception due to accessing hotkey.name
when hotkey was undefined.
Fix this, and add a bundle of comments improving the documentation of
this confusing code path. Unfortunately, the implementation is still
somewhat mysterious; we leave debugging that to future work.
Fixes#24773.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
In `insert_syntax_and_focus`, we now explicitly focus the textarea
before inserting the content, rather than relying on insert() to do
this for us. A comment is added documenting the quirks of insert that
require this.
This fixes a bug where the compose box might not be focused after
inserting video call links, emojis from the picker, GIPHY gifs, and
some other buttons.
Following the issue #23380 and PR #25038, this commit changes all
occurences of `uri` into `url` in all comments, local variables,
handlebars templates (.hbs) function names and their callers in
all `.js` and `.ts` files.
When there are no operators to narrow down
the search to, pass into `deactivate()` if
we're in `recent conversations`.
If we are, it will go to `all messages`.
This is done by using `is_visible()`
function of `recent_topics_util`.
Removes undefined `time_input` from `invite_users_modal.hbs`.
The default input value for the expiration custom time limit is
not set until the "custom" option is selected from the dropdown.
Removes the undefined `csrf_input` from the same template. And
imports `csrf.ts` into `invite.js` to get the csrf token and
add it to the request data, which is the current pattern used
in other `/web/src` modules.
This commit breaks the cyclic dependency between "topic_list.js"
and "topic_list_data.js".
It achieves this by passing "search_term" generated by the
"get_topic_search_term" function to "topic_list_data.js" directly
through the function call from "topic_list.js".
This commit fixes the alignment of the `search_close` icon on devices
with a width less than $sm_min (576px) by removing a top padding
of 5px and adjusting the position to top 5px from the previous 4px.
Incresase the max number of stream topics shown when not zoomed
into the stream for more topics in the left sidebar to be a max
of 8 unread conversations and 12 when there are unreads.
This commit breaks the cyclic dependency between "top_left_corner.js"
and "unread_ui.js".
It achieves this by shifting the "animate_mention_changes" function
from "unread_ui.js" to "top_left_corner.js".
When a user opens a profile modal, the overlay is clicked
through in responsive mode, which results in unintended button/link
clicks. This commit removes the causing CSS properties
`pointer-events:none;` which was passing pointer-events to other
elements and `pointer-events:all` which is experimental and do no
effect.
This commit toggles the gear_menu on pressing the `g` keyboard hotkey,
if it's already open.
Fixes: #24417.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
On mobile, the tooltip is triggered at the same time when right
sidebar is hidden when user clicks on a user name in the buddy
list. So, `instance.reference` node no longer exists in DOM.
This commit moves the code to select option on pressing "Enter" in
dropdown_keyboard_events as we handle other "keydown" events there.
This change is done for both MultiSelectDropdownListWidget and
DropdownListWidget components.
We also remove the usage of now depreceated "keypress" event with
this change.
This commit updates the code for MultiSelectDropdownListWidget and
DropdownListWidget components to select the first option on pressing
enter when focus is on search input.
Fixes#25024.
This commit renames dropdown_focus_events function in
DropdownListWidget and MultiSelectDropdownListWidget
components to dropdown_keyboard_events, as we will be
adding other keyboard events to select an option in
this function further commits.
Updates `Filter.describe_is_operator` to use switch/case instead
of if/else and adds case for "is:resolved" narrow so that it is
not shown as invalid when used with other search narrow filters.
In commit aa002f5c6d, a handlebars template was created for empty
narrow feed messages, which removed a number of div element ids,
and updated `narrow_banner.show_empty_narrow_message` to first
empty the main empty narrow div of any previous message content.
Removes the helper function for hiding the empty narrow messages
as `narrow_banner.show_empty_narrow_message` should empty the
empty message div of any text before rendering the updated empty
narrow for the new empty narrow banner text.
Also, cleans up a missed instance of 'uri' from commit b22578f
in the same test.
This commit adds a message and link to view or create streams on
empty streams panel. It conditionally renders the message when
there is no stream to show and also when any stream
event (delete,create,subscribe) occurs.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
Fixes#21870.
The dropdown icon for direct messages is partially visible
on small screens. This was due to removing padding when the
screen size is below a certain size by media query.
The intent of the original code appears to have been to remove top
padding, so make the CSS do just that.
The vertical shifts in message body was due to the <p> tags it gets when
converted to markdown. Removing the top margin from the first <p> child
and bottom margin from the last <p> child resolves this issue as due to
those default margins in <p> tags there was vertical shifts in message
body.
Fixes: #21276.
Added type annotations to function parameters, function return
values and local variables. Added neccessary `if` statements to
enforce the objects having proper type before executing the later
operations.
An error type check in the catch block in `update_favicon`
function is added because the statement in the catch block requires
error to be a type `Error` in order to access `error.stack`.
This commit refactors the topic_menu visible check and hide logic,
since we have already migrated the popover from stream_popover.js.
This last bit of code related to topic_menu is also migrated to
popover_menus.js, and the code is refactored to use the new logic,
which is more common for the popover_menus.js system.
To hide the popover, one possible solution could be to use the
hideAll method from TippyJS. However, this could lead to
unintentional behavior for all the popovers. To prevent this, the
hide method is used for the topic_menu only.
This commit removes the use of a separate keyboard handler for
the topic_menu, as we are already using a common keyboard handler
for all Tippy popovers.
This commit migrates the topic_menu popover from stream_popover.js
to popover_menus.js. Since the data required for rendering is large,
it has been moved inside popover_menus_data.js to improve code
readability.
Getting the link of the topic for the clipboardJS inside the onMount
instance was not working with the existing method. To make it easier
to work with, a new attribute, data-clipboard-text, is added to the
'Copy link to topic' anchor tag. This allows the clipboardJS to catch
the URL. The value of data-clipboard-text is sent from popover_menus.js
to the topic_sidebar_actions template.
Fixes: #23891
This is a prep commit for migrating the topic popover to a Tippy
popover.
'elem_to_stream_id' function is used for the topic menu to find the
stream_id of the target topic menu.
In this commit we remove any explicit references to the polyfills and
replace all the color codes to the hsl() format. We also remove any
other redundant code, after testing for any regressions.
In this commit, we move the progress bar styling out of the legacy
bootstrap.css and move it to a dedicated CSS file. This is a step
forward towards the ongoing effort to remove the use of Bootstrap
from the Zulip codebase.
The new CSS file, progress_bar.css, is added to common.ts, since it
is used in both the webapp and portico pages.
Fixes#23628.
Changed the `.enter_sends` css selector for launching tippyjs popover from
`compose.hbs` because it was colliding with `.enter_sends` selector present in
`organization_user_settings_defaults.hbs`.
Before this change when an admin tried to change user realm default setting of
`enter_sends` it was opening a tippyjs popover despite being a checkbox and it
was hitting `/json/settings` endpoint instead of `/json/realm/user_setting_defaults`.
Converted `emoji.js` to TypeScript by adding relevant type definitions,
also modified `target` option in our tsconfig to 'ESNext' so that types
for object methods like `hasOwn` which is being used in `emoji.js` are
included.
This is a prep commit for typescript migration of `emoji.js`. This
commit refactors the code for generating emoji rendering details such
that we avoid writing an ugly code which will involve writing an
incomplete type object when we migrate to TypeScript.
This reverts commit 5f4bdfe6bc (#24630).
This was causing Webpack to trigger type checking with the TypeScript
compiler, which is very expensive.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit increases width of text inputs in settings, stream
settings and user group settings to be 325px, which is the
minimum width of select elements on these pages.
We now add settings_select class to custom field select elements
in "Profile" section and modal_select class to select elements in
"Manage user" modal.
The tooltip of the compose_close_button changes only when something
is typed into the input box. However, the state of the tooltip
remains the same until someone types into the input box again, even
if they close and reopen the compose box.
The function 'expand_compose_box' from 'compose_actions.js' is
called every time the compose box is opened. Since the input field
is emptied every time the compose box is closed, this function is
used to set the default tooltip for the close button. We want it to
say 'Cancel Compose' every time the compose box is opened since the
input field is always going to be empty whenever the compose box
reopens.
There are two different tooltips for compose close button
in compose box. One is when there is no text in the inputbox
that says 'Cancel compose' and if there is text in the inputbox
then it says 'Cancel compose and save draft' however the logic
of these two tooltips was reversed. This commit fixes that.
Created `WidgetConfig` type which has all the parameter that can be
passed launch(). Except html_heading, html_body, and on_click all
other fields are optional. Therefore, removed checking of undefined
mandatory fields as it will be done by typescript.
Co-authored-by: Hardik Dharmani <Ddharmani99@gmail.com>
Refactored some code as well to avoid unneccesaary `undefined`
checks in `overlays`. To be exact created an action_overlay
object of type `Overlay` such that the `reset_state` is just
`action_overlay = undefined` and having attributes like `$element`
and `close_handler`.
This would ensure that if you have an `active_overlay`, there will
be a registered `close handler` attached to it without needing to
write additional checks for `close_handler` just to satisfy type
checker.
TypeScript doesn't understand Array.prototype.slice.call; rather than dealing with the
type-checking issues around it, we remove it; it was only necessary for ancient browsers where
NodeList isn’t directly iterable.
Remove the winjs specific `getScrollbarWidth` property while we're at it;
WinJS isn't relevant anymore.
Reorders methods due to TypeScript files enforcing define-before-use when
this commit was drafted.
When referring to <div id="my-id" class="my-class">:
- my-id is an id
- #my-id is a selector
- my-class is a class name
- .my-class is a selector
When an id or a class name is interpolated into a selector, it needs
to be escaped with CSS.escape.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We expect the URL to be of stream if it is opened in right panel.
As archiving a stream extracts stream id from hash,
but while a stream is opened and we switch between `All Streams` or
`Subscribed` tabs, the url changes, causing bug in archiving the stream.
As as fix for this issue if a stream is opened in the right
panel the hash of the URL remain of the stream and doesn't update.
If it is archived then the URL updates accordingly.
Fixes#23855.
Cleans up node test to use helper functions when setting a filter
and narrow state for private messages and when checking the return
value for `pm_list_data.get_list_info`.
Also, reduces the number of users in the test by creating more
group direct message conversations.
The logic for whether one needs to scroll down to view messages sent
by the current client was incorrectly not checking whether a message
feed was visible at all.
This replaces one of the our larger remaining blocks of code with
explicit logic for message_lists.home with logic that should correct
if we support maintaining a different set of rendered message lists.
This should have identical behavior to the previous implementation
given that all_rendered_message_lists is either just
message_lists.home or that plus the current narrowed message list;
can_apply_locally() is always true for the home message list, and the
list === message_lists.current check is equivalent to the more complex
narrow_state.active() check.
Because we don't call this function with home_msg_list, I believe the
existing msg_list !== message_lists.current check would have always
been false when the new check is false, but this is more explicit
about the logical intent.
The flex-direction property for modal__content should
be set to column as we want to display the elements.
This does not affect most of the modals since they
do not have multiple direct child elements that are
visible at same time and the data-simplebar attribute
already sets the "flex-direction: column" property to
the elements where it is used.
But in the email address visibility modal on user
registration page, there are multiple direct child
elements for the "modal__content" element and we need
to set "flex-direction: column" property for them to
work correctly. We also change the width of select
element in the modal to "fit-content" to avoid it
taking the whole width even when not required.
This commit also fixes the bug in login_to_access
modal, since the `modal__content` for it also
has two direct child elements.
This PR adds a modal to warn when user unchecks a box on the "PMs,
mentions, and alerts" line of notifications panel that will result in
all notifications for private messages and mentions being disabled.
Fixes#24151.
`topic_row_top = $(topic_row).offset().top;` returns an error
while calling `topic_offset_to_visible_area` since we cannot
find the `topic_row` for some reason which doesn't seem logically
possible but we add logic to handle that case as well.
The compose send button spinner (which disables the send button while
present) was correctly hidden in both the happy case of a sent message
as well as for all locally echoed message, in both cases via
clear_compose_box to reset the compose box for a new message.
But for a message that was not locally echoed, and failed to send,
nothing hid the compose spinner, resulting in the user being unable to
attempt to resend the message.
Disabling the send button was intended to prevent sending the same
message twice in immediate succession via the enter key.
Since a13058223d, this logic duplicates
the compose_spinner_visible check inside finish(), and more
importantly, was not cleaned up correctly if the message fails to send
without having been locally echoed, resulting in the compose box not
allowing you to send further messages after such a failure.
For successfully sent messages, the disabled state was cleared by
clear_compose_box calling check_overflow_text, which unconditionally
sets the disabled state on the send button based on whether the
message is too long.
Rather than try to clean this state up in the right places, remove
this duplicate mechanism for disabling the compose box.
Earlier in recent conversations panel full name
was displayed in group PMs huddle even if the user
was muted.
This commit change the display name of such users to
`Muted Users`.
Previously, the emoji size was fixed to 20px by 20px irrespective of
whether the emojis were inside a heading or not. This looked weird when
a small emoji was rendered next to a large h1 text.
This commit fixes that by setting the emoji height to 1.4em
which proportionately increases the size of the emojis as the text size
increases for different headings.
Fixes#12857
The dropdown-menu for "Who can unsubscribe others" was not wide
enough to fit the options in stream creation form. This commit
fixes it to be wide enough to fit the options like we do in
stream edit form.
The dropdown menu for notification stream, default code block
language, etc. was not looking good for short options due to
width being set to fit-content. This commit adds min-width
property to make them look good for short options as well.
This commit removes the width property for inputs from
bootstrap.css. We have already set the width for the
specific text inputs in previous commits. For other
type of inputs (like checkbox, radio, file, etc.),
there is no need to set the width as they are hidden
or we already set width for them.
This is a part of bootstrap removal project.
This commit adds width property CSS rule for text inputs in
integrations_dev_panel.css to 206px, as we are going to remove
the bootstrap CSS rule which sets width in further commits.
This commit adds width property CSS rule for text inputs
in billing.css to 206px, as we are going to remove the
bootstrap CSS rule which sets width to 206px in further
commits.
This commit adds width property CSS rule for text
inputs in activity.css to 206px, as we are going to
remove the bootstrap CSS rule which sets width to
206px in further commits.
This commit adds CSS to set width of text inputs in
poll and todo widgets to 206px as we will be removing
the bootstrap CSS rule which sets width of inputs to
206px in further commits.
This commit adds width property to CSS for "#inline_topic_edit"
element in zulip.css to set it to 206px, as we will be removing
the bootstrap CSS for it in further commits.
This commit adds settings_text_input class to text inputs in
settings, stream settings and user group settings pages. This
class is used to set the width of inputs to 206px, as we will
be removing the boostrap rule which sets width of the input
in further commits.
This commit adds modal_text_input class to text inputs
in modals to set width of them as set by bootstrap.
This class is used to set the width of inputs to 206px,
as we will be removing the boostrap rule which sets width
of the input in further commits.
This commit increases the width of url field, displayed for
custom external account type fields, in edit profile field
form. The width of the input is increased as urls are generally
long enough and did not fit in the width set previously in most
cases. We increase the width to match the width in add custom
profile field form.
This commit converts "portico/team.js" to TypeScript as well
as adds the required type definitions.
Some values were extracted into variables for type-checking.
The `tab_name` parameter is supposed to ensure that if you're looking
at a tab for repository that's not zulip/zulip, that the GitHub links
for authors without an associated GitHub username goes to the commits
for that repository.
This also fixes the color on these icons in the stream-specific rows
of the notification settings table.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
For some reason, browser is treating clicking on the button as
submitting the form, which results in the page getting redirected
to the same page with an additional empty query `?` in the URL.
In previous commits, we updated the realm creation flow to show
the realm name, type and subdomain fields in the first form
when asking for the email of the user. This commit updates the
user registration form to show the already filled realm details
as non-editable text and there is also a button to edit the
realm details before registration.
We also update the sub-heading for user registration form as
mentioned in the issue.
Fixes part of #24307.
We now show inputs for realm details like name, type and URL
in the create_realm.html template opened for "/new" url and
these information will be stored in PreregistrationRealm
objects in further commits.
We add a new class RealmDetailsForm in forms.py for this
such that it is used as a base class for RealmCreationForm
and we define RealmDetailsForm such that we can use it as
a subclass for RegistrationForm as well to avoid duplication.
This commit updates the ID for form element in create_realm.html
to "create_realm" as we would need to update the error handling
for this page in further commits and we do not want to break it
for other forms using "send_confirm" as ID.
Uptil now, 1 new line was added before and 1 after a quoted message. Now
for more breathing room around a quoted message, new lines are inserted
to space it from any content before and after by at least 2 new lines.
Fixes: #23608.
Forms using upload widget were using the
same css for image preview.
We fix this by assigning a class to the
widget and applying specific styles to it.
Previously, there is a bug where the position of the typeahead is off
whenever the user switches from stream typeahead to topic typeahead
in the compose box. The typeahead header was not hidden before
calculation of the position based on container height. These changes
will include the header before calculating for the position.
Previously this was only available on the upgrade page - meaning an
organization that already bought a plan wouldn't be able to request a
sponsorship to get a discount or such, even if qualified.
Added a width for the Change Email and Password dialogs at
sm_min (576px) and ml_min (425px) to make them more responsive
on narrow screens.
Fixes: #24339.
This bug made it impossible to scrub realms where the string_id was a
number, e.g. 123.zulipchat.com because
confirmed_string_id === actual_string_id comparison failed due to one
being a string and the other a number.
Per http://api.jquery.com/data/#data-html5:
Every attempt is made to convert the attribute's string value to a
JavaScript value (this includes booleans, numbers, objects, arrays, and
null).
To retrieve a data-* attribute value as an unconverted string, use the
attr() method.