Closed Bug 1956634 Opened 1 year ago Closed 1 year ago

Enable <input type="search"> in privileged documents

Categories

(Core :: Layout: Form Controls, task)

task

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox141 --- fixed

People

(Reporter: tgiles, Assigned: tgiles)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp])

Attachments

(4 files)

By enabling the <input type="search"> clear search button in privileged documents, regardless of the layout.forms.input-type-search.enabled pref, would be beneficial for the following reasons:

  • It enables the moz-input-search component to be utilized in our UI without needing to create a duplicate implementation of the "clear search" functionality
  • It allows us to consolidate and merge duplicate "search box with clear button" implementations:
    • Firefox View
      • Changing this one should also affect the sidebar, since the "Tabs from other devices" and "History" sections also use this particular search textbox.
    • DevTools
    • GeckoView
  • It increases visibility of the "clear search" button and any user experience issues with said input without impacting the entire web
  • It moves us closer to being able to turn on layout.forms.input-type-search.enabled by default (Bug 1654288)

We will need to address the previous cases before enabling the "clear search" button, otherwise each of the cases will have duplicate buttons that are styled differently.

Depends on: 1936920
Blocks: 1936648
No longer blocks: 1933648
Depends on: 1956650
Summary: Enable <input type="search"> in privledged documents → Enable <input type="search"> in privileged documents
Depends on: 1956812
See Also: → 1956817

Since this will result in duplicate UI elements in various places,
we should wait until the start of a new Nightly cycle to land the
change. See Bug 1936920, Bug 1956650, and Bug 1956812 for known places
where there will be duplicate clear search buttons.

Depends on D243387

Assignee: nobody → tgiles
Status: NEW → ASSIGNED
See Also: → 1966332
No longer depends on: 1936920
Depends on: 1966431
Depends on: 1966715
No longer depends on: 1956650
Pushed by tgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae2567f945c9 Enable clear search button in chrome documents. r=emilio,reusable-components-reviewers,mstriemer
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Hey Emilio, following up on my request for some help debugging a devtools test failure that seems related to min-width calculations or some other related issue. The particular test I'm trying to fix is browser_webconsole_filter_buttons_overflow.js which passes without issue on central. However, once I introduce the "enable clear search button" patch, then the test fails because the layout of the webconsole view doesn't switch from "wide" to "narrow". Even if I remove (or use display: none) the previously existing button, I can't get the devtools webconsole view to wrap the search/filter input as expected.

You can easily reproduce this issue by setting layout.forms.input-type-search.enabled=true in the _webconsole.toml file at line 195.

Not sure what else to look into to figure out this issue and would appreciate your insight into this. Thanks!

Flags: needinfo?(emilio)

Not just a leaf. This matches nsNumberControlFrame and co.

This goes all the way back to bug 558594 and fixes the test failures
described in comment 5.

I'll check if there's any WPT covering this.

Seems like a bug in the search control frame implementation!

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18e2ccc21035 nsSearchControlFrame should be a replaced frame. r=layout-reviewers,jfkthame
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED

Err sorry thought you were going to land the actual enablement while at it. Probably should've landed it in a separate bug.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

In order to get this stack of patches to land, I needed to hide the
extra clear search button that is in fxview-search-textbox.

I needed to update browser_history_sidebar to access the anonymous
content element, the clear search button, in order to keep the test
as designed.

I needed to update browser_adopt_sidebar_from_opener due to the sidebar
width not being reset to the original value after running this test.
This narrow width would cause the next ran test to fail in non-obvious
ways.

Pushed by tgiles@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8b5daf5bd4b8 https://hg.mozilla.org/integration/autoland/rev/03909323faaa Enable clear search button in chrome documents. r=emilio,reusable-components-reviewers,mstriemer https://github.com/mozilla-firefox/firefox/commit/d50510a19dfc https://hg.mozilla.org/integration/autoland/rev/5618a401d844 Fix sidebar tests when clear search button is enabled. r=sidebar-reviewers,fxview-reviewers,jsudiaman
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6d8526aea99a https://hg.mozilla.org/integration/autoland/rev/8c40a5486452 Revert "Bug 1956634 - Fix sidebar tests when clear search button is enabled. r=sidebar-reviewers,fxview-reviewers,jsudiaman" for causing bc failures @ browser_history_firefoxview.js

Backed out for causing bc fails @ browser_history_firefoxview.js

Since there isn't a separate fxview clear search button, the tests
needed to be updated to activate the clear search button that exists
in the HTMLInputElement.

Pushed by tgiles@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ee0ab707db45 https://hg.mozilla.org/integration/autoland/rev/9fb1257fe4fe Enable clear search button in chrome documents. r=emilio,reusable-components-reviewers,mstriemer https://github.com/mozilla-firefox/firefox/commit/fa3f818fab75 https://hg.mozilla.org/integration/autoland/rev/20805a0ce840 Fix sidebar tests when clear search button is enabled. r=sidebar-reviewers,fxview-reviewers,jsudiaman https://github.com/mozilla-firefox/firefox/commit/52faf8c4c453 https://hg.mozilla.org/integration/autoland/rev/765d3f515c66 Fix Firefox View tests when HTML clear search button is enabled. r=fxview-reviewers,nsharpley
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e3e168c03735 https://hg.mozilla.org/integration/autoland/rev/fc9986230203 Revert "Bug 1956634 - Fix Firefox View tests when HTML clear search button is enabled. r=fxview-reviewers,nsharpley" for causing bc fails @ browser_history_firefoxview.js & browser_history_sidebar.js
Pushed by tgiles@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bc3b83054076 https://hg.mozilla.org/integration/autoland/rev/1cdd656f5a5e Enable clear search button in chrome documents. r=emilio,reusable-components-reviewers,mstriemer https://github.com/mozilla-firefox/firefox/commit/40a534a682de https://hg.mozilla.org/integration/autoland/rev/a2e9312df4d8 Fix sidebar tests when clear search button is enabled. r=sidebar-reviewers,fxview-reviewers,jsudiaman https://github.com/mozilla-firefox/firefox/commit/f787e3413bde https://hg.mozilla.org/integration/autoland/rev/d8971955d303 Fix Firefox View tests when HTML clear search button is enabled. r=fxview-reviewers,nsharpley
Flags: needinfo?(tgiles)
QA Whiteboard: [qa-triage-done-c142/b141]
No longer depends on: 1966431
See Also: 1966332
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: