Commit Graph

55461 Commits

Author SHA1 Message Date
Anders Kaseorg 8a7916f21a python: Consistently use from…import for datetime.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-05 12:01:18 -08:00
Mateusz Mandera 250b52e3dc remote_billing: Add a "confirm login" page in RemoteRealm auth flow. 2023-12-05 11:34:57 -08:00
Mateusz Mandera 04bb60a05e remote_billing: Increase signed link validity to 2 hours.
This cannot be so short if we're adding an intermittent "check your
details, agree to ToS and confirm login" page. We're also considering
having users potentially share these links.
2023-12-05 11:34:57 -08:00
Mateusz Mandera 8b55d60f9e populate_db: Create RemoteZulipServer with proper details from settings.
This creates a valid registration, for two reasons:
1. Avoid the need to run "manage.py register_server" in dev env to
   register, when wanting to to test stuff with
   `PUSH_NOTIFICATION_BOUNCER_URL = "http://localhost:9991"`.
2. Avoid breaking RemoteRealm syncing, due to duplicate registrations
   (first set of registrations that gets set up with the dummy
   RemoteZulipServer in populate_db, and the second that gets set up via
   the regular syncing mechanism with the new RemoteZulipServer created
   during register_server).
2023-12-05 11:34:57 -08:00
Mateusz Mandera c23339f295 remote_billing: Rename the _billing_entry and _finalize_login functions.
These names were picked when I still thought these endpoints would serve
both the RemoteRealm and RemoteZulipServer based flows. Now that it's
known these are RemoteRealm-only endpoints, the _server in the names no
longer makes sense.
2023-12-05 11:34:57 -08:00
Anders Kaseorg ebee57813c populate_billing_realms: Fix PLW0127 Self-assignment of variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-05 11:13:49 -08:00
Karl Stolley acbe843b09 portico: Update pricing buttons on business, self-hosting.
This also defaults to the Zulip Cloud plans tab on the business
page.
2023-12-05 11:09:41 -08:00
Karl Stolley 2ea37a54a6 portico: Update plans tab on other pages.
This adds the new tabs from /plans to:

* /for/business
* /self-hosting

And it isolates legacy styles to preserve the tabs on
/for/education

Fixes: #28013
2023-12-05 11:09:41 -08:00
Tim Abbott 95b39bc8bf analytics: More fixes to zilencer urls import logic. 2023-12-05 10:52:00 -08:00
Tim Abbott 28d736d63b analytics: Don't import zilencer-specific code unconditionally.
This fixes the production server not working when zilencer is not
enabled.
2023-12-05 10:36:35 -08:00
Prakhar Pratyush 14b1539647 remote_activity: Add 'guest users' and 'non guest users' count column.
This commit adds two columns named 'Guest users' and
'Non guest users' to respresent count of such users.

We query 'RemoteRealmAuditLog' to get the data.
2023-12-05 10:04:41 -08:00
Sayam Samal 35ddb994e9 stream_settings: Fix cursor not being disabled due to specificity issue. 2023-12-04 16:38:19 -08:00
Sayam Samal 2f1ea2fe4e help_link_widget: Fix blue on hover by inheriting the text color instead.
In this commit, we add css to help link widgets so that they can inherit
the color property on hover,

Changing `.help_link_widget` selector to `a.help_link_widget` allows
us to increase the specificity of the selector, thus enabling us to
override the on hover property set by the bootstrap classes.
2023-12-04 16:38:19 -08:00
Sayam Samal 68ccb022ca push_notifications: Add help links to mobile notifications options.
Fixes #27830.
2023-12-04 16:38:19 -08:00
Sayam Samal 44fa30e481 css: Add `.help_link_widget` class to consolidate help widget styling. 2023-12-04 16:38:19 -08:00
Sayam Samal db753f7f90 notification_settings: Remove extra param being sent to checkboxes.
The show_push_notifications_tooltip param is not being used inside
`web/templates/settings/settings_checkbox.hbs` and thus should not be
passed.
2023-12-04 16:38:19 -08:00
Sayam Samal e09761c0f9 notification_settings: Disable push notification opts when not configured. 2023-12-04 16:38:19 -08:00
Sayam Samal c7e2306380 notification_settings: Add banner when push notification not configured. 2023-12-04 16:38:19 -08:00
Sayam Samal e2485b7ee8 notification_settings: Add tooltip to checkboxes in the triggers table. 2023-12-04 16:38:19 -08:00
Sayam Samal c01e9b8071 notification_settings: Move tooltip from help icon to "Mobile" heading. 2023-12-04 16:38:19 -08:00
Sayam Samal 14bb8708c6 stream_settings: Move tooltip from help icon to label and checkbox. 2023-12-04 16:38:19 -08:00
Sayam Samal 885cb8dab9 push_notification: Reword from "configured" to "enabled" in tooltip. 2023-12-04 16:38:19 -08:00
Sayam Samal 31cc47cbd7 settings: Migrate mobile notification tooltips to a common template. 2023-12-04 16:38:19 -08:00
N-Shar-ma 15b3ad7466 compose: Show tooltip instantly for a `.disabled-on-hover` button.
We have some delay for tooltips for all compose buttons, but we now show
tooltips instantly for buttons that are disabled on hover, to emphasize
that the button is disabled, and why.
2023-12-04 16:26:53 -08:00
N-Shar-ma ab3650343f compose: Fix bug where poll button was disabled on opening compose box.
On opening the compose box right after closing it with some text in it,
the poll button would wrongly be disabled.

This is now fixed by ensuring to reset the button state on opening the
compose box.
2023-12-04 16:26:53 -08:00
roanster007 b676df0efe stream_settings: Fix stream settings dropdown of user profile.
Previously, when the user modal is opened, and a stream is
selected from the streams tab, and then, when a new tab
is selected and you navigate back to this streams tab and
try to pick a new stream, it wouldn't allow you to do so.

This is because, preivously once a stream is picked,
and you go out of the tab and come back, then the
previous object of the subscribe widget was invalidated
and a new object was created. However, the options
still corresponded to the old object. Hence, the error.

This is fixed by checking out if a stream widget object
exists, before creating a new one. The object is cleared
out from the on_user_profile_hide method.

This error is not seen for other tabs even though they
reconstruct their entire tabs when re-visited
without saving previous state is that they don't make
modifications to the user profile from the modal itself.
They rather open some other modal to do it.
Hence, they don't need to store any state for their objects,
and hence no need to retain it.
their state.

Fixes #27422
2023-12-04 16:06:48 -08:00
roanster007 bd6886929a user_profile: Move the widget clearing logic to open hook of modals.
Previously, the logic for clearing of user_streams_list_widget
was present in a separate method, calling which would  clear
out the object. However, there is no guarantee that this
method would always be called, but it is essential for us to
clear out our object every time we close the modal.

Hence, we move this to a new on_user_profile_hide method,
which is provided as a call back to the modals.open hook
so that the object is cleaned out everytime we close the
modal.
2023-12-04 16:06:48 -08:00
N-Shar-ma 43d0965555 popover: Improve computation of elements at reference elements.
So far, we were only considering elements at the the reference element's
bounding box top-left corner, to check if the reference element was
covered by other elements. This led to a bug where the popover wouldn't
show up even if a very small part of the reference element was covered.

Now we consider elements that are at both the top-left and bottom-right
of the reference element's bounding box, as those covering the reference
element.
2023-12-04 16:03:29 -08:00
Karl Stolley f020f9eee0 pygments: Place Default (light) and Monokai (dark) schemes.
These were generated and captured from the following commands:

$ pygmentize -f html -S default

$ pygmentize -f html -S monokai
2023-12-04 13:03:34 -08:00
Karl Stolley 6696a47d3d pygments: Place GitHub-style red and green for diffs. 2023-12-04 13:03:34 -08:00
Karl Stolley 78d767c1ee pygments: Place Quansight Labs accessible GitHub themes. 2023-12-04 13:03:34 -08:00
Karl Stolley 1c88cc481c pygments: Isolate non-color Zulip custom styles. 2023-12-04 13:03:34 -08:00
Karl Stolley 7817e358f4 markdown: Place redesigned colors and borders on code spans and blocks.
Prior to merging, this commit and others in the PR should be adjusted
and squashed for a cleaner history.

Co-Authored-By: Vlad Korobov <terpimost@gmail.com>
2023-12-04 13:03:34 -08:00
Karl Stolley 6d4f852dc4 markdown: Remove background colors from code blocks.
It appears as though we're still setting a background color,
but that is only to push back against the background set by
Pygments.

However, code blocks in mention messages get the same color
background as ordinary messages, preserving contrast on syntax
highlighting.
2023-12-04 13:03:34 -08:00
Karl Stolley 78d4232fc4 markdown: Present code spans without borders. 2023-12-04 13:03:34 -08:00
Karl Stolley 2811f2fe0f markdown: Implement redesigned Markdown code styles.
Fixes a part of #22022.
2023-12-04 13:03:34 -08:00
Karl Stolley f1a5fffae9 markdown: Express Markdown code/pre colors as CSS vars.
This ensures that all colors (text, background, and border) are
explicitly declared for Markdown-rendered pre elements, even when
the colors replicate values already declared, e.g., with Pygments.
2023-12-04 13:03:34 -08:00
Karl Stolley a8612ee9bc markdown: Remove unreachable color properties. 2023-12-04 13:03:34 -08:00
N-Shar-ma 4d590f1f93 compose: Make the Preview button the first, and Upload files the second.
We exchange the positions of the preview and upload buttons to make the
preview button the first one, as the preview button is different from
the other buttons in that it does not manipulate the contents of the
ompose box.
2023-12-04 13:00:35 -08:00
Aman Agrawal 201a2bb9c8 urls: Add `/` to `_page` URLs to avoid redirects. 2023-12-04 12:36:24 -08:00
Aman Agrawal 00f4f8cb04 billing: Use PATCH requests for update plan for remote instances.
This fixes the update requests for billing frequency and other
requests not working on billing page for cloud customers.
2023-12-04 12:36:24 -08:00
Aman Agrawal 1a063986e3 billing: Render page for legacy server scheduled for upgrade. 2023-12-04 12:36:24 -08:00
Aman Agrawal cd45b6f6f8 upgrade: Allow legacy servers to upgrade to business plan. 2023-12-04 12:36:24 -08:00
Aman Agrawal 9935f002ec stripe: Fill `get_type_of_plan_tier_change` for remote realm/server. 2023-12-04 12:36:24 -08:00
Aman Agrawal f22ccd3125 stripe: Render upgrade page for remote servers on legacy plan. 2023-12-04 12:36:24 -08:00
Aman Agrawal 7d83508235 commands: Add script to create servers on legacy plan.
Also adds `SWITCH_PLAN_TIER_AT_PLAN_END` for `CustomerPlan`
which will be used to mark status of remote server legacy
plans which are scheduled for an upgrade.
2023-12-04 12:36:24 -08:00
Karl Stolley c651c4f668 icons: Place new log-in and log-out icons across UI. 2023-12-04 12:11:00 -08:00
Karl Stolley c3adfa2679 top_navbar: Apply current icon styles to narrow login icon. 2023-12-04 12:11:00 -08:00
Karl Stolley d85dd6bf2b top_navbar: Set new spectator button styles. 2023-12-04 12:11:00 -08:00
Karl Stolley b53836de03 top_navbar: Allow spectator items to participate in flexbox. 2023-12-04 12:11:00 -08:00