Commit Graph

84 Commits

Author SHA1 Message Date
Karl Stolley
dd938911f7 compose_box: Set auto height on textarea in full screen. 2023-11-15 15:23:48 -08:00
Karl Stolley
17e87c9a20 compose_box: Fix regression on full-screen Preview areas. 2023-11-15 09:04:54 -08:00
Karl Stolley
c5b7432cf2 compose_box: Maintain top alignment in Preview mode. 2023-11-15 09:04:54 -08:00
Karl Stolley
6f8cac8077 compose_box: Better align and maintain alignment of topic marker. 2023-11-14 13:14:40 -08:00
Karl Stolley
e82c875bc3 compose_box: Remove unreachable enter_sends cruft. 2023-11-14 12:10:38 -08:00
Karl Stolley
0c95772f4e compose_box: Maximize clickable area on send-later vdots. 2023-11-14 09:21:11 -08:00
Karl Stolley
5bedbb14b4 compose_box: Rename message-control-button to send-control-button. 2023-11-14 09:21:11 -08:00
Karl Stolley
93d6bcef0e compose_box: Properly present Drafts button in all languages. 2023-11-13 12:45:13 -08:00
Karl Stolley
be34c4c2ef compose_box: Improve Drafts and button alignment in smaller views. 2023-11-13 12:45:13 -08:00
Karl Stolley
7209476b18 compose_box: Integrate Drafts, Enter-to-send in send-later popover. 2023-11-13 12:45:13 -08:00
Karl Stolley
601faf8548 compose_box: Handle responsive layouts on send column.
Fixes #27576.
2023-11-13 12:45:13 -08:00
Karl Stolley
a6b3e74f7d compose_box: Sensibly style disabled Send/vdots buttons. 2023-11-13 12:45:13 -08:00
Karl Stolley
609106e2d0 compose_box: Implement redesigned vdots-button styles. 2023-11-13 12:45:13 -08:00
Karl Stolley
bf0e806fed compose_box: Implement redesigned send-button styles. 2023-11-13 12:45:13 -08:00
Karl Stolley
f8fa47fa02 compose_box: Use columnar flex to position Drafts, limit, Send button. 2023-11-13 12:45:13 -08:00
Karl Stolley
a3c1399924 compose_box: Handle compose and preview expansion. 2023-11-13 12:45:13 -08:00
Karl Stolley
ec38c7b5be compose_box: Establish basic message box grid geography. 2023-11-13 12:45:13 -08:00
Karl Stolley
9f00b513f7 compose_box: Improve structures around compose buttons. 2023-11-13 12:45:13 -08:00
Karl Stolley
e608a389af compose_box: Improve structures around send controls. 2023-11-13 12:45:13 -08:00
Karl Stolley
b4b71880e1 compose_box: Prepare redesign send and draft structures. 2023-11-13 12:45:13 -08:00
Karl Stolley
f98570704d compose: Present Start new topic button adjacent the reply button.
Fixes: #24889.

Co-Authored-By: Daniil Fadeev <[email protected]>
2023-10-10 17:37:03 -07:00
Karl Stolley
654469b29f compose: Make DM identifiers align with new conversations. 2023-10-10 17:37:03 -07:00
Karl Stolley
c73de34f32 compose: Introduce 'Start new conversation' button. 2023-10-10 17:37:03 -07:00
Karl Stolley
5b82a62b26 compose: Add button to clear topic box.
Fixes part of #24889.

Co-Authored-By: Daniil Fadeev <[email protected]>
2023-10-10 17:37:03 -07:00
Karl Stolley
88f4ecc943 compose_banner: Restore CSS overzealously removed in #27097.
This also includes a comment for future contributors, explaining
why these styles are necessary.
2023-10-10 10:01:11 -07:00
Karl Stolley
d887fb57e7 compose_banners: Better align action and cancel buttons.
This uses the banner message's line-height to set a
max-height on the action and cancel buttons to maintain
a consistent vertical spacing.

Additional uses of flexbox here:

1. help the button to remain shorter when it's adjacent a
   single-line banner message, and
2. center the closing X icon relative to the current size
   of the action button, when one is present
2023-10-09 11:55:01 -07:00
Karl Stolley
fe8fc98912 compose_banners: Structure innner <p> elements with .banner_message class.
This also styles those inner .banner_message elements to lose
margin inherited from Bootstrap. (This is now also applied to
the upload-message banner.)

It's better to achieve that with a class selector; using a `p`
element selector would mean that such a style would be evaluated
for all `<p>` elements in the DOM. Which is of course a whole lot,
thanks to Markdown alone.

Fixes: #26922
2023-10-09 11:55:01 -07:00
Karl Stolley
3fdf85872e compose_banners: Remove unnecessary upload-message styles. 2023-10-09 11:55:01 -07:00
Sayam Samal
8d3f2baebf tooltips: Use <div> tags inside tooltip's inner content.
By replacing `<span>` tags with `<div>` tags inside the tooltip's inner
content we remove the redundancy of having to use break tags to
separate the tooltip's title and it's content.

We also replace any `<p>` tags with `<div>` tags for the following
reasons:

- Since what we want to achieve are just block elements in order to
avoid the break tags, using `<div>` tags provide use with a wider
scope of use cases.

- We don't want the pause, screen readers often introduce after reading
the contents of a paragraph.

- The `<p>` tag cannot contain tables and other block-level elements.

- The semantic meaning of the <p> tag doesn't apply to the commonly
used tooltip content.
2023-10-03 14:37:47 -07:00
Karl Stolley
ec8e6c2179 compose_banners: Explicitly target banner content, child p.
This ensures uniform display and flexing of different bits of
banner content, including:

* Banners like Sent! Scroll down to view...) that have only a
  classless `<p>` marking their content
* Banners like the unscheduled message allert, which puts a
  .banner_content class right on the paragraph
* Banners like the Your message was sent to a stream you have
  muted", which tuck a `<p>` into a div with the .banner_content
  class
2023-09-28 17:06:49 -07:00
Karl Stolley
89ce2c112c vdots: Place new more-vertical icon in compose box. 2023-09-14 17:13:58 -07:00
Karl Stolley
5708b57acd compose: Present banners with intrinsic layout.
By implementing a careful flexbox declaration on a new banner-
element container, this presents banners accessibly across the full
range of possible viewports--and relies only on a single, small
media query to do so.

Fixes: #25847

Co-Authored-By: Hardik Dharmani <[email protected]>
2023-09-14 10:13:29 -07:00
yogesh sirsat
953f026487 compose: Disable unneeded control buttons in preview mode.
Buttons which change the content in the compose textarea were so far
enabled even in preview mode, and would work, but those changes would
not be reflected in the visible preview. This is extremely confusing,
and can lead to the possibility of a user accidentally changing the
content of the compose textarea while previewing, and sending that.

Now we disable those buttons in preview mode, both when composing a new
message and when editing an existing one. We still show the tooltips,
but grey them out and make them unclickable.

Fixes: #20962
2023-09-13 15:09:16 -07:00
Aman Agrawal
6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Sahil Batra
861312e120 bootstrap: Remove bootstrap CSS for "small" element.
We use "small" element only to show secondary details in
a typeahead option. This commit re-adds bootstrap CSS
rule to the specific element in compose.css and removes
the CSS from bootstrap.css.

Also, we do not use small elements inside any of h1, h2,
h3, h4 and blockquote elements, so the CSS for those can
be safely removed.
2023-07-23 15:44:58 -07:00
Aman Agrawal
0024e88fcb css: Remove unused float property.
Ths is already alingned corrected using flex, so no need to use float.
2023-07-11 13:37:50 -07:00
Aman Agrawal
233b486618 css: Use variable font when using Source Sans 3.
This is to overcome the limitations of previous static font,
which didn't allow us to use various font widths.
2023-07-06 17:57:37 -07:00
Palash Baderia
624fea2e8e upload_banner: Add a cancel button.
This commit adds a cancel button to the upload banner, replacing
the previous close icon. Now, the cancel button is used to cancel
the upload process, while the close icon is used to remove the
upload banner without interrupting the upload.

A new case has been added to the switch statement in the 'upload.js'
file to handle the functionality of hiding the banner called
'upload_banner_hide_button'.

Replaced the functionality of the 'compose_banner_close_banner' case
inside the switch statement with a new case called
'upload_banner_cancel_button'. The cancel button is now assigned
the selector 'upload_banner_cancel_button'.

`Cancel` button is only preset for banner which tracks
progress while a file is being uploaded.

To maintain consistency with other banners, the cancel button's
dimensions and color have been adjusted to match the style of other
buttons present in different banners.

Fixes: #21156
2023-07-06 16:11:09 -07:00
Daniil Fadeev
9c675ce62d giphy: Migrate Giphy popover to Tippy. 2023-07-05 14:43:19 -07:00
Daniil Fadeev
4976655dda compose: Remove unused styles for compose_gif_icon. 2023-07-05 14:43:19 -07:00
Daniil Fadeev
37b9e96790 compose: Remove unused hide styles for compose_control_button.
We use the styles from `app_components.css`.
2023-07-05 14:43:19 -07:00
Daniil Fadeev
83b4fef060 compose: Fix keyboard indicator vertical alignment in send shortcut. 2023-06-23 10:53:51 -07:00
Joelute
ccdbdb35b2 unread_banner: Refactor HTML to use main view banner stylings.
Previously, the HTML structure of unread banners continued to utilize the
old stylings. We are currently in the process of simplifing both the
compose banner and unread banner stylings into one. These change will
update the HTML structure to be the same as the compose banner and use
the new stylings.
2023-06-09 11:31:51 -07:00
Joelute
00add94045 compose_banner: Rename classnames to main-view-banner.
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
to main-view-banner.
2023-06-09 11:31:51 -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
Joelute
80ace5c789 compose_banner: Update classnames to main-view-banner-close-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_close_button
to main-view-banner-close-button.
2023-06-09 11:31:51 -07:00
Karl Stolley
30b7da34e0 css: Size stream recipient box for small screens.
This allows the recipient box to take 100% of the available
horizontal space, up to 175px. The effect is that the
compose-box buttons are available to users at mobile scales
(viewports of 400px wide or less).
2023-05-30 10:39:25 -07:00
Tim Abbott
1f8b3fd09a css: Fix fluid_layout_width setting.
0457f6807c seems to have accidentally
inverted the setting; we also clean up duplicate declarations of this
1400px value.
2023-05-28 22:06:16 -07:00
Aman Agrawal
8654f839b5 overlays: Stop document from occupying the extra scrollbar width.
When overlay / modal is displayed, scrollbar is hidden due to
the disabled scrolling on `html`. Reduce width of fixed elements
that will be visible in background and `html` so that they don't
occupy that extra space.

Also, I was over-thinking how we can get the scrollbar width. The
moment we allowed scrolling on `html`, it was easy to get the
scrollbar width.
2023-05-28 15:20:20 -07:00
Karl Stolley
060c95dda6 compose_box: Explicitly set topic bar text color. 2023-05-25 17:19:29 -07:00