Closed Bug 1327973 Opened 9 years ago Closed 4 months ago

Markup search autocomplete suggestions are sorted based on number of matching elements in page, can lead to issues

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox-esr115 wontfix, firefox-esr128 wontfix, firefox139 wontfix, firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox139 --- wontfix
firefox140 --- fixed

People

(Reporter: arni2033, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

(Keywords: regression, regressionwindow-wanted)

Attachments

(1 file)

>>> My Info: Win7_64, Nightly 49, 32bit, ID 20160526082509 STR_1: 1. Open url data:text/html,<div class="menu"><a class="menu_item"></a><a class="menu_item"></a> 2. Open inspector 3. Type ".menu" in search field in inspector 4. Press Enter AR: Inspector replaces typed text with autocomplete suggestion ".menu_item" ER: Inspector should find first occurrence of ".menu" STR_2: (no bug; reference of good behavior) 1. Open url data:text/html,<div class="menu"><a class="menu_item"></a> 2. Open inspector 3. Type ".menu" in search field in inspector 4. Press Enter AR: Inspector finds first occurrence of ".menu" (just as expected; compare this to STR_1) STR_3: 1. Open url data:text/html,<html class="S"> 2. Open inspector 3. Type ".S " in search field in inspector 4. Press Enter AR: Inspector replaces typed text with autocomplete suggestion ".S body" ER: Inspector should find first occurrence of ".S" Note: (STR_3) Most of the times I doubleclick classname in markup to edit it, then doubleclick to select one of classes like "long-class-name" separated by " "s, then focus search field, type ".", press Ctrl+V, then press Enter. Too often classname is copied with " " in the end, so I run into this bug. I'm not sure which workflow was planned by Firefox developers (and not sure if STR_3 is considered as valid bug), but suggestions in inspector are even more aggressive than in the new broken searchbar.
No longer blocks: 1277113
Component: Untriaged → Developer Tools: Animation Inspector
Component: Developer Tools: Animation Inspector → Developer Tools: Inspector
Inspector bug triage (filter on CLIMBING SHOES).
Priority: -- → P2
Product: Firefox → DevTools
Severity: normal → S3

(In reply to arni2033 from comment #0)

My Info: Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:

  1. Open url data:text/html,<div class="menu"><a class="menu_item"></a><a
    class="menu_item"></a>
  2. Open inspector
  3. Type ".menu" in search field in inspector
  4. Press Enter

AR: Inspector replaces typed text with autocomplete suggestion ".menu_item"
ER: Inspector should find first occurrence of ".menu"

The search results are ordered based on the number of matching elements, which leads to the situation that is described here.
It seems that it is this way since the server search function was added (when autocomplete was added to style editor)
This can be confusing, and I'm not sure it brings a lot of benefits here?

Note: (STR_3)
Most of the times I doubleclick classname in markup to edit it, then
doubleclick to select one of
classes like "long-class-name" separated by " "s, then focus search field,
type ".", press Ctrl+V,
then press Enter. Too often classname is copied with " " in the end, so I
run into this bug.

looks slightly something that should be handled in Bug 1327153

Summary: Autocomplete suggestions in inspector are too aggressive: Enter replaces typed text with suggestion → Markup search autocomplete suggestions are sorted based on number of matching elements in page, can lead to issues

The suggestions were sorted by the number of element matching the item, which could
be confusing and get in the way of the user when they wanted to search for the
least used version.
We now sort the suggestions by "type" (id, class, tag, …), and then, within those
groups, alphabetically.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/410248095e23 [devtools] Remove count/score sort in markup/style editor autocomplete suggestions. r=devtools-reviewers,jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: