Search Results Should Provide Links to Parent Docs of Other Locales

NEW
Unassigned

Status

enhancement
6 years ago
10 months ago

People

(Reporter: davidwalsh, Unassigned)

Tracking

Details

(Whiteboard: [specification][type:feature][pm-wanted])

Reporter

Description

6 years ago
What problems would this solve?
===============================
If someone searches for "Some Term" in French, for example, under the summary we should show mini links/icons to the English, Dutch, etc. locales.

Who would use this?
===================
Some non-English users may prefer to see the English document straight away because it could be more up to date.

What would users see?
=====================
Tiny links/icons under the summary which would send them to the other locales for the document.

What would users do? What would happen as a result?
===================================================
They'd go to the foreign locales if they so choose.

Is there anything else we should know?
======================================
I spoke this over with people in #webdev and they liked the idea.  It comes on the heels of this:

https://bugzilla.mozilla.org/show_bug.cgi?id=452947
Reporter

Comment 1

6 years ago
As I understand it, we'd want to store this information during the index process; we should store the locale and URL, not sure we'd need the title.
I think we'll want to index the parent slug, locale, and title?

http://screencast.com/t/WCMaWVYy9kf

{% set doc_parent_url = url('wiki.document', doc.parent_slug, locale=doc.parent_locale) %}
Translated on {{ doc.modified }} from <a href="{{ doc_parent_url }}">{{ doc.parent_title }}</a>
Proposing that this block launch. Any other thoughts?
Blocks: 839214
Component: General → Site search
No longer blocks: 839214
There is an interesting dependency problem included here, if any of the translations of a document is renamed (e.g. title or slug) we'd need to make sure to always update the document it's translated from, too. That would lengthen the time to index one single document. Could we instead store an unique identifier of the page (e.g. primary key of the document and link to a new view that does the database query to redirect to the real URL of the document)?
(In reply to John Karahalis [:openjck] from comment #3)
> Proposing that this block launch. Any other thoughts?

Why? This is a new feature, added very late in the process; interesting, but in no way part of a MVP. I recommend not to block on this, except with a strong case.
Flags: needinfo?(aspivak)

Comment 6

6 years ago
I don't think it is a launch blocker
Flags: needinfo?(aspivak)
Severity: normal → enhancement
Whiteboard: [specification][type:feature] → [specification][type:feature][pm-wanted]

Comment 7

10 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/e015849eee4459d141d0c56166de3df24fdf2a03
bug 882005: Change parent mapping to Object

Nested is for arrays of objects, Object is for a single object.
Display of the parent link is broken, due to a bug in the serializer.
You need to log in before you can comment on or make changes to this bug.