Commit Graph

42907 Commits

Author SHA1 Message Date
Tim Abbott 420500ab25 user_profile_modal: Fix duplicate 'Last active' notice.
This fixes a regression in 16bd6e6b1d
that caused the user profile modal to display "Last active: Last active: ...".

I'm not convinced these are the best visuals, but the whole modal
needs a visual refresh.
2021-06-11 07:59:59 -07:00
m-e-l-u-h-a-n b080417960 popovers: Add tabs for profile, groups and streams in user_info modal.
Fixes: #16233.

Co-authored-by: Abhirup Pal <abhiruppalmethodist@gmail.com>
2021-06-11 07:56:32 -07:00
Suyash Vardhan Mathur 001435a297 refactor: Rename and move app_filters.py.
Moved the code in zerver/templatetags/app_filters.py
to more intuitive location and name at
zerver/lib/templates.py.
2021-06-11 07:43:22 -07:00
Suyash Vardhan Mathur 274f73d117 apidocs: Automatically add javascript example tabs.
The javascript tab in .md templates can be
generated along with the line that adds js
example.

Further, as a part of the effort of moving
towards a single template, the markdown extension
for javascrit examples is modified to return empty
string if javascript example doesn't exist for that
endpoint. This would make it possible to cover more
endpoints with a single template.

The js example tabs are now automatically generated
during generation of javascript code, and so need to
be removed. Also, the markdown function to render js
examples can be added in all templates, since it is
parses and returns an empty string if the examples
don't exist, and allows us to move towards a common
template.

The pages have been verified to be correct
by using diff between old and new pages' raw HTML.
2021-06-11 07:43:22 -07:00
Aman Agrawal 448456e4c0 tippy: Hide other popovers when opening a popover like tippy instance.
When we use tippy to open a popover, we should hide other popovers.
2021-06-11 07:42:07 -07:00
Vishnu KS 4e26746b98 tests: Move tests of /activity pages from zerver to analytics module.
This module deals with the testing of /activity, /realm_activity
and /user_activity. All these pages reside in analytics module.
Keeping these tests in zerver/tests is kind is not appropriate
since person who makes changes to /activity pages would not think
it is necessary to run tests in zerver. So better to keep them
in the analytics module.
2021-06-11 07:41:02 -07:00
Vishnu KS 46c902686d tests: Specify the update_fields in test_activity.
This is a prep commit. Else the lint will complain during the
refactoring of this function to a new location that update_fields
is not specified.
2021-06-11 07:41:02 -07:00
Vishnu KS d32de76c23 activity: Rename amount variables to arr. 2021-06-11 07:41:02 -07:00
Vishnu KS cfbea80f08 activity: Don't show plan, ARR and discount when billing is disabled. 2021-06-11 07:41:02 -07:00
Vishnu KS 40ab415005 activity: Show effective rate of realms in /activity page. 2021-06-11 07:41:02 -07:00
Steve Howell 0b4338b998 node tests: Use mock_template in poll_widget. 2021-06-11 09:54:25 -04:00
Steve Howell 25a0c700d3 node tests: Use mock_template in compose. 2021-06-11 09:54:25 -04:00
Steve Howell d067bdff2d node tests: Use mock_template in alert_words_ui. 2021-06-11 09:54:25 -04:00
Steve Howell ddeb15114d zjsunit: Add mock_template helper.
We want to eliminate stub_templates.
2021-06-11 09:54:25 -04:00
Anders Kaseorg 9f3d1fdbdb webpack: Fix run-dev.py --minify.
‘--optimize-minimize’ no longer exists.  (Webpack 5 has
‘--optimization-minimize’.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-10 17:26:55 -07:00
Tim Abbott 17fe09bb6d webhooks: Update link to BuildBot documentation. 2021-06-10 17:15:55 -07:00
Anders Kaseorg 7b38e7c157 build-release-tarball: Use require_clean_work_tree helper.
‘git diff’ is a porcelain command that launches a pager.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-10 16:08:28 -07:00
Aman Agrawal 88454307cd recent_topics: Split into three modules.
We split recent_topics module into recent_topics_(ui + data + util).

This allows us to reduce cyclical dependencies which were
created due to large list of imports in recent topics. Also, this
refactor on its own makes sense.
2021-06-10 15:53:05 -07:00
m-e-l-u-h-a-n eb1d8b1a96 left-sidebar: Hide clear filter text button if topic filter is empty. 2021-06-10 15:49:34 -07:00
Alex Vandiver c90ff80084 puppet: Bump grafana version to 8.0.1.
Most notably, this fixes an annoying bug with CloudWatch metrics being
repeated in graphs.
2021-06-10 15:49:08 -07:00
Tim Abbott 75dbd2c80d templates: Remove logout form shared template.
It's sufficiently tiny that the shared code benefits don't justify the
cost, given that we plan to move index.html to a different templating
system soon.
2021-06-10 13:14:25 -07:00
Ganesh Pawar 19fb6114d7 message_edit: Migrate to using `confirm_dialog`. 2021-06-10 12:23:48 -07:00
Ganesh Pawar f9d5dda72c confirm_dialog: Add an error element. 2021-06-10 12:23:47 -07:00
Ganesh Pawar 1afcc98be2 confirm_dialog: Add support for loading spinner. 2021-06-10 12:16:23 -07:00
Ganesh Pawar 4ed643ab8c popovers: Remove `hide_user_profile` from `hide_all_except_sidebars`.
`user-profile-modal` is shown using `overlays.open_overlay` which
disables mouse pointer events. The user can't click anywhere while a
modal is present, except to close it.

We use `hide_all_except_sidebars` and `hide_all` to hide popovers.
But since the user can't interact while a modal is present,
closing it manually is redundant.
2021-06-10 12:16:23 -07:00
Ganesh Pawar fe147757c9 refactor: Migrate Bootstrap modal calls to `overlay` calls.
In d0f8515b50, it was noticed that
Bootstrap's `hide` and `show` calls can cause race conditions.
So, migrate to our `overlay` calls to handle Bootstrap modals.
2021-06-10 12:16:23 -07:00
Ganesh Pawar 6e4735a4e9 confirm_dialog: Make Bootstrap `fade` class optional.
It would be better to load non-setting modals instantly.

This was previously reverted in
7bfa607d0a due to a rebase conflict.
2021-06-10 12:15:55 -07:00
Suyash Vardhan Mathur 5be92ad30d openapi: Auto-render heading with return values.
The headings for return values were currently hardcoded
in cases where they occur, but they can be rendered directly
in the markdown extension if the return values exist.
2021-06-10 11:25:13 -07:00
Steve Howell 842b14b916 layout: Introduce a #compose-content div.
This should make it more intuitive to add
new elements to the compose box (such as
banners), and it also makes it a bit more
clear for styling purposes that the same
geometry happens whether the compose box
is open or the buttons are visible.

I lifted the #compose_container div into
the server template.  It's not totally
clear to me why we need both #compose
and #compose_container, but there are
some scary comments about 1400px that
made me too timid to address that quirk.

In passing I removed a clearly redundant
click handler.
2021-06-10 11:22:05 -07:00
Tim Abbott d17d00a416 templates: Remove unused settings_sidebar.html.
This was orphaned in 805ac2475b.
2021-06-10 10:36:46 -07:00
Anders Kaseorg 7f25271d7d lint: Apply custom_check.js_rules to TypeScript too.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-10 10:35:58 -07:00
Tim Abbott afe5b2e7e5 templates: Inline tiny subscriptions/drafts templates. 2021-06-10 10:31:22 -07:00
Riken Shah f95c539122 custom_check: Avoid use of assert to avoid confusion with assert.equal.
This commit bans the use of `assert` and replaces it
with `assert.ok` to avoid confusion with `assert.equal`.

Fixes #18687.
2021-06-10 09:15:57 -07:00
Anders Kaseorg 5e80068134 puppeteer_tests: Replace incorrect assert calls with assert.equal.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-10 09:15:36 -07:00
Eeshan Garg 50a6887d94 plans_page: Compute sponsorship link for subdomain pages correctly.
Currently, in the FAQ on our /plans page, when the user clicks on
the sponsorship link in the answer for the first question, they
are always taken to /accounts/go, causing them to have to input
their organization URL even if they are on a subdomain page.

This commit makes it so that when the user is on a subdomain page,
they are taken to /upgrade#sponsorship directly. On the other
hand, when they are on a root domain (/) page, they have to go
through /accounts/go and specify their organization's name.
2021-06-10 09:10:38 -07:00
Aman Agrawal 2f46b80005 left_sidebar: Use padding instead of margin around clickable icons.
For create stream icon specially, this is useful to allow user having
some extra space around the icon to click.

This fixes the bug that you can have the tooltip of "Add streams" and
by hovering at the bottom of `+` icon but clicking on it shows stream
search.
2021-06-10 09:01:43 -07:00
Anders Kaseorg 0eb33b70dd dependencies: Move callsites to devDependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 23:49:36 -07:00
Anders Kaseorg 5a811e17fd dependencies: Remove script-loader.
As of commit bf056c8990 (#18251), this
is no longer used.

The PROVISION_VERSION bump is skipped because it’s already been bumped
several times since then, and waiting until the next one to actually
remove it is fine.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 23:30:31 -07:00
Anders Kaseorg 3d7a7c396f dependencies: Move eslint-plugin-unicorn, xvfb to devDependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 23:30:00 -07:00
Vishnu KS 42119c136b billing: Allow to exclude realms from license limit check. 2021-06-09 17:42:38 -07:00
Vishnu KS 1938076f67 billing: Enforce license limit for plans on manual license management. 2021-06-09 17:42:38 -07:00
Vishnu KS 8c055107d9 exceptions: Move InvitationError to zerver/lib/exceptions. 2021-06-09 17:42:38 -07:00
Vishnu KS 7197c8ae89 test_classes: Create helper function for subscribing realm to manual plan. 2021-06-09 17:42:38 -07:00
Anders Kaseorg 9e5f382241 production-verify: Don’t assume lengths have a decimal point.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 16:52:46 -07:00
Aman Agrawal 99e6f25c4e tippy: Fix vertical stacking for reaction button during message-fade.
This fixes the same bug in the previous commit for add reaction
button.
2021-06-09 16:38:56 -07:00
Aman Agrawal 3e2b6b52d8 tippy: Fix reaction tooltip placement when message-fade is active.
When message for which tooltip is active has reduced opacity in
an interleaved view due `.message-fade` class being applied to
it, then the tooltip used stack vertically under the recipient_row
which looked awful.

Appending the tooltip to document.body and manually fixing the
bug of tooltip persisting after the reference element is no
longer visible in DOM using MutationObserver does the trick
for us.
2021-06-09 16:38:56 -07:00
PIG208 e8b92b79e5 integrations: Add V3 support for PagerDuty. 2021-06-09 16:34:34 -07:00
PIG208 32ca263914 integrations: Change format of templates for PagerDuty V3.
Because the payload of V3 will no longer include the description,
We replace the ":" by "." in the message and create the new string
template for trigger messages.
2021-06-09 16:34:34 -07:00
Anders Kaseorg 321016668e dependencies: Downgrade @types/css-minimizer-webpack-plugin.
This avoids pulling in an extra unused copy of webpack 5.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 16:17:32 -07:00
Anders Kaseorg d8cb418586 zulip_tools: Flush ‘set -x’-style messages in run.
Otherwise they often get buffered until after the command actually
runs.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 14:05:31 -07:00