Commit Graph

119 Commits

Author SHA1 Message Date
Aman Agrawal bc3d48616e gear_menu: Migrate to use tippy. 2023-10-20 12:36:39 -07:00
Karl Stolley 7774abfe04 left_sidebar: Structure Views header with standalone icons.
This also introduces a combo grid/flex layout, which will also be
applied to the DM and Streams headings.

Because there are now multiple classes referenced from the
Puppeteer tests, those selectors now include the expanded
navigation area's parent ID selector.
2023-10-20 12:27:19 -07:00
Anders Kaseorg 8a837320a9 e2e-tests: Remove now-unnecessary StackFrame cast.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Anders Kaseorg ccb492a75a e2e-tests: Fix stack traces from Puppeteer page errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Tim Abbott 2ce3f52030 gear_menu: Remove logout button, moved to new personal menu. 2023-10-12 15:31:01 -07:00
Hardik Dharmani 49f7f02a0a personal_menu: Add tippy personal_menu dropdown.
Add a personal menu dropdown that opens on clicking user avatar icon
in navbar added in previous commit.

The args passed to render_personal_menu() in onShow() are returned by
get_personal_menu_content_context() in popover_menus_data.js so that
they can be unit tested.

Additionally, added CSS to get a custom arrow for dropdown menu.

Added a `?` hotkey in keyboard shortcuts option in personal_menu
dropdown in a style similar to our tooltip's hotkey by adding
? in a span with class .tooltip-hotkey-hint and adding some CSS.

Fixes part of #22802.
2023-10-12 15:31:01 -07:00
Joelute c7ef2555fd compose_typeahead: Add new indicator to topic items in typeahead.
With the autocomplete dropdown, some users face trouble or uncertainty
while selecting topics. These changes adds a new indicator to the topic
typeahead dropdown while typing to the topic box. This ensures users
that they are on track and they are doing the right things. We also
suggest the current query even if it doesn't match a topic to continue
providing the new indicator.

Fixes: #23296.
2023-10-12 14:44:40 -07:00
Karl Stolley c73de34f32 compose: Introduce 'Start new conversation' button. 2023-10-10 17:37:03 -07:00
Karl Stolley fd0dd3acd8 left_sidebar: Refactor left_sidebar.hbs structures for readability.
This commit renames the classes and IDs in the views area
(formerly global filters) to a set of flexible values all
prefixed in some way with `left-sidebar-navigation`.

This is meant to make the styles and structures in the area
more readable, while also keeping things flexible into the
future as this area's elements change.

Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
2023-10-10 16:48:20 -07:00
Hardik Dharmani 55b0b5cb96 gear_menu: Remove href="#logout" from logout button.
Remove href="#logout" from last option of gear_menu as
logout is already handled by click handler for .logout_button.

Fixes part of #22802
2023-09-27 18:01:47 -07:00
Karl Stolley b70dc23a47 view_labels: Change 'Direct messages' to 'All direct messages'. 2023-09-27 12:48:06 -07:00
Daniil Fadeev 8de397b37f user_card_popover: Migrate all user card popovers to Tippy. 2023-09-25 06:29:47 -07:00
Tim Abbott 12dd6c44a2 puppeteer: Remove flaky default streams test.
This test has been flaking for a couple months, and it hasn't felt
worth it for anyone to debug, so we should disable or delete it.

I chose deletion, since I don't think this settings panel is a
high-value place for end-to-end testing.
2023-09-21 17:34:56 -07:00
YashRE42 cb04ae1f95 search: Redesign search box.
Fixes #21798.
2023-09-21 08:58:31 -07:00
evykassirer ea619ff75f message basics e2e: Add expect_home in two places to match other tests. 2023-09-21 08:58:31 -07:00
palashb01 61948d273b settings_bots: Migrate manage bot to user profile modal.
This commit migrates the "Manage Bot" modal to the user profile modal,
with the same explanation as in the "Manage User" modal commit.
However, in this commit, we changed the permission of the "Manage User"
tab so that non-admin users can also see the "Manage Bot" tab if they
have created the bot. Additionally, since we can't make changes to
system bots, we check if the bot is a system bot and hide the
"Manage Bot" tab accordingly.

Fixes: #21806
2023-09-11 10:39:00 -07:00
Anders Kaseorg 61bc10ca01 web: Add missing CSS selector escaping.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-08 15:35:50 -07:00
evykassirer fc2ff74ea2 recent: Rename recent_topics in some test files. 2023-09-08 07:36:33 -07:00
evykassirer e5cd59c224 recent: Rename #recent_topics_filter_buttons. 2023-09-08 07:36:33 -07:00
evykassirer 131127aa30 recent: Rename #recent_topics_table. 2023-09-08 07:36:33 -07:00
Daniil Fadeev 08279820fb emoji: Rename `emoji-info-popover` to `emoji-picker-popover`. 2023-09-07 14:44:18 -07:00
Karl Stolley 735a42d037 icons: Reference new icons from templates and JS. 2023-08-21 17:13:43 -07:00
Zixuan James Li 5301060954 linkifiers: Support dragging and reordering linkifiers.
This also removes sorting on the pattern and the URL template, because
it does not make sense anymore as we make linkifiers draggable.

Fixes #23716
2023-08-14 15:21:48 -07:00
Zixuan James Li 112a6e445e linkifiers: Support multiple linkifiers in puppeteer tests.
Select the linkifier with `:nth-child` assuming the possibility of other
linkifiers in the realm. This prepares for a later change that requires
us to populate the test database with linkifiers.
2023-08-14 15:21:48 -07:00
Satyam Bansal 0f0c52e096 drafts: Remove classes that had the same effect.
In commit 5edc8fc, abstract classes were added to the
drafts overlay, but the classes that were already there
were not removed. This resulted in the same styles being
applied twice.
2023-08-11 15:54:17 -07:00
Karl Stolley a73faf6579 tests: Disable flaky test_edit_bot_form test. 2023-08-09 15:25:48 -07:00
evykassirer 40e40e09ba puppeteer: Use `stream_name` instead of `stream` for clarity. 2023-08-07 09:57:40 -07:00
Aman Agrawal aa8e94ca6d settings_org: Migrate dropdowns to new DropdownWidget.
This also moves [Disabled] button inside the dropdown.
2023-07-27 14:10:08 -07:00
Aman Agrawal 6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Sahil Batra befcb46ba3 dialog_widget: Rename "dialog_cancel_button" to "dialog_exit_button".
This commit renames "dialog_cancel_button" class in the exit button
of modals to "dialog_exit_button", which seems a much better name
for a button that is used to close a modal.
2023-07-25 10:25:12 -07:00
Zixuan James Li 000761ac0c realm_playgrounds: Replace url_prefix with url_template.
Dropping support for url_prefix for RealmPlayground, the server now uses
url_template instead only for playground creation, retrieval and audit
logging upon removal.

This does the necessary handling so that url_template is expanded with
the extracted code.

Fixes #25723.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-07-24 17:40:59 -07:00
Anders Kaseorg 7746e11486 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-07-21 15:58:42 -07:00
Karl Stolley b6d072a8d9 message_grid: Share same message grid with me-messages. 2023-07-13 09:02:00 -07:00
nimish c238327899 settings: Change "Display settings" to "Preferences".
This includes changing the URL to #settings/preferences, with a
transparent redirect so that existing links, like the one from Welcome
Bot, continue to work.
2023-07-12 07:09:03 -07:00
Akshat d302ac4a18 message_view_header: Fix bad rendering of stream links in description.
This bad rendering was the result of unwanted css applied
in the stream description. In message view header, the stream
link (title) we have defined has css defined but the markdown
rendered stream link in stream description had the same class
resulting in unwanted css applied to it.

Fixes: #25961.

Signed-off-by: Akshat <akshat25iiit@gmail.com>
2023-07-10 13:47:22 -07:00
Ganesh Pawar fff9b334ff default_streams: Convert inline form to modal.
Fixes #20838.
2023-07-06 16:24:44 -07:00
Lauryn Menard 7c47616ffa web-e2e-tests: Update references to "private message" and "PM".
Updates any use of "private message" and "PM" in the `web/e2e-tests`
directory to instead use "direct messages" or "DM".
2023-06-26 11:07:28 -07:00
Joelute f5a21d0e47 compose_banner: Update classnames to main-view-banner-action-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_action_button
to main-view-banner-action-button.
2023-06-09 11:31:51 -07:00
Anders Kaseorg 954b44716f e2e-tests: Simplify test_subscription_button loop.
Undo a debugging commit
db5f39c506 (#21476) that was made to
help diagnose the issue eventually fixed in commit
6242602276 (#22728).  Also remove an
unnecessary mutable variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:51:26 -07:00
Satyam Bansal b3196e5310 settings: Close date-picker when settings modal is closed.
Previously, if the user closes the settings modal by pressing
the "Esc" key and if any date-pickers were open then they would
remain on the screen. This commit fixes that and now date-pickers
are closed when the settings modal is closed.

Also added a puppeteer test to verify the said behavior.

Fixes part of #25097.
2023-05-23 17:01:00 -07:00
Aman Agrawal 8ea59f7f02 compose: Use tippy for stream select dropdown.
Fixes #25434
2023-05-09 14:11:26 -07:00
Hardik Dharmani 3d3d30166d tooltips: Update content of `Narrow-to` toolips. 2023-05-02 13:50:46 -07:00
Hardik Dharmani 15860c8b13 tooltips: Convert recipient row tooltips to tippy. 2023-04-28 15:34:59 -07:00
evykassirer 18312be6db compose: Add ability to switch to PM in stream dropdown.
Fixes #3409
2023-04-27 17:04:19 -07:00
evykassirer 695946746e compose: Rename stream selection widget to "select_recipient".
Previously this dropdown was only for selecting streams, but
soon it will also be for switching to a private message. This
name helps it be clearer that the dropdown is more general
purpose.
2023-04-27 17:04:19 -07:00
Anders Kaseorg ca6b0d8c5a e2e-tests: Fix ensure_enter_does_not_send.
A variable in the Node.js context cannot be mutated by a function
evaluated in the browser context.  The boolean was also incorrectly
inverted, and a click to open the dialog containing
`enter_sends_choice` was missing.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-25 19:30:35 -07:00
Lauryn Menard 0f7341dd48 narrow: Add frontend support for `dm:` narrow and `/dm/...` URL.
Adds support in the web app for `dm` operator. This will deprecate
the `pm-with` operator, but existing links/URLs are still supported
for backwards-compatilibity.

This commit updates the web app default behaviors to default to
the new narrow/URLs `dm/...` and `/#narrow/dm/...` when navigating
and searching in the app.

There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
evykassirer 8a2455a294 compose: Change stream field in composebox to be a dropdown.
Fixes #11832

This lets the user see more options than the three that appear
in the typeahead menu, and prevents them from inputting invalid
stream names.

This change replaces the input field with the dropdown, and
updates everything that referred to the classnames of the old
input field, so that they now get the data they need from the
new dropdown.
2023-04-20 16:09:55 -07:00
Anders Kaseorg 77a669c15c e2e-tests: Replace deprecated page.waitForTimeout.
https://pptr.dev/api/puppeteer.page.waitfortimeout
https://nodejs.org/api/timers.html#timerspromisessettimeoutdelay-value-options

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-19 17:45:01 -07:00
Anders Kaseorg 079b74e67e eslint: Fix @typescript-eslint/no-unnecessary-type-arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-19 16:52:39 -07:00
Anders Kaseorg 61b72f5117 eslint: Fix @typescript-eslint/non-nullable-type-assertion-style.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-19 16:52:39 -07:00
Zixuan James Li 05a3456581 settings: Use url_template for internal names.
This replaces any "url_format_string" or "url_format" with
"url_template" for the linkifier settings, including HTML ids, template
variables, and etc.

This is not affected by any external API changes.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-04-19 12:20:49 -07:00
Zixuan James Li 268f858f39 linkifier: Support URL templates for linkifiers.
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits  will be squashed with this commit.

We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.

The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.

This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.

Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.

With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.

We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.

Fixes #23124.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-04-19 12:20:49 -07:00
evykassirer 4cfafa382a compose: Rename recipient selector classes to be more descriptive. 2023-03-31 13:45:24 -07:00
evykassirer e5dd2810ee puppeteer: Move functions around in common.ts.
They need to be declared higher so that a future
commit can use them.
2023-03-29 18:14:54 -07:00
Karl Stolley 674cf8eacc css: Hyphenate .status-emoji selector. 2023-03-27 17:31:31 -07:00
Karl Stolley f695b08989 css: Hyphenate .smiley-icon selector. 2023-03-27 17:31:31 -07:00
Karl Stolley 89f45bf50e css: Hyphenate .selected-emoji selector. 2023-03-27 17:31:31 -07:00
Karl Stolley 36241e5758 css: Hyphenate .status-emoji-wrapper selector. 2023-03-27 17:31:31 -07:00
Karl Stolley 6e2b8a3b1d css: Hyphenate .user-status selector. 2023-03-27 17:31:31 -07:00
Karl Stolley c78c1ef54b css: Hyphenate #set-user-status-modal selector. 2023-03-27 17:31:31 -07:00
Sahil Batra cf8d8db132 register: Update the user-registration form for realm creation.
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.
2023-03-27 15:44:42 -07:00
Sahil Batra 80b00933b1 templates: Add realm information fields in create_realm.html.
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.
2023-03-27 15:44:42 -07:00
Sahil Batra 5eeef1483d templates: Rename ID for form element in create_realm.html.
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.
2023-03-27 15:44:42 -07:00
Anders Kaseorg 3109ee8015 eslint: Enable @typescript-eslint/recommended plugin.
This is not automatically enabled by
@typescript-eslint/recommended-requiring-type-checking for some
reason.

https://typescript-eslint.io/linting/configs/#recommended

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-16 13:24:27 -07:00
palashb01 2067c71a93 display_settings: Rename and update the 'language-time' section.
Rename the 'language-time' title to 'General'. As the 'language-time'
section no longer exists, replace the 'lang-time-settings' classname
with the 'general-settings' classname in the 'settings_display.js' file.

Updated the 'change-the-time-format.md' and 'change-your-language.md'
documentation files to reflect these changes.

To pass the puppeteer_test Replaced the 'lang-time-settings-status'
classname to 'general-settings-status' inside 'settings.test.ts' file.
2023-03-09 16:12:45 -08:00
Lauryn Menard b5f5ab948a puppeteer: Fix small logging copy and paste error in `admin.test.ts`. 2023-03-06 09:42:11 -08:00
Lauryn Menard 42775219b3 private-messages: Update frontend strings to use "direct message" or "DM".
Updates frontend user-facing strings with "private message" or "PM" to
use "direct message" or "DM" respectively instead.

Note that this updates translated strings as well as a few that
are not translated like search suggestions.

Updates `tools/lib/capitalization.py` for some specific strings
that are impacted by these changes, and removes "PM" and "PMs"
from checked strings.
2023-02-24 11:47:26 -08:00
Anders Kaseorg 377b8b22c0 puppeteer_tests: Move to web/e2e-tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00