The GIF icon was taking more height than it was alloted to.
The height taken also varied slighly based on external factors.
This pushed other buttons out of their desired position.
Since we don't use video button in compose control buttons
popover, this will never be reached. We can add this code again
when we add video button to the popvoer.
Fixes#20431 by changing dark theme colors of upgrade tips to match
colors of other dark theme tips (with the same structure as the
existing .tip class).
When Zulip is run behind one or more reverse proxies, you must
configure `loadbalancer.ips` so that Zulip respects the client IP
addresses found in the `X-Forwarded-For` header. This is not
immediately clear from the documentation, so this commit makes it more
clear and augments the existing examples to showcase this need.
Fixes: #19073
We don't hide popover on click for formatting buttons, emoji picker and time
picker.
Emoji and time picker popovers need a reference to be displayed,
hence we don't hide them.
Not hiding formatting buttons is based on past discussion.
The current instance of compose popover is stored locally
so that we can access it across different modules.
The basic approach for hiding / displaying a button is based on
width and is executed at `sm` breakpoint as per our
`css_variables.js`.
Used handlebars and `hide/show-sm` css class to make this
work. This avoids using too much JS to hide/display elements.
* We move enter sends into its own row separate from compose
control buttons and send button. This makes sure compose control
icons don't wrap on narrow widths.
* Move char limit indicator parallel to enter sends button.
* Left align character exceeded count at bottom.
`Press Enter to send` used to hide `Send` button, we remove that
behaviour.
We show the current state of `Enter` hotkey action via text below
`Send` button which can toggle behaviour on click.
The new is obviously parallel with the small avatar URL construction,
and allows us to deduplicate this construction between the popovers
and full user profile logic for getting a medium avatar URL.
Fixes#20140.
This regular expression to add commas to a large number is hard to
read and produces less useful output than using the standard browser
API for doing this.
Fixes#20416.
We disable the enable_spectator_access setting when the server level
setting, WEB_PUBLIC_STREAMS_ENABLED setting is set to False.
This commit adds a new argument is_disabled to settings_checkbox which
is used to disable the checkbox and set the color of label accordingly.
This commit also adds a help-link besides the label pointing to
"/help/web-public-streams" which is shown irrespective of the
setting being enabled or disabled.
Fixes#20417.
The render_only parameter was passed to settings_checkbox partial of
realm_enable_spectator_access to hide the setting if the server-level
setting is set to False, but it was incorrect since we do not pass
page_params dict to the template and this was not working.
Initialy the render_only was set as page_params.development_environment
and then to page_params.server_web_public_streams_enabled in 260851cd0.
Both of these were incorrect since page_params is undefined in this
template.
We have now decided to disable the setting instead of hiding and this
will be done in next commit and this commit removes the render_only
parameter since it is not working anyways.
The is_nested paramter in settings_checkbox.hbs used to
set disableable class in the div element is not used
anywhere and thus we can remove both the is_nested parameter
and disableable class.
The is_nested paramater was first added in 3e0b420423 and
disableable class was added in 706f422c3.
The use of is_nested parameter was removed in a501abf3a1.
This makes the UI for users browsing organization permissions a bit
less confusing; if they can't edit anything, they shouldn't have these
extra little buttons.
Fixes#20002.
Consider a modal with an error element displayed. When a user clicks
the submit button, the current behaviour is to empty the element. This
empties the inner HTML of the error element, but the CSS makes it still
visible, just empty. This looks bad. To avoid this, we hide the element.
We use the `ui_report` module to display errors, which adds the `show`
class to the error element every time an error is to be displayed. This
makes sure that the error element isn't hidden when the user re-clicks
the submit button while the modal is still open.
get_object_from_key should be used when trying to fetch a Confirmation
object. There are some places that need to make
Confirmation.objects.filter(...) queries, so we can't completely ban the
pattern, but we can ban .get(...) and
.filter(..., confirmation_key=..., ...).
Now we only tokenize the file once, and we pass
**validated** tokens to the pretty printer.
There are a few reasons for this:
* It obviously saves a lot of extra computation
just in terms of tokenization.
* It allows our validator to add fields
to the Token objects that help the pretty
printer.
I also removed/tweaked a lot of legacy tests for
pretty_print.py that were exercising bizarrely
formatted HTML that we now simply ban during the
validation phase.
This accomplishes a few things:
* lighten the load for the main validation loop
* defer indentation checks until we are sure the author
even knows how to match up tags
* add some info to the Token objects that we may soon
consume in our pretty-printer