Kuma: Editor - Link lookup is returning the first match instead of best match

REOPENED
Unassigned

Status

developer.mozilla.org
Editing
P5
normal
REOPENED
6 years ago
3 months ago

People

(Reporter: sheppy, Unassigned)

Tracking

(Blocks: 2 bugs)

Details

(Reporter)

Description

6 years ago
It seems to me that the most likely candidate for links, by default, would be the highest-level (rather than deepest) article that contains that name.

For example, if I choose the text "Gecko" and invoke the link editor, the default URL that comes up is, for some reason, "/en-US/docs/Accessibility/AT-APIs/Gecko" rather than what you almost always actually mean: "/en-US/docs/Gecko". This is weird.

Presumably this is because it's choosing the alphabetically first match instead of using some kind of actual logic. Can we use some logic? :)
I'm trying to think of how to best accomplish this.  The only thing I can think of hear is keeping the title order, but adding an additional order by shortest slug... ?

Comment 2

6 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/56516009d38a68cad7666e8b540751dbabe38ba8
fix bug 785455 - most 'simple' term match first

https://github.com/mozilla/kuma/commit/c583574cccfa9ec70e91b4790f35e01b403949e3
Merge pull request #561 from darkwing/autosuggest-order-785455

fix bug 785455 - most 'simple' term match first

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

6 years ago
This doesn't seem to resolve this problem fully; adding a link to the word "Gecko" is still picking by default a page called "Gecko" nested down in the accessibility tree of the site, instead of simply /en-US/docs/Gecko, which is almost always what people really want.
(Reporter)

Updated

6 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Priority: -- → P1
(Assignee)

Updated

6 years ago
Version: Kuma → unspecified
(Assignee)

Updated

6 years ago
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network

Comment 4

6 years ago
Is this still a feature we need to add??
Priority: P1 → P2
(Reporter)

Comment 5

4 years ago
(In reply to ali spivak from comment #4)
> Is this still a feature we need to add??

Yes.
Blocks: 957649
(Reporter)

Updated

4 years ago
Blocks: 1032827
Priority: P2 → P5
You need to log in before you can comment on or make changes to this bug.