Spawned from #3194350: Implement new form element designs for Olivero

Olivero's autocomplete input does not have disabled styling

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mherchel created an issue. See original summary.

Gauravvvv’s picture

I have attached a patch and after patch screenshot for reference. Please review.

Gauravvvv’s picture

Status: Active » Needs review
imalabya’s picture

Status: Needs review » Needs work

@Gauravmahlawat The issue is that the autocomplete fields don't have a style when they are disabled. Moving it to NW

imalabya’s picture

Status: Needs work » Needs review
FileSize
3.2 KB

Added a patch that applied the disabled styling for autocomplete field.

vikashsoni’s picture

@imalabya i am getting error when applying the patch if i am missing some tell me check screenshot

cindytwilliams’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
30.52 KB
30.51 KB

Patch #5 applied cleanly via Composer, and the disabled autocomplete input field now has disabled styling. Marking RTBC.

Before patch:

After patch:

kleiton_rodrigues’s picture

I applied patch and the input field now has disabled styling css.
It's good for me.

RTBC +1.

vikashsoni’s picture

FileSize
30.52 KB
30.51 KB

Applied patch working fine sharing the screenshot...

mherchel’s picture

Status: Reviewed & tested by the community » Needs work

This looks great for normal left-to-right languages (such as english), but the styling does not work for RTL languages (such as arabic). These styles are controlled in the same file around line 32. We basically need to do the same thing there. We also should be adding the /* LTR */ comment after each CSS line that is LTR specific like the background-position property's line (see https://www.drupal.org/docs/develop/standards/css/css-formatting-guideli...).

cindytwilliams’s picture

Status: Needs work » Needs review
FileSize
4.93 KB

Here is a patch that applies the disabled styling for autocomplete fields for both RTL and LTR languages, with /* LTR */ comments added where needed.

cindytwilliams’s picture

FileSize
7.09 KB

I forgot to add the disabled color for RTL. Added that to this patch, along with the disabled styling for autocomplete fields for both RTL and LTR languages, and the /* LTR */ comments where needed.

mherchel’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
4.93 KB
5.85 KB
57.02 KB
54.34 KB

The autocomplete-loading.module.pcss.css looks perfect. The reason why the commands failed in the patch above is because the compiled CSS in the patch didn't match the compiled CSS that core output when running yarn build:css. You'll want to make sure your dependencies are up to date by running yarn install from the /core directory.

I'm including an updated patch an interdiff here. Setting to RTBC since the only thing we're changing is the generated files.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/olivero/css/components/autocomplete-loading.module.pcss.css
@@ -15,7 +15,14 @@
+  background-color: transparent;

I think it would be better to set this to --color--white like we do on form-text.pcss.css to ensure the text has sufficient contrast

mherchel’s picture

Status: Needs work » Needs review
FileSize
5.85 KB
2.68 KB

I think it would be better to set this to --color--white like we do on form-text.pcss.css to ensure the text has sufficient contrast

Done!

BhumikaVarshney’s picture

FileSize
30.43 KB
31.44 KB

Hi @mherchel,
The patch applies cleanly and also now the color is set to --color--white.
Thanks.

Abhijith S’s picture

Applied patch #15 and it works fine.Adding screenshots.

Before patch:
before

After patch:
after

RTBC +1

djsagar’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
26.56 KB
23.3 KB

Applied patch #15 and working as accepted so moving this as on RTBC.

Adding attachment.

  • lauriii committed 88d8300 on 9.2.x
    Issue #3200644 by mherchel, cindytwilliams, Gauravmahlawat, imalabya,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 88d8300 and pushed to 9.2.x. Thanks!

Gauravvvv’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.