Problem/Motivation
Autocomplete field inputs lack appropriate styles for smaller screens in Bartik, so they break the layout:

This issue does not occur in Seven or Olivero so I think it's specific to Bartik.
Follow up from #3135137: Views exposed filters with autocomplete are much wider than text filters
Steps to reproduce
- Install Drupal
- Create a view with an autocomplete exposed filter
- Display the view in Bartik via a page or a block
- View it on a smaller screen
- See that the autocomplete field is too wide
Proposed resolution
Add some CSS to handle this field on smaller screens, as with Seven: https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/seven...
Remaining tasks
- Patch / merge request with CSS update
- Review
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #34 | tablet.jpg | 9.25 KB | gaurav-mathur |
| #34 | samsung.jpg | 5.68 KB | gaurav-mathur |
| #34 | iphone-12.jpg | 5.12 KB | gaurav-mathur |
| #24 | After Patch 3192254 up Android.png | 239.13 KB | chetanbharambe |
| #24 | After Patch 3192254 up iPhone.png | 237.31 KB | chetanbharambe |
Issue fork drupal-3192254
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
djsagar commentedHi @pameeela,
I created small patch for this, adding 100% width by using the media-query.
Please review and please provide your feedback for above issue i hope this will work for you.
Thanks!
Comment #3
ranjith_kumar_k_u commentedThe patch works fine.
Before patch

After patch

Comment #5
nishat ahmad commentedCheck it this patch, If there is any let me know.
Thanks
Comment #6
nishat ahmad commentedComment #7
pameeela commented@Nishat Ahmad there is already a patch. Is there some problem with the one already provided in #2?
Comment #8
nishat ahmad commentedHi,
@pameeela I have wrote the code on in different file and No any issue with #2.
Comment #9
djsagar commentedHi @Nishat Ahmad Please check your inter-diff in #8 is empty.
Thanks!
Comment #10
pameeela commentedThis issue doesn't require a new patch, there already is one. The patches in #4 and #5 include a lot of changes that are not related to this issue.
Please don't upload any new patches to this issue unless there is a specified problem with the patch in #2 that is being addressed? And if so please advise what the problem is and why it requires a new patch.
Comment #11
djsagar commentedHi @pameeela,
This is because of value size,
please review the attachment.
Thanks!
Comment #12
pameeela commentedPatch doesn't apply.
Comment #13
kiran.kadam911Tested Patch #2 applied successfully. It's working fine now.
Before patch SS:
After patch SS:
Ready to move RTBC.
Thanks!
Comment #15
akhildev.cs commentedhi
I try the #2 patch on "9.3.x-dev" .but it not fine in small screen mobiles, see attachment.
Comment #16
lauriiiComment #17
kiran.kadam911Re-roll 9.3.x
Thanks!
Comment #18
chetanbharambe commentedVerified and tested patch #17
Patch applied successfully and looks good to me.
Testing Steps:
# Goto: admin/structure/views
# Create a view with an autocomplete exposed filter
# Display the view in Bartik via a page or a block
# View it on a smaller screen
# See that the autocomplete field is too wide
Expected Results:
# Views autocomplete input should be in proper width on mobile devices
Actual Results:
# Views autocomplete input is too wide on mobile
Can be a move to RTBC.
Comment #19
anish.a commentedComment #23
indrajithkb commentedHI @kiran.kadam911 thanks for the patch, still patch gets failed so am adding the MR again. Please review the #22 MR.
Moving to needs review
Comment #24
chetanbharambe commentedThanks, @Indrajith KB for #22.
Verified and tested merge request #22.
Merge request applied successfully and looks good to me.
Testing Steps:
# Goto: admin/structure/views
# Create a view with an autocomplete exposed filter
# Display the view in Bartik via a page or a block
# View it on a smaller screen
# See that the autocomplete field is too wide
Expected Results:
# Views autocomplete input should be in proper width on mobile devices.
Actual Results:
# Views autocomplete input is too wide on mobile.
Working as Expected.
Can be a move to RTBC.
Comment #25
darvanenDon't forget to test CSS changes on other screen sizes as well as the width where an issue occurs.
Comment #27
gauravvvv commentedComment #29
kristen polThanks for the update. Confirmed changes address feedback in #25 by changing
widthtomax-width.Checked and the MR/patch applies cleanly to Drupal 9.3, 9.4, and 10. Needs manual testing on 9.4.
Comment #32
smustgrave commentedThis appears to be a bartik issue only. Since D10 removed bartik moving this to the contrib project
Comment #33
gaurav-mathur commentedComment #34
gaurav-mathur commentedHi Patch#2 applied successfully. i tested patch on diffrent screen size and It working fine.
Comment #35
liam morlandPlease put the patch into an issue fork of Bartik and merge request.