This commit refactors the code in settings_display.js
by modifying the functions to receive the container
element and settings object as parameter such that
we can use the same functions for realm-level
settings by passing appropriate container element
and settings object.
This change is needed as settings_display will be
used as a common module for user settings and realm
level settings.
We also rename the default_language_name variable in
settings_display to user_default_language_name as we
would add a separate variable for realm-level setting
in future.
We want the saving indicator to be sticky in the cases
where we ask user to reload after changing settings.
This used to work correctly before 9e08c6db93, as
'if(remove_after)' returned false if remove_after was
null, but the condition was changed in 9e08c6db93
to 'if(remove_after !== undefined)' and thus the
condition returned true when remove_after was null.
This commit change the remove_after value to undefined
for sticky cases.
The previous phrasing used incorrect terminology (E.g. "stream
members", not "stream subscribers", which is really confusing given
that we have a "member" role which is also relevant in this text).
This block didn't work consistently across .night-mode and
.color-scheme-automatic classes, and the default style for
this field already works for the day and night themes both.
We add postcss-import for night_mode.css only. This plugin inlines
the imports of external files, instead of letting the file go via
our usual webpack toolchain.
We do this so that we can use the postcss-prefixwrap plugin to scope
the third-party CSS properly and use it inside our night-mode class.
Fixes#10607.
[anders@zulip.com: Replace postcss-wrap with postcss-prefixwrap.]
Co-authored-by: Anders Kaseorg <anders@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit changes the settings_display.js code to reference the
user_setings object using settings_object variable. This will help
to easily use the same code for realm-level defaults where instead
of user_settings realm_user_settings_defaults object will be used.
Instead of passing user settings directly as user_settings
variable to the settings templates, we pass them using
settings_object variable.
This change is important so that we can use the exisiting
display_settings and notification_settings template for
realm-level default settings by passing realm-level
settings using settings_source variable.
We would have the UI for default language and time settign only for
user settings for now and not for realm-level settings because we
still need to migrate the backend to support the new model and will
be done in further commits.
We need to show the stream-specific notification settings only in
user notification settings and not for realm-level default settings.
This commit is a prep commit and adds a condition to make sure that
stream-specific settings are shown only for user-settings.
This commit splites email notification settings in two
parts - one with heading "Email message notifications"
containing batchning period, message-content and
organization-name settings and the other with heading
"Other emails" containing login, digest and marketing
emails settings.
Fixes#19717.
We remove the 'Other notification settings' heading and increase the
font size of 'Desktop message notifications' and 'Mobile message
notifications' headings as these are now on the same level with
'Notification triggers' heading.
We also add status elements to show saving indicator along the mobile,
desktop and email headings which was previously shown with the
"Other notification settings" heading.
This commit renames 'desktop' and 'mobile' headings in
notification settings UI to 'desktop message notifications'
and 'mobile message notifications' respectively.
This commit changes the behavior of how we show
animated emojis in the buddy list. We now show still
image of animated emoji and when hovered show the
animated emoji.
Fixes#19521
This commit displays a banner at the top for demo orgs letting the
user know that the org will be automatically deleted in the
specified number of days. The alerts are prioritized as follows:
- If there are <=7 days left till deletion, the alert is prioritized
above desktop notification queries and is colored red.
- If there are more then 7 days left till deletion, the alert is
prioritized below desktop notification queries.
This is a part of #19523.
This commit increases the width of message edit and delete limit
dropdowns to 325px to make them consistent with most of the other
settings in the page and also such that there is enough space
for all options in German translation.
We change the label of various organization settings
to specify moderators.
Labels for 'admins only', 'admins and moderators'
and 'nobody' are still same.
The updated labels are -
- 'Admins, moderators and full members'
- 'Admins, moderators and members'
- 'Admins, moderators, members and guests'
These options will be replaced by user groups in
future but this is an intermediate fix.
Fixes#19562.
We can use this format to display text in plural form or not based
on a number. This helps translators easily translate text and
users get a better formatted text.
We are renaming stream to stream_name in formatted draft object
just to be more explicit and be clear that we are storing that
stream name in this variable.
This commit changes snapshot_message to store stream_id for
drafts along with stream names. The stream_id field is
undefined if draft is for empty or invalid stream name.
After this change:
- If draft has a valid stream_id stored and it maps to
a stream, then we display the stream name from the
obtained stream object.
- If draft.stream_id is undefined or doesn't map to a stream,
then we display the name stored in draft.stream, which can
be invalid (no stream of this name existed ever), can be
empty and can also be name of a deactivated stream.
This change helps us to show correct stream-name for drafts
in case of renaming a stream.
Fixes#15155.
Along with the extraction, we do some simplifications of inserting
text in compose too. This same function can now be used in
compose formatting popover too.
We use "text-field-edit", which has good cross-browser `undo` /
`redo` support, to do the text replace for us instead of writing
that logic ourselves.
There is a bug when multiple message edit forms are opened at the
same time where undefined value of stream_id is sent to the server.
This happens because a global variable stream_widget is used to get
the id of stream selected in dropdown and value of stream_widget
variable keeps on changing when we open multiple message edit forms.
Thus, stream_widget can have the dropdown widget of already closed
edit form resulting in undefined value of stream id.
This commit changes the save_message_row_edit function to access
the dropdown element directly using message id instead of using
stream_widget.value() and thus we always use the correct dropdown
element to get the stream id.
We also move the stream_widget variable to be inside edit_message
function instead of being global variable for the module.
Fixes#19663.
Before this commit, the message or any draft is deleted as soon
as the compose box is closed. So, it removes that by removing
delete_active_drafts and instead this commit will add the deletion
process of drafts in reify_message_id that is called when a
message is successfully sent and received.
Now, see there are two types of messages, one that are locally
echoed and the second ones are that aren't locally echoed but
sent directly to server. This commit only saves the message in
draft if it is locally echoed as they are the only messages
that show message failed in message list. The non locally echoed
ones aren't remove from the compose box until they are
successfully sent. Now as the draft-id is stored in the message
data for locally echoed messages, as they are echoed from the
server, they are deleted using that draft-id.
This also adds node tests for echo reify_message_id for testing
this feature that this commit is adding.
Fixes#17697
Since, the filter button is replaced with a different button
after click, the `current_focus_elem` points at incorrect
element. `revive_current_focus` follows a good
method to locate the filter button, hence
we use it to correct the element `current_focus_elem` points at.
This commit fixes the live update of notification sound
setting dropdown. We already update the notification sound
source to play the correct sound after changing the setting.
We set the class name to be same as the one used in move topic
to stream popover so that a single class can be used to control
the look of both dropdowns.
Extracted by tabbott from the original pull request, with additional
changes to document the surprising margin-top in our current
implementation and avoid a bit of unnecessary CSS.
On our Markdown help docs, ordered lists that aren't encapsulated
in tabs don't have custom CSS that tells them how to display
themselves with proper indentation. An example of a doc that has
this issue is /help/saml-authentication. This commit adds some CSS
that targets such ordered lists.
This will be used to check if the narrow being requested by
spectator requires authentication without requesting the server.
Having this check locally, makes this process look snappy to
the user and doesn't result in 404s in the browser log.
For spectators, without sending any request to the server,
check locally if the hash requires authentication or which
shows a feature that requires authentication;
if it does, we show login_to_access modal to the user.
We will use this modal for any narrow / hash or other UI element that
requires an actual account to use, to provide something reasonable to
occur when a user clicks on those things.
We ideally will also add a /help/ page explaining these with an
example, but it seems appropriate to make the labels frame it around
what sort of emails we actually intend to send (newsletters with
updates about Zulip, not a "drip campaign").
It’s not helpful for the browser to substitute another font for the
icon font while it’s loading.
This suppresses a warning from the Lighthouse performance analyzer.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We rename class of notification settings except checkboxes
by prefixing them with 'setting_' for clarity.
We do not change class of checkboxes because settings_checkbox
is used by other templates also and if we only change class
of those using notification_settings_checkboxes then live
update code will break and will need to add separate condition
for differentiating between which partial template is used.
This is a prep commit for adding UI for realm-level defaults
of user settings.
This commit renames notification-sound-audio element to
user-notification-sound-audio because we will be adding similar
element for realm-level default of user settings also.
We also change the child elements to have current id as their
class for the same reason.
This commit adds prefix paramter with value "user_" to the
settings_checkbox and notification_settings_checkboxes references
in notification_settings.hbs such that ids are unique when we use
notification_settings.hbs for realm-level settings UI.
This commit creates a new template user_notification_settings.hbs
for user notification settings and notification_settings.hbs will
be used as a common template for user-level and realm-level
settings.
This is a prep commit for adding UI for realm-level default
of user settings. We refactor the code to use classes
instead of ids such that we can use the common code for the
new settings.
This commit refactors change_display_setting function to accept
url as a paramter instead of directly using '/json/settings'
such that we can use the same function for realm-level settings.
This commit refactors change_display_setting function to
accept container element as a paramter and then determine
the correct status element from it. This is the prep commit
for adding realm-level default settings UI.
We add a prefix to id of default_language_modal.hbs
such that we can use the same code for user settings
and realm-level settings.
We also add a class "default_language_modal" to the
modal div to avoid duplicate css.
This commit adds prefix paramter with value "user_" to the
settings_checkbox references in display_settings.hbs such
that ids are unique when we use display_settings.hbs for
realm-level settings UI.
This commit creates a new template user_display_settings.hbs
for user display settings and display_settings.hbs will be
used as a common template for user-level and realm-level
settings.
This is a prep commit for adding UI for realm-level
default of user settings. We refactor the code to use
classes instead of ids such that we can use the common
code for the new settings.
We were using incorrect element as we changed the input from
select to radio buttons in 439bc2920a.
This code was originally added in 6cb03ea78e (though in a
different file) and was removed from sometime and then added
again in e7311cdf5d. But in the meantime the input was
changed to radio, which resulted in incorrect code.
We were using emojiset_spinner element in destroy_indicator, but
there is no such element and emoji-settings-status element is used
in make_indicator, so destroy_indicator should also use the same
element.
This was added originally in 6cb03ea78e (though in a different
file) and was removed for sometime and then readded in e7311cdf5d.
But between these two commits, the setting was changed to be a
radio element and thus the spinner elements were also changed.
On mobile, when the sidebar is toggled, the following three issues
are encountered:
- When none of the sidebar menus are expanded, the sidebar has no
scrollbar, which is expected. But if you scroll, the background
content scrolls, which is a bug.
- When some of the sidebar menus are expanded such that the content
overflows and is "scrollable", once you get to the end of the
sidebar content, the background content keeps scrolling in a weird
way.
- If the mobile screen is wide enough, if you scroll the sidebar
content, it scrolls as expected. But if you move the pointer to
the side of the background content that is still visible, you
can scroll the background content even though it should be fixed.
This commit fixes all of the above issues.
This commit updates both the stream-level and realm-level message
retention setting to use 'unlimited' instead of 'forever' to set
message retention setting to "retain messages forever".
Earlier copy to the link present above the composebox (which
appears when a message is sent outside the current narrow), it
used to provide the link to the home page which is fixed now.
Now, copy to the link gives the link of the narrow where message
is sent.
When one resizes the window and tries to switch to the vertical
sidebar menu, the CSS transition flickers in and out. This is
less than ideal.
This commit implements a solution to this problem. The solution is
inspired by the following helpful article:
https://ishadeed.com/article/layout-flickering/
We found a bug in our top-level nav on certain Samsung phones where
tapping on the dropdowns didn't do anything. As it turns out, trying
to figure out whether touch is enabled on a device using CSS media
queries such as `(hover: none)` is very tricky business! While it
may work on some devices, it may break spectacularly on others.
This commit presents a potential solution to this. Media queries
about widths are a lot more device-independent than hover media
queries. So, this is what we do now:
- We fire click events regardless of whether the top-level nav is in
the vertical sidebar orientation or the horizontal orientation.
Since we are no longer dependent on hover media queries for click
events, this fixes the mobile bug mentioned above because taps or
clicks will always work regardless of device.
- The mouseover/mouseout events are only fired when the header is
in the horizontal orientation and the primary input mechanism
supports hovering over elements. This allows us to support hovering
over menus on desktop. However, since mouseout/mouseover events are
irrelevant for mobile, we are fine on that front since clicks/taps
will still work.
NOTE that the above approach also takes care of weird edge cases where
you have a horizontal orientation on a device such as the iPad Pro that
is flipped in the horizontal position. Since clicks work anyway, these
edge cases are largely taken care of.
Right now, some of our horizontally spaced out top-level dropdowns
(such as "Solutions") get truncated on screen widths less than
1024 px. We switch to the vertical sidebar menu at widths less than
686px.
Looking at a lot of mainstream websites, a few of them switch to a
vertical sidebar menu on much wider widths than we do. Plus,
switching to a vertical orientation is a much cleaner way to fix
this issue than playing around with legacy Bootstrap code. Therefore,
we should toggle on the sidebar menu at width <= 1024px.
Commit 9049fb3bd4 (#19176) broke these
by changing {page_params} to {...page_params}. We could change it
back, but it’s better to be explicit about which items we use from
page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit makes the compose.update_fade as an exported
function and adds the listener to update the fade manually
as deleting the pill was not calling this functions.
Fixes#18865
We want to avoid passing opaque messages around to
low-level functions that only need certain fields.
This sets us up to handle mark-as-unread messages
that aren't necessarily full messages.
We only care about ~8 fields from a Zulip message
when we're tracking unread counts. For example, we
don't care about the "content" field. This also sets
us up to pull up the "display_recipient" logic in an
upcoming commit.
We rework the landing page for companies in the same way we've
recently revamped the landing pages for other use cases.
This implementation unfortunately duplicates a lot of content from
/plans; we should clean that up at some point.
This reverts commit 1965584eec.
This syntax has a bad interaction with table syntax and needs to be
rethought.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The call-to-action ("Experience Zulip today!") section on our
landing page has a lot of superfluous margin around it that takes
up a lot of space. This commit decreases that margin as a part of
our efforts to restructure the bottom nav in general.
We recently added a lot of new pages to our top navigation and
restructured top-navigation in general. This commit updates the
footer to reflect the recent changes to our top navigation.
'corporate_enabled', 'realm_push_notifications_enabled'
and 'realm_digest_emails_enabled' settings are part of
page_params and not user_settings.
This was introduced in 998d710275.
Fixes#19198
We set blue outline color in day mode and light gray outline colour
in night mode. This removes the different outline colours users
in different platforms / desktop app.
The reason for this was we were not loading extra
parameters while storing the status emoji object.
For this we also need the emoji module to be initialized
early because the right sidebar would need it to display
the status emoji.
The issue was with the typeahead `click` event where it
didn't activate the current target and called the `select`
method, which selected the element which was last
focused.
This was debugged by Anders Kaseorg.
We now use the newly added "user_settings" event in the frontend
code instead of previous "update_global_notifications" and
"update_display_settings" events which are now depreceated.
- Remove essay portion and link to /for/communities instead.
- Copy over relevant quotes from /for/communities.
- Move "Join the hundreds of open-source projects we sponsor."
This reverts commit 5e97ec9ad9.
This change has been pretty confusing for users, and so we need to do
something more in order to make the UI acceptable to change this
default.
This commit moves the warn_if_private_stream_is_linked,
needs_subscribe_warning, and warn_if_mentioning_unsubscribed_user
to compose_validate.js from compose.js.
These warning functions are very naturally part of the compose box
validation system, though they're a bit different in being called from
the typeahead codebase.
Part of splitting compose.js into more natural modules.
Previously, once the user opens the "Set user status" UI,
the focus isn't automatically set to the input bar.
This is so because the input field isn't visible at
the time when UI is loaded because of the bootstrap
fade property which delays the event.
Added a fix to trigger the focus event on input bar
only when the modal is completely shown.
Fixes#19417.
This commit enhances our Multiselect dropdown list widget by
displaying a tippy tooltip over the dropdown button once it's
text changes to `n selected` where n is the number of items
selected by user which exceeds the limit passed.
It essentially helps the user to identify the dropdown items they
have selected by just hovering over the dropdown toggle button.
This commit adds the support to select multiple dropdown items by inheriting
dropdown list widget and overriding some of it's properties.
The parameters that can be passed along with it are-
- widget_name: The desired name of the widget.
- data: The data that needs to be populated as dropdown items.
- default_text: The default text to be rendered when none of the items is selected.
- on_update: Function to trigger once the filter button is pressed.
- on_close: Function to trigger once the dropdown is successfully closed after filtering.
- value: The default value that is initially selected by user.
- limit: The maximum number of dropdown items to display on button text.
This widget can later be implemented in recent topic view to replace the
several ellipses filter button and also within the organisation user's page
to quickly sort the users list according to their org role.
Previously, our dropdown list widget was lacking several
keyUp/keyDown keyboard focus events due to which the user
couldn't shift the focus from the dropdown item to it's
search input.
This commit essentially binds several additional keyboard events
by defining a `dropdown_focus_events` function which helps
in enhancing our keyboard focus events.
Due to the above changes, it removes the custom event binded
to dropdown list widget because of which we fallback to our
deprecated keydown event handler functions present in /third/bootstrap.
This is a prep commit for adding the support of Multiselect
dropdown list widget by prototypal inheritance.
The following change actually revamps the dropdown list widget
into a constructor function, due to which the widget is now to
be initialized with the `new` keyword (which adds a property
to __proto__ object that links to the constructor function's
prototype object).
Example-
const foo = new DropdownListWidget({....});
Due to the above change, this commit also modifies the declaration
of dropdown_list_widget across all our instances.
A recent commit (5a94bfcb88)
introduced a couple of regressions:
* The part of help.js that highlights the active page in the
sidebar raised an exception on /help and /api since there
was nothing to highlight for the doc roots in the sidebar
anymore.
* Moving the doc root links to the header after the logo made
it such that on narrow mobile widths, there was no way to get
to the doc root since the links in the header were truncated.
With a CSS change by tabbott to avoid awkward vertical spacing.
In this case, for TypeScript narrowing to work correctly, we need
a if statement that check that both of the type are same. The one
condition we had that checked that both have the same type doesn't
work with TypeScript narrowing yet.
We use a Symbol for unassigned_value_sentinel and explictly assign
the compute_value property instead of using Object.assign. Both of
these are needed to type annotate it easily.
I'm not entirely sure what broken this, but both the unread message
pills and the \vdots menu were not centered vertically.
Fix for the unread message pills should be general and complete, since
it just declares center alignment, but the \vdots menu is a hack;
further cleanup of that element's CSS is needed to end up with
something good.
In this commit, we update the UI to:
* Display emoji on the buddy list (right side sidebar).
* Display the emoji picker on the set status overlay.
It also updates the `z-index` of
`#set_user_status_modal`, which was changed from 105
to 1050 in 166bfa4cf8. We change it back to 105, so
emoji-popover can be visible on top of the
`#set_user_status_modal`.
We also remove the `tabindex` property from the
`#set_user_status_modal` so it can allow keyboard
events for emoji popover.
In this commit, we only update the existing architecture
to support the status emoji feature:
* We add the `user_status_emoji_info` map so we can
keep track of the users' staus emoji.
* Listen to the server event to update/set the
`user_status_emoji_info` map.
* Add `status_emoji_info` field, when getting user's data.
This commit replaces boolean field add_emoji_by_admins_only with an
integer field add_custom_emoji_policy as we would also add full members
and moderators option for this setting in further commits.
This removes a bunch of non-functional duplicate JavaScript, HTML, and
CSS that was interfering with maintenance on the functional originals,
because it was never clear how to update the duplicates or how to
check that you’d updated the duplicates correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
As explained in the commit 3a35a0b72c9b2c46ed0afa6456d4a5a80a2c12f9:
`nextFocus` is set on a keydown event to indicate where
we should focus on keyup. We can't focus at the time of
keydown because we need to wait for typeahead. And we
can't compute where to focus at the time of keyup because
only the keydown has reliable information about whether it
was a Tab or a Shift+Tab.
Though the previous configuration didn't show any bug but we should
follow the same logic here also.
This commit moves "enter_sends" setting to property_types dict.
With this change, changing enter_sends setting also sends an
event of type "update_display_settings" and thus enables us
to live-update the UI.
We only disable the dropdown and keep the label as it is when
disabling a dropdown input, but for a check-box we need to
change label style also while disabling it.
Till now disable_sub_settings_on_change was used only for
dropdown but will be used for a check-box in the next commit.
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.