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

Autocomplete is excessively crushed in narrow timelines #21393

Open
novocaine opened this issue Mar 11, 2022 · 7 comments
Open

Autocomplete is excessively crushed in narrow timelines #21393

novocaine opened this issue Mar 11, 2022 · 7 comments
Assignees
Labels
A-Threads O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Design Z-Maximised-Widgets

Comments

@novocaine
Copy link
Contributor

Steps to reproduce

  1. Go into a thread
  2. @ someone and start typing

Screenshot 2022-03-11 at 14 39 44

Outcome

What did you expect?

For things to be laid out nicely

What happened instead?

The box is crushed

Operating system

OS X

Browser information

Chrome

URL for webapp

develop.element.io

Application version

Element version: f149f9a-react-1eb67047c90d-js-9fc8048c307f Olm version: 3.2.8

Homeserver

matrix.org

Will you send logs?

No

@novocaine novocaine added T-Defect A-Threads Z-ThreadsInternalTesting S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Mar 11, 2022
@SimonBrandner
Copy link
Contributor

Related/duplicate of #17923

@germain-gg
Copy link
Contributor

This would be frequent for maximised widget rooms too

@germain-gg germain-gg changed the title Autocomplete is excessively crushed in threads Autocomplete is excessively crushed in narrow timelines Mar 11, 2022
@novocaine novocaine assigned t3chguy and unassigned germain-gg Apr 7, 2022
@t3chguy
Copy link
Member

t3chguy commented Apr 22, 2022

Needs design input for how it should look, there is a really limited amount of space even if we allow it to take up the whole width of the right panel at min-width

image

@t3chguy
Copy link
Member

t3chguy commented Apr 22, 2022

(ongoing design discussion in the linked PR)

@janogarcia
Copy link

janogarcia commented May 2, 2022

@t3chguy @novocaine

So the idea is to properly redesign the autocomplete panels (as in the quick example I shared in the PR) as we go over dealing with all the inherited UX debt.

In the meantime, as a limited-scope incremental improvement, I made some tweaks to those directly in the web inspector to make sure the suggested changes are straightforward to implement.


Global changes

.mx_Autocomplete {
    box-shadow: 0px -16px 32px rgb(0 0 0 / 4%), 0px -2px 4px -2px rgb(0 0 0 / 12%); // improved foreground-background separation
}

.mx_Autocomplete_Completion_description {
    color: #737D8C; // use secondary color token
    font-size: 12px;
}

.mx_Autocomplete_provider_name {
    color: #737D8C; // use secondary color token
    
font-weight: 500;
}

.mx_BasicMessageComposer_AutoCompleteWrapper {
    width: calc(100% + 100px); // just to get the idea of how it should look, change it as necessary to avoid making it rely on a hardcoded value
}

Commands panel

.mx_Autocomplete_Completion.selected, .mx_Autocomplete_Completion:hover {
    
border-radius: 8px;

}

Commands panel - Only in wide mode:

.mx_Autocomplete_Completion_block {

    margin-bottom: 2px;

    padding-bottom: 4px;

    padding-top: 4px;

}


Commands panel - Only in narrow mode:

.mx_Autocomplete_Completion_block {

    margin-bottom: 8px;

    padding-bottom: 8px;

    padding-top: 8px;

}


.mx_Autocomplete_Completion_description {

    margin-bottom: 4px;

}


Users panel

mx_Autocomplete_Completion_pill
 {
    padding-left: 6px; // name pills
}

Also, make sure that:

  • Display name and Matrix User ID are not spaced out.
  • The Matrix User ID (first) and Display name (second) are truncated as necessary.

Reference screenshots

Figma

Commands - Wide

Commands - Wide

Commands - Narrow

Commands - Narrow

Users - Wide and narrow

Users - Wide and narrow

Users - With truncation

Users - With truncation

@t3chguy
Copy link
Member

t3chguy commented May 11, 2022

@janogarcia just to confirm, you said

Match the composer width.

but that seems to mean different things in Figma, in the right panel it goes as wide as the Send button, in the main timeline it only goes as wide as the input box (composer)

@janogarcia
Copy link

janogarcia commented May 11, 2022

Match the composer width.

@t3chguy That probably was mentioned in a previous/different discussion. I'd recommend ignoring that and just follow the screenshots above (they are the same on Figma, I just tweaked the styles via dev tools).

As for the autocomplete width, as you already pointed out, I only changed it for the narrow container as a responsive optimization. We don't need to make it wider otherwise for large containers.

166206360-e53c8432-f85d-4f90-8745-9f794aadc9f2

The value I used for the width, calc(100% + 100px), is just to give you the idea of how it should look, but feel free to implement a better way to expand the width appropriately so that we don't rely on brittle hardcoded/magic numbers.

Hope that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Threads O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Design Z-Maximised-Widgets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants