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

feat: show dropdown with selected items when readonly #3686

Merged
merged 7 commits into from
Apr 22, 2022

Conversation

web-padawan
Copy link
Member

Description

As discussed internally, the dropdown should be also available when readonly, so user can see all the selected items.
In this case, interacting with the items isn't possible: you can't un-select them with keyboard or mouse click.

readonly-dropdown

Type of change

  • Feature

@web-padawan web-padawan added the papercuts "Services Papercuts" project label Apr 18, 2022
@jouni
Copy link
Member

jouni commented Apr 19, 2022

If I can wish, I would also hide the clear button in the chips (x) in read-only mode.

@web-padawan web-padawan force-pushed the feat/mcb-readonly-dropdown branch from 585ee9b to 33924ea Compare April 19, 2022 08:46
@web-padawan
Copy link
Member Author

I would also hide the clear button in the chips (x) in read-only mode.

Thanks, done. Also updated themes to hide it when disabled for consistency.

@vursen
Copy link
Contributor

vursen commented Apr 19, 2022

Just happened to notice a suspicious artifact in the gif. What is this thing?

image

@jouni
Copy link
Member

jouni commented Apr 19, 2022

What is this thing?

It’s a visual indication that there are multiple "collapsed/stacked" chips, not just one.

@web-padawan
Copy link
Member Author

Just happened to notice a suspicious artifact in the gif. What is this thing?

Actually, it's kind of a feature, related to another PR in review - please see #3632.

Here is the original design for this extra border: vaadin/platform#2690 (comment)

@vursen
Copy link
Contributor

vursen commented Apr 19, 2022

It’s a visual indication that there are multiple "collapsed/stacked" chips, not just one.

Actually, it's kind of a feature, related to another PR in review - please see #3632.

Ah, right. :)

@DiegoCardoso
Copy link
Contributor

I am thinking that the toggle button color could be in a different shade. Maybe the same as the color when it's not on ready only state. My feeling is that with the current color, it doesn't clearly indicate it's clickable (and might even fail some a11y contrast test, but I didn't test it yet).

@web-padawan
Copy link
Member Author

the toggle button color could be in a different shade. Maybe the same as the color when it's not on ready only state

Good catch. Updated Lumo and Material themes accordingly.

@DiegoCardoso
Copy link
Contributor

For a multi select with no items selected, the overlay opens with all the options.

multi-select-empty-read-only.mp4

@web-padawan
Copy link
Member Author

For a multi select with no items selected, the overlay opens with all the options.

@DiegoCardoso Thanks, fixed. Also updated toggle button styles to use [has-value] accordingly.

@DiegoCardoso
Copy link
Contributor

nit: maybe we can change the cursor to default here

multi-select-read-only-material.mp4

.

@web-padawan web-padawan force-pushed the feat/mcb-readonly-dropdown branch from bc64e82 to 25236ae Compare April 21, 2022 11:09
@web-padawan web-padawan force-pushed the feat/mcb-readonly-dropdown branch from 25236ae to a1295c8 Compare April 21, 2022 11:10
@web-padawan
Copy link
Member Author

maybe we can change the cursor to default here

@DiegoCardoso Thanks, fixed.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan removed the request for review from jouni April 22, 2022 09:47
@web-padawan web-padawan merged commit ee23edf into master Apr 22, 2022
@web-padawan web-padawan deleted the feat/mcb-readonly-dropdown branch April 22, 2022 09:47
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.1.0.alpha4 and is also targeting the upcoming stable 23.1.0 version.

@knoobie
Copy link
Contributor

knoobie commented Sep 10, 2022

@web-padawan looks like this feature doesn't work (can be reproduced in the docs and was reported here vaadin/platform#3257)

@web-padawan
Copy link
Member Author

Thanks. It's also reported here: vaadin/flow-components#3684. We will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants