Closed Bug 1456886 (bmo-link-preview) Opened 6 years ago Closed 6 years ago

Implement link descriptions client-side and remove from server-side comment rendering

Categories

(bugzilla.mozilla.org :: User Interface, enhancement)

Production
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: imadueme)

References

Details

Attachments

(1 file)

Right now it seems that links to bugs and attachments get descriptive text added.
This prevents caching rendered comments in general and comment rendering is known to be slow.

Also, when we switch to markdown bug 999 would get a link description / hover text, but `[Bug 999](https://bugzilla.mozilla.org/show_bug.cgi?id=999)` would not.

Thus this bug involves a few things:

- remove the this feature from the backend
- add a similar front-end feature.
- audit all extensions that implement 'bug_format_comment'

To get started with the backend part, the entry point to comment rendering is here:

https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/Template.pm#L140

The bug link stuff is here:

https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/Template.pm#L316

The attachment stuff is more than just a hover-element, unfortunately:

https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/Template.pm#L264
Alias: bmo-comment-purity
Alias: bmo-comment-purity → bmo-link-preview
Assignee: nobody → imadueme
For implementing this, I recommend at least two separate pull requests -- one for the backend removal, and the other for the frontend work. They both need to land at the same time but it will separate review concerns.

Also a great degree of freedom to change exactly how attachment / bug link preview works is granted for this.
Trying to do a 1:1 preservation of the existing feature is not desired.
Status: NEW → ASSIGNED
Attached file Github PR #571
This API can be used to load descriptions depending on the link's visibility: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
Also to render comments in Markdown client-side, show images inline, or whatever. The API is still new but since we no longer support IE, we can start using it today :)
Closing this to remove it from my queue, https://bugzilla.mozilla.org/show_bug.cgi?id=1456878 (which contains these changes) will remain open until markdown is landed. Perhaps we can also file a new bug in the future to integrate the Intersection Observer API.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
See Also: → 1497877
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: