Commit Graph

4643 Commits

Author SHA1 Message Date
afeefuddin 394e8fc856 navbar_alerts: Convert module to TypeScript. 2024-06-03 12:19:58 -07:00
afeefuddin 7025d409c3 navbar_alerts: Use UNIX timestamp consistently. 2024-06-03 12:19:58 -07:00
afeefuddin b3809a33b5 state_data: Update realm_schema.
Add demo_organization_scheduled_deletion_date and realm_date_created
to realm_schema.
2024-06-03 12:19:58 -07:00
Karl Stolley 0f6072d2d6 left_sidebar: Condense nav rows to standard size. 2024-06-03 10:32:29 -07:00
Karl Stolley 5dafaf9deb left_sidebar: Expand topic rows to prominent size. 2024-06-03 10:32:29 -07:00
Vector73 88df01bee5 web: Replace `realm_uri` with `realm_url` in frontend files.
Replaces `realm_uri` with `realm_url` in some frontend files and a js test.
2024-06-03 10:07:10 -07:00
Prakhar Pratyush 32391c3d06 ui_init: Don't store onboarding_steps state_data as current_user_param.
Earlier, onboarding_steps field of state_data was stored as
current_user_params.

Now, we store it separately in a data structure initialized in
onboarding_steps.ts

Reason: All the other state_data fields stored in current_user_params
are attributes of UserProfile. So, it makes sense to store it
separately.

Fixes part of #30043.
2024-06-03 08:53:28 -07:00
Prakhar Pratyush 915503df10 onboarding_steps: Rename the function 'update_notice_to_display'.
This commit renames the function 'update_notice_to_display' to
'update_onboarding_steps_to_display' as it can be used for
onboarding step of any type.

Currently, we have only one type i.e. 'one_time_notice'.
2024-06-03 08:53:28 -07:00
Aman Agrawal 6750b02437 recent_view: Reduce constant flashing of recent view on initial load.
We completely rerender recent view when we receive a new message,
which is not ideal since it is flashes recent view frequently
during the initial fetch.

Since later parts of initial fetch which trigger the flash, only
load old messages, they cannot change the latest message of
rendered rows in recent view. That means we can just inplace
rerender the rendered rows which got updated and don't have
to worry about order of rows being changed.
2024-06-02 21:52:45 -07:00
afeefuddin 2fb1199af5 compose_call_ui: Pass $target_textarea consistently to insert call link.
Pass $<HTMLTextAreaElement>("textarea#compose-textarea") instead of
undefined when inserting the call link in compose-textarea.
2024-06-02 21:49:49 -07:00
afeefuddin 7b5ccf0c98 compose_call_ui: Rename target_textarea to $target_textarea. 2024-06-02 21:49:49 -07:00
afeefuddin 9cf9cec43a compose_call_ui: Convert module to TypeScript. 2024-06-02 21:49:49 -07:00
afeefuddin 49c4e5ec44 ui_report: Fix inaccurate annotations for generic_embed_error parameter.
The remove_after parameter is optional; when not provided, the alert is
not removed.
2024-06-02 21:49:49 -07:00
afeefuddin ab3bb767af state_data: Add has_zoom_token to current_user_schema. 2024-06-02 21:49:49 -07:00
Aman Agrawal bb6e6ecaa5 hello: Redesign landing page.
Co-authored-by: Vlad Korobov <terpimost@gmail.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2024-06-02 21:45:37 -07:00
afeefuddin 9d33c94f2d settings_components: Split functions to improve typechecking. 2024-06-01 22:53:34 -07:00
afeefuddin 7355aa3922 settings_org: Pass undefined implicitly when sub is undefined. 2024-06-01 22:53:34 -07:00
afeefuddin 23e22d1bbe settings_components: Remove unnecessary parameter. 2024-06-01 22:53:34 -07:00
Aman Agrawal 0468f609e8 popovers: Fix selected message being changed on scroll inside popover.
Since scroll event is always fired at root level, we don't have
control over capturing the event and containing it to the popover
if scroll happened inside the popover.

This can lead to unintentional moving of selected message since
we try to move the selected message to rendered top / bottom if
we receive a scroll event when top / bottom ends are rendered.
2024-05-31 15:40:21 -07:00
Aman Agrawal ddf14116b2 emoji_popover: Fix white arrow color in dark theme.
Tested left, top and bottom placement of emoji popover to check
if arrow color is correctly displayed in both dark and light theme.
2024-05-31 15:39:09 -07:00
Sayam Samal ce1163ebe8 popovers: Add the missing aria-hidden attribute to popover icons.
Some of the popover icons were missing the aria-hidden attribute, which
caused them to be read out by screen readers.
2024-05-31 15:28:01 -07:00
Sayam Samal 17424c5f14 topic_actions_popover: Remove redunadant data-* attributes.
This modern implementation of this popover gets these values from what
was passed into its constructor.
2024-05-31 15:28:01 -07:00
Sayam Samal 34e6d84cf5 topic_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="group"` to the topic visibility picker, identifying it as a
    container for related menu items.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal 125a4d2a11 stream_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal 4c4d0c5774 help_menu_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal 3dfaca0773 personal_menu_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="group"` to the theme switcher, identifying it as a container
    for related menu items.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal ed9d2a7af6 gear_menu_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
  offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
  or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
  role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal 3c1d248abe message_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
  offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
  or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
  role that conflicts with the parent menu structure.

Also removes the unused `should_display_reminder_option` code, which
should have been removed in f40855bad2.
2024-05-31 15:27:30 -07:00
Varun Singh a177d8fa49 settings_streams: Convert module to TypeScript. 2024-05-31 15:19:43 -07:00
Varun Singh 40953f7ada dialog_widget: Fix 'onclick' event type. 2024-05-31 15:19:43 -07:00
Karl Stolley a2a735273b left_sidebar: Maintain em-equivalent 16px separator row height. 2024-05-31 15:18:06 -07:00
Karl Stolley b4b5d03a8e left_sidebar: Set topic rows to normalized em-based line-height. 2024-05-31 15:18:06 -07:00
Karl Stolley 9a2cc09ec2 left_sidebar: Set channel rows to em-based line-height. 2024-05-31 15:18:06 -07:00
Karl Stolley 3f9897cfee left_sidebar: Set DM rows to em-based line-height. 2024-05-31 15:18:06 -07:00
Karl Stolley d8a73c8637 left_sidebar: Set navigation area rows to em-based line-height. 2024-05-31 15:18:06 -07:00
Karl Stolley ef68132a5a left_sidebar: Declare header row-heights as prominent rows. 2024-05-31 15:18:06 -07:00
Karl Stolley 4405136ffb info_density: Declare em-based line-height vars for sidebar rows. 2024-05-31 15:18:06 -07:00
Karl Stolley 3d04f7dbda info_density: Set a minimum line-height on body. 2024-05-31 15:18:06 -07:00
Anders Kaseorg e53e3af0f6 codespell: Fix spelling mistakes caught by codespell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-31 14:32:33 -07:00
Aman Agrawal 8aea76448f copy_and_paste: Fix our logic being confused about selected messages.
If the selection stays inside a message header and there
are messages before the message header, our logic thinks `end_id`
is message before the header while `start_id` and `end_id` should
be that same.

It is best to just let browser handle the copy paste in this case.
2024-05-31 12:42:51 -07:00
Anders Kaseorg 804c3706ff tsconfig: Enable noUncheckedIndexedAccess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:29:23 -07:00
Anders Kaseorg 4e91572c96 hello: Add safety assertions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:15 -07:00
Anders Kaseorg 94f0f9340c e2e-tests: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:14 -07:00
Anders Kaseorg ed5f1455f2 e2e-tests: Consistently move fullname lookups to callers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:00 -07:00
Anders Kaseorg 067a342b4e upload_widget: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 6c0c19addb upload: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg e134ad1363 unread_ops: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 07c220f08b typing_events: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 83eb0a326a typeahead_helper: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg d0a03be8e0 topic_list: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00