Project

General

Profile

action #68585

links to comments should ensure the comment is shown after the page is loaded, e.g. select correct paginated object

Added by okurz 9 months ago. Updated 5 months ago.

Status:
Workable
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2020-07-02
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Observation

E.g. see in https://progress.opensuse.org/projects/leap_151/activity?from=2019-05-21 mentioning the link
https://openqa.opensuse.org/group_overview/50#comment-39935

Following the link opens https://openqa.opensuse.org/group_overview/50 but neither scrolls down to comments nor does it select https://openqa.opensuse.org/group_overview/50?comments_page=16#comment-39935 which would be the right comments page

Acceptance criteria

  • AC1: Following a comments link for a comment that is not shown on the first page ensures that the comment is shown
  • AC2: Browser window scrolls to the comment to show it immediately

Suggestions

  • Add test in t/ui/15-comments.t
  • Find out how to identify the right comments page, probably in javascript
  • Select comment page that shows the comment or ensure that the page is shown correctly by other means
  • Ensure right comments page is selected
  • Ensure the browser scrolls to the right anchor within the comments page

History

#1 Updated by mkittler 9 months ago

  • Difficulty deleted (easy)

In the first place I thought: The URL should simply contain the query parameter for the right page. Links copied from openQA already container the correct parameter and work as intended. We should have to support wrongly self-crafted URLs.

On the second thought: The page a comment is on might change over time so a link which was once valid might not be valid later and one would run into this issue.

Fixing this is not that easy. The pagination works server-side so it is not possible to determine the page of a comment by its ID in JavaScript. Annoyingly the hash which contains the comment ID is intended to be used only by the user agent so taking it into account on the server-side might be tricky as well.

#2 Updated by okurz 7 months ago

  • Subject changed from links to comments should select paginated object to links to comments should ensure the comment is shown after the page is loaded, e.g. select correct paginated object
  • Description updated (diff)

#3 Updated by okurz 5 months ago

  • Target version changed from Ready to future

Also available in: Atom PDF