182 Commits

Author SHA1 Message Date
Karl Stolley
d1a66c4faa alerts: Restore alert-success colors. 2025-07-09 14:04:52 -07:00
Sayam Samal
0be3e242c0 alerts: Fix alert-error banner styling.
This commit is a follow-up to 18b2427937,
which removed the `alert-error` class from the Bootstrap CSS, while the
`web/src/ui_report.ts` module still used this styling for the error
banners.

This commit adds the `alert-error` class back to the Bootstrap CSS,
as a temporary solution until these alerts are migrated to the new
banner component system.
2025-06-17 09:25:33 -07:00
Karl Stolley
18b2427937 bootstrap: Rescue decoupled app, portico alert styles. 2025-04-30 10:26:20 -07:00
Karl Stolley
0c07bf79f1 bootstrap: Clean up .close references.
Removing `.alert` from the dark theme seems acceptable,
as there is nowhere in the codebase we're setting a
`text-shadow` value that would require `none` here.
2025-04-30 10:26:20 -07:00
Karl Stolley
0c7e4d88f7 bootstrap: Remove vendor-prefixed placeholders.
These conflict with our own, standard styles in app_components.css.
2025-04-03 13:35:06 -07:00
Karl Stolley
31d3eba256 bootstrap: Preserve useful styles on button, input. 2025-04-03 13:35:06 -07:00
Karl Stolley
a9fa087f60 bootstrap: Rescue cursor definitions on label, button. 2025-04-03 13:35:06 -07:00
Karl Stolley
0fb2783c68 bootstrap: Remove font-size, line-height values superseded in zulip.css. 2025-04-03 13:35:06 -07:00
Karl Stolley
86623941a3 bootstrap: Remove font-family superseded in zulip.css. 2025-04-03 13:35:06 -07:00
Karl Stolley
2326cf443c bootstrap: Clean up HTML5 definitions part of UA stylesheets. 2025-04-03 13:35:06 -07:00
Karl Stolley
40fbb59310 bootstrap: Remove legacy ms-viewport media query. 2025-04-03 13:35:06 -07:00
Karl Stolley
9c47f3487e bootstrap: Remove redundant margin: 0 input media queries. 2025-04-03 13:35:06 -07:00
Prakhar Pratyush
0788942a68 message_link: Add support for empty string topic in syntax.
This commit adds support for empty string as a valid topic name
in syntax for linking to channel messages.

The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.

The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
2025-01-31 14:23:15 -08:00
Prakhar Pratyush
e08bf15682 stream_topic_link: Add support for empty string topic in syntax.
This commit adds support for empty string as a valid topic name
in syntax for linking to topics.

The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.

The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
2025-01-31 14:23:15 -08:00
Kislay Verma
dfc1ea785f markdown: Support message link syntax in local echo.
This is a followup to #31965 where we added
support for a new syntax for message links.
The frontend markdown processor didn't local
echo the syntax properly, resulting in a
rendering glitch in the messages.
2024-12-03 10:41:37 -08:00
Kislay Verma
c56cc14539 marked: Fix typo in guard clause.
Before calling streamTopicHandler, we ensure
that it is a function.
2024-12-03 10:41:37 -08:00
Sayam Samal
d619ffa9c4 bootstrap: Remove unused bootstrap button classes.
This commit removes the `button-secondary`, `button-group` and
`bootstrap-btn-group` classes which don't have any corresponding styles
attached to them or are no longer in use in the codebase.
2024-11-21 10:14:26 -08:00
Sayam Samal
35ba96bd9d recent_view: Remove bootstrap classes from recent view buttons.
This commit removes the final vestiges of `bootstrap-btn-default` class
from the codebase, by moving the relevant styles from the
`bootstrap-btn` and `bootstrap-btn-default` classes to the
`button-recent-filters` class.
2024-11-20 11:08:58 -08:00
Sayam Samal
743d0dbaa2 bootstrap_portico: Rename btn-group -> bootstrap-btn-group.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal
045efadab9 bootstrap-btn: Rename btn -> bootstrap-btn.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal
5fc226c8ef bootstrap: Rename btn-default -> bootstrap-btn-default.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Anders Kaseorg
905fc3b50e marked: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Karl Stolley
155fc9f1d7 link_styles: Establish variable-based generic link styles. 2024-10-15 15:04:47 -07:00
Karl Stolley
dca1ecf3b0 bootstrap-btn: Remove unnecessary warning, danger styles.
With Zulip's own .button class rewriting these everywhere, outside
of .new-style, there is no need to maintain the Bootrap
definitions.
2024-09-11 14:22:45 -07:00
Sayam Samal
4457225d35 bootstrap: Remove legacy nav nav-list classes and related CSS.
With the redesign of all popovers completed, we have transitioned away
from the legacy Bootstrap-based popover system. As a result, the
Bootstrap `nav nav-list` classes are now obsolete and no longer used
in the codebase.

This commit, a part of the efforts to clean up the legacy Bootstrap CSS,
removes these unused classes and any related CSS workarounds.

Fixes #26990.
2024-07-15 10:00:22 -07:00
Aman Agrawal
bb440e0a7a typeahead: Move CSS file with other styles.
We want to keep typeaheads CSS together to make it easy to reason
about changes and this looks like the right file to keep the
CSS in.
2024-07-09 09:42:10 -07:00
Aman Agrawal
ce9c9ddf12 typeahead: Fix search typeahead open on near narrows.
This css accidentally got removed in #29882. This bug fix was
originally part of #30514.
2024-07-01 22:33:36 -07:00
Aman Agrawal
52ac602acb typeahead: Make them look like dropdown widget.
This attempts to change background color and text color of typeaheads
to be same as dropdown widgets we have in the app.
2024-06-26 16:26:31 -07:00
evykassirer
7ae0972c28 typeahead: Hide by default and show container on show().
This avoids a bug (currently only for search) where the page
can be loaded with an empty but visible (half-loaded) search
typeahead.
2024-06-26 12:02:10 -07:00
Aman Agrawal
ef09051003 css: Move text-error class from bootstrap.
Remove hover and focus CSS for anchor tags since `text-error` elements
which use this CSS right now don't have anchor tag.
2024-06-26 10:03:05 -07:00
Aman Agrawal
959bf39320 bootstrap: Remove unused text-warning class. 2024-06-26 10:03:05 -07:00
Aman Agrawal
3aaf25e42d bootstrap: Remove unused dropdown class.
We don't have any element using dropdown class in codebase.
2024-06-24 09:06:53 -07:00
Aman Agrawal
244d4e9620 bootstrap: Move hidden class to app_componenets. 2024-06-24 09:06:53 -07:00
Aman Agrawal
8457d12e59 bootstrap: Remove hide/show classes. 2024-06-24 09:06:53 -07:00
Aman Agrawal
16f2c4195b activity: Move .container CSS from bootstrap to activity.css.
* `.container` class is only used in `/activity/support` and
  `/activity/remote/support` pages. It is also used in emails but
  it has its own CSS.

* Since the CSS applied is localized and looks good, we just
  move the CSS relevant to us to `activity.css` which is used
  by both of these pages.

* Searched `"container"`, ` container `, `"container ` and
  ` container"` to look for the uses of this class.
2024-06-11 10:42:43 -07:00
Anders Kaseorg
13c44efad9 marked: Fix type stub to declare marked as a CommonJS module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-08 00:26:38 -07:00
Aman Agrawal
b1a143e47c css: Remove unused row-fluid class. 2024-06-05 09:15:32 -07:00
Aman Agrawal
4e87f35c7d typeahead: Use tippy to position typeaheads without a specified parent.
Except for search typeaheads which have a specific parent container,
we position typeaheads using tippy.
2024-05-08 10:05:27 -07:00
Anders Kaseorg
64cabae46d web: Fix usage of .replace with variable replacement.
String.prototype.replace and String.prototype.replaceAll interpret
certain sequences such as $$ within a string provided as the
replacement argument.  Avoid this interpretation by providing a
function.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-04-05 09:11:23 -07:00
evykassirer
03ec788a91 typeahead: Move module to web/src. 2024-03-11 09:56:18 -07:00
evykassirer
a55979ebf8 typeahead: Fix buggy advanceKeyCodes code.
The `advanceKeyCodes` option was introduced in #10092.
It included a buggy check for `$.inArray` that returned
a falsey value only when the keycode was the first
element of `advanceKeyCodes`.

Because the only instance of `advanceKeyCodes` right now
is for search and contains only one element, this change
is functionally equivalent.
2024-03-11 09:56:18 -07:00
evykassirer
99c119b01b typeahead: Add missing option to lookup call. 2024-03-11 09:56:18 -07:00
evykassirer
593784b35f typeahead: Remove unused on_move option. 2024-03-11 09:56:18 -07:00
evykassirer
aa4e92ee18 typeahead: Stop using html() to set value from updater().
I confirmed that updater() only returns a string or undefined.

composebox_typeahead.js

- compsebox calls `content_typeahead_selected` which returns the composebox
  text content
- stream and PM: implicitly returns undefined

pill_typeahead.js

- implicitly returns undefined

search.js

- narrow_or_search_for_term — returns `get_search_bar_text` or empty string

custom_profile_fields.js, settings_playground.js

- no updater function

If no updater function is provided, then updater returns the
value passed to it, which is
`this.$menu.find(".active").data("typeahead-value")`, which is a string.
2024-03-11 09:56:18 -07:00
evykassirer
30ecf6fafd typeahead: Don't call html with a jquery object.
This is helpful beyond appeasing the linter, because TypeScript only
[permits](https://unpkg.com/browse/@types/jquery@3.5.29/JQuery.d.ts#L5287)
`.html(…)` to accept a `string` or `HTMLElement` argument (or
function returning those), not JQuery. The behavior with a JQuery
argument is also [undocumented](https://api.jquery.com/html/#html2).
2024-03-11 09:56:18 -07:00
evykassirer
2140138f5e typeahead: Confirm that highlighter text is safe html.
All existing typeaheads have values for highlighter that are one
of the following:

* render_search_list_item (a handlebars render function)
* render_typeahead_item which calls a handlebars render function
* another function in typeahead_helper which eventually calls
  typeahead_helper
2024-03-11 09:56:18 -07:00
evykassirer
7219e3835d typeahead: Confirm that header text is safe html.
All current definitions of header(), which is renamed to
header_text() in this commit:

composebox_typeahead.js
- `get_header_html` uses `_.escape`
- `render_topic_typeahead_hint` — is a handlebars function
- third typeahead doesn’t have a header function

custom_profile_fields.js, pill_typeahead.js, search.js,
and settings_playground.js have typeaheads, but none of them
have header functions.
2024-03-11 09:56:18 -07:00
evykassirer
135395e8ce typeahead: Remove unused header_html option. 2024-03-11 09:56:18 -07:00
evykassirer
60018dfd12 typeahead: Use text() instead of html() in set_value.
This particular codepath is never reached right now,
because set_value is only called when `naturalSearch`
is `true`, and the only instance of `naturalSearch`
isn't for a `contenteditable` field.

But we don't need to use `html()` here because it's
displaying a plain string typeahead option.
2024-03-11 09:56:18 -07:00
evykassirer
099810e80f typeahead: Import jquery instead of passing it to a wrapper function. 2024-03-11 09:56:18 -07:00