Skip to content

[$60] When there are comments across multiple pages, when user selects a view from 1st page, it's opening the page 2 #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sdgun opened this issue Dec 3, 2020 · 7 comments

Comments

@sdgun
Copy link
Collaborator

sdgun commented Dec 3, 2020

Steps
Log in as copilot user and go to any discussion(ex- https://vanilla.topcoder-dev.com/discussion/1889/code-docs-inside/p1)
Select Tree view or Threaded view

Navigates to page 2

Screencast 2020-12-03.zip

@sdgun sdgun added bug Something isn't working P3 Dev env labels Dec 3, 2020
@jmgasper jmgasper changed the title When there are comments across multiple pages, when user selects a view from 1st page, it's opening the page 2 [$40] When there are comments across multiple pages, when user selects a view from 1st page, it's opening the page 2 Dec 3, 2020
@jmgasper
Copy link
Collaborator

jmgasper commented Dec 3, 2020

Contest https://www.topcoder.com/challenges/30155619 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator

jmgasper commented Dec 3, 2020

Contest https://www.topcoder.com/challenges/30155619 has been updated - it has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

@jmgasper I've looked at the old forums. Flat view supports paging. Tree View/ Threaded View doesn't support paging and all comments are displayed on one page. The number of comments is 3-20 per a discussion.

Let me know if you are ok if Tree View/Threaded View doesn't support paging.

Example an old forum with 50+ comments:
image

Flat View - https://apps.topcoder.com/forums/?module=Thread&threadID=684003&start=0 , there are 2 pages.
Threaded View - https://apps.topcoder.com/forums/?module=Thread&threadID=684003&mc=53&view=threaded
Tree View - https://apps.topcoder.com/forums/?module=Thread&threadID=684003&mc=53&view=tree

@jmgasper
Copy link
Collaborator

jmgasper commented Dec 3, 2020

Yeah, that's fine. If we're consistent with the old forums, people should be happy with that, thanks.

@jmgasper jmgasper changed the title [$40] When there are comments across multiple pages, when user selects a view from 1st page, it's opening the page 2 [$60] When there are comments across multiple pages, when user selects a view from 1st page, it's opening the page 2 Dec 3, 2020
@atelomycterus
Copy link
Collaborator

@jmgasper Done. Please apply PRs: topcoder-platform/forums-plugins#53,
#264.
The new Vanilla feature (CommentsAutoOffset) is discovered by sdgun. It's enabled by default. Read more in 'CommentsAutoOffset'.

Views

Flat View is set by default and supports 'CommentsAutoOffset'.
Tree/Threaded View doesn't support it because all comments are displayed on one page.

If there are several pages of comments, the discussion meta/body/view mode is shown on the first page only. I've fixed the view mode. It is always displayed. Otherwise, User would need to return to the first page to change view mode.

The first page
image

The next pages:
image

CommentsAutoOffset

If there are several pages of comments then the appropriate offset (page) is calculated (based on the user's read comments & comments per page). User is automatically pushed to the comment he/she reads in a discussion.

For testing I set comments per page = 5 in my local env. At first it was unexpected why I ended up on the third page when I come to the discussion page.

If you want to disable this feature:

$Configuration['Vanilla']['Comments']['AutoOffset'] = false;

@jmgasper
Copy link
Collaborator

jmgasper commented Dec 4, 2020

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30155619

This is an automated message for ghostar via Topcoder X

@sdgun
Copy link
Collaborator Author

sdgun commented Dec 8, 2020

Verified, the pagination for threaded and tree views are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants