Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI redesign: compose box #24878

Open
6 of 15 tasks
terpimost opened this issue Mar 27, 2023 · 6 comments
Open
6 of 15 tasks

UI redesign: compose box #24878

terpimost opened this issue Mar 27, 2023 · 6 comments
Labels
area: compose (misc) priority: high redesign Part of the webapp redesign project, including blockers. umbrella list Checklist of issues for a project/goal

Comments

@terpimost
Copy link
Collaborator

terpimost commented Mar 27, 2023

The new design for the compose box, discussed here

Light Dark

Work on this issue is being tracked as:

We will likely file additional specific issues as we close out these ones. #28588 also tracks some follow-ups to be filed.


Live demo with the source code on GitHub. Here is the decomposed source code archive (possibly outdated; consult the GitHub links):
compose-decomposed.zip

The css code is split to decomposed areas but all the js code is in a single file. The file isn't big so it is easier to follow the logic of interactions between html and js.

Not all interactions are handled. Prototype is focused on styles and new interactions which are not currently present.
For example it doesn't suggest TAB order but does suggest focus styles on different elements.

The integration is expected to be complex. With clarifications and tuning during the process.

Notes on this interactive prototype

Inline editor

First editor is in not editable state and with a copy button:
image

Character counter should be enabled once the input reaches the limit (I didn't do that logic for inline editor)
image

Popovers

image image image

  • No pointing arrows for typeahead (autocomplete) popovers.
  • For send-more menu I don't think we need a pointing arrow but I'm not against it: image
  • Drafts becomes an item of send more popover in mobile version: image
  • Radio buttons should be switched by JS reacting on click on the whole row: image
  • In typeahead popover there could be no 2 selected items like this image, so when one item is highlighted and mouse hovers another element, the previous element should be de-highlighted.
  • Scroll bars made via styling browser bars, but we might want to use simple bar here for the better control.
  • Popover background isn't white, to be able to place interactive input field with white background like this
    image. Also it is ok to have styles of these popovers not like styles of general context menu popovers.
  • We had discussion about colors of user statuses and agreed with @alya on the latest contrast

Drafts

Drafts button is present in the desktop version, but the counter of drafts should be shown only for the relevant conversations when there is any number. For other than desktop versions we hid this counter due to space limitation.
The space should be enough to fit all the translations of the Drafts keyword, but it is ok to cut it if it doesn't fit.

The maximum displayed number is 99+ image

Topics

Click on the topics selects the whole input
image. This is intentional, so the user can replace topic with another one.

This prototype assumes that we have feature of naming (no-topic) with General chat in english version. Here is one of the related discussions.

Go to topic button appears in front of the topic/users input field:
image

Streams

This prototype assumes that we have switcher to DMs with Streams selector:
image. DM should be shortened in the selected state, so input filed of users could be wider.

Banners

Updated styles of banners is provided. To see them, click on Send button: image. Also input 9,500 characters and above 10,000 to see error and warning banners:
image
image

Message input field

The message input field is content editable block and not a text area. So many cases of pasting the content are not handled. For example images and their styles. If we are going to show images here their styles should have width:100% to not extend the compose box width. Or there could be other ways to constrain the width of the message input box.

@terpimost terpimost added the redesign Part of the webapp redesign project, including blockers. label Mar 27, 2023
@zulipbot
Copy link
Member

zulipbot commented Mar 27, 2023

Hello @zulip/design, @zulip/server-compose members, this issue was labeled with the "area: compose", "redesign" labels, so you may want to check it out!

@Ddharmani3
Copy link
Collaborator

@terpimost I would like to work on this issue can you please assign this to me?

@alya
Copy link
Contributor

alya commented Mar 27, 2023

@Ddharmani3 As noted in the contributor guide, please choose an issue with the "help wanted" label. Thanks!

@zulipbot
Copy link
Member

zulipbot commented Jun 19, 2023

@karlstolley You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@tgross35
Copy link

tgross35 commented Jul 2, 2023

Has the collapsed compose box & draft behavior been considered as part of the design?

I think the current behavior is somewhat confusing, where clicking or ESCing both hides the compose box and creates a draft. It's a bit too easy to accidentally click somewhere and send your message to a draft.

My suggestion is that the collapsed compose box should be thought of as having the same state/content of the normal compose box, just condensed and read-only: that is, clicking/ESCing should continue to minimize the box, but the minimzed box should have the first line of text visible instead of the Message #general>... subtle text. Then clicking on this maximize the box. I would prefer an explicit "save draft" button, or to save the draft when navigating away.

This relates to #18555, but it seems that is more about handling when drafts are stored to the server as opposed to keeping them in the same view when the box is minimized.

@terpimost
Copy link
Collaborator Author

Note from Zulipchat:

  • We use X button in open compose box instead of New Topic
    In the closed compose state, starting a new topic is the main action we expect this button to be used for, since replying to an existing topic is likely to be done by navigating to it in the sidebar.
  • In a stream view, same as the current "New topic" button.
  • In a DM view, same as the current "New direct message" button. Note that the plan has been do drop the "New direct message" button in the new design.
  • In other views (e.g., Recent conversations), open the compose box with the destination dropdown open, like the "New stream message" button in the version currently deployed on CZO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compose (misc) priority: high redesign Part of the webapp redesign project, including blockers. umbrella list Checklist of issues for a project/goal
Projects
Status: No status
Status: No status
Development

No branches or pull requests

6 participants