Problem/Motivation

The search field is rounded both as another opportunity to introduce friendliness into the UI, but also follows a tendency for search fields to be rounded in some browsers and operating systems.
Grouping the single text field and the submit button together simplifies the component and implies a one-to-one relationship between the two. There is also an opportunity to create a bootstap-style input group component.
The dropdown menu is intentionally designed as a distinct component (see the section Dropdowns and Popovers) for modularity of the design and code reusability. Visually and in terms of implementation, merging or joining the search field with the drop down is both awkward and not strictly necessary for usability.
Steps to reproduce
N/A
Proposed resolution
See description
Remaining tasks
Review
User interface changes
Before:

After:

Introduced terminology
N/A
API changes
Some mark up changes
Data model changes
N/A
Release notes snippet
N/A


| Comment | File | Size | Author |
|---|---|---|---|
| #50 | Screenshot 2024-12-13 at 14.38.01.jpg | 120.23 KB | markconroy |
| #48 | Extend-DrupalPod-10-14-2024_06_54_PM.png | 123.47 KB | sagarmohite0031 |
| #45 | 2160545-before.png | 269.32 KB | nayana_mvr |
| #41 | 2160545-40.patch | 1.99 KB | nayana_mvr |
| #41 | 2160545-13-d11.patch | 4.44 KB | nayana_mvr |
Issue fork drupal-2160545
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 #1
lewisnymanComment #2
lewisnymanComment #3
lewisnymanHere are a few examples of pages that use single input search/filter forms:
Comment #4
lewisnymanComment #5
dawehnerInteresting to have a common approach for all those forms.
Can you please remove the last example? This is just wrong, given that this is no search functionality.
Comment #6
lewisnymanSure thing.
Comment #7
lewisnymanComment #8
lewisnymanComment #9
lewisnymanHere's a proposal patch implemented on the module page. You have to apply it alongside #1986418: Update textfield & textarea style
The submit button doesn't do anything yet and we'll have to override it with JS.
Comment #10
tompagabor commentedAdd a newy patch, because overflow: hidden, and overflow: auto cut box-shadow, on the left side.
Used position relative/absolute, instead of floating.
Comment #12
lewisnymanComment #13
emma.mariaPatch re-rolled :)
Comment #14
lewisnymanThis is looking good, is it a good idea to have a set width like that? What if people need it to be shorter or wider than 200px?
Comment #15
nikolay shapovalov commentedComment #16
nikolay shapovalov commentedComment #17
nikolay shapovalov commentedI have tested the patch #13 on windows 7.
There are several bugs:
IE 11:


Google Chrome:
Comment #18
nikolay shapovalov commentedAbout pacth #13
There is semicolon required at the end after position:absolute.
Also there is an issue with submit button width on mobile device.

Google Chrome:
Comment #19
nikolay shapovalov commentedComment #20
sqndr commentedPicking up this issue. I ended up with some css that looked like this:
Looked good in chrome ... but then I opened Firefox, and there were some layout issues again. Seems like this still needs some work. Maybe we can look into Bootstrap and see how the form group is styled there?
Chrome:
http://cl.ly/image/12083J023x3k
http://cl.ly/image/431k410n0h0S
http://cl.ly/image/183b082e0216
Comment #21
sqndr commentedComment #22
Bojhan commentedComment #23
lewisnymanI think we can take a new approach with this and specify the component similar to Bootstrap:
Then we don't have to assume a specific element is the special case.
Comment #24
emma.mariaComment #38
markconroy commentedLet's move this to the theme system queue. Looks like it's relevant to Drupal rather than just Seven theme.
Comment #41
nayana_mvr commentedI have re-rolled the MR to D11 but there are UI issues as shown in below screenshot.
The class names
.input-groupand.input-group__textare not getting added in the expected elements when compared to the HTML structure shown in http://getbootstrap.com/components/#input-groups. Also, as per my understanding, input-group can only be used if the theme uses Bootstrap style (Please correct me if I'm wrong). In D11 Claro theme doesn't use Bootstrap but there are many contrib themes such as Radix, Bootstrap, etc which can be used to achieve this.I tried a different approach for the UI part where I could make the input field and search button inline to each other. Screenshot attached below.
Attaching both re-rolled patch and patch with new approach here.
This issue seems to be an old one. Currently in D11, there exists one filter functionality in module extend page so do we still need to work this issue? If not please close this ticket. Moving to Needs Review for feedback.
Comment #42
nayana_mvr commentedAttaching few issue links which I referred while looking into this ticket. Please feel free to remove if it's not relevant.
Comment #43
smustgrave commentedPatches should be in MR
Also issue summary should use complete template.
Comment #45
nayana_mvr commentedCreated MR with the new approach and updated IS with complete template but as I mentioned in my previous comment, need input from core team about whether we are still planning to implement this feature or not. Please review.
Comment #46
nayana_mvr commentedComment #47
nayana_mvr commentedComment #48
sagarmohite0031 commentedHello,
I have try to reproduced the issue on Drupal 11 but its looks fine for me.
The MR is applied successfully.
Please check attachment-
Comment #49
smustgrave commentedI don't think the MR is accomplishing what is described. All it seems to be doing is changing the label and adding a submit button where not needed. Why do we need a submit button for something that is autosubmitting? Also issue summary contains suggestions as typing which does not appear to be working.
Comment #50
markconroy commentedThe free text filter on the "Extend" page is not a search component.
Please do not work on that as part of this issue.
This issue is to standardise how search will look where search is actually used when it's a single input+button in Drupal 7.
I'm not even sure there are examples of this in Drupal 10/11 core at this stage.
The only thing I can find is this:
With all that being the case, I am going to close this issue. If someone disagrees, please open a new issue with very clear instructions on what you want to achieve.