For smaller courses, there is a feature under the new provider
for grouping topics at the subsection level so that when
navigating the course, all topics under a subsection show up in
the sidebar instead of just the current unit.
This implements that functionality by checking if the discussion
is loaded in-context, and if grouping at subsection is enabled,
and if so, displaying the current subsection's topics.
* fix: filter pinned, unpinned posts and render separately
* fix: UI updates for INF-421 and INF-417
* fix: pin icon moves to left for non privilege user
* fix: posts list accessibility issue
This fixes two issues. The first is that the topics page can cause constant requests to threads, and the second, that clicking on a post link when browsing a category can cause the application to crash.
When a user browses the discussion pages, show a page showing
that there is no data, rather than a blank page.
This PR implements the designs for this page while refactoring the
DiscussionHome component so that it doesn't get much larger.
- Created a hooks file and move some of the larger hooks in there.
- Added selectors for the state that would be needed for the
components.
- Split the DiscussionHome into DiscussionContent and
DiscussionSidebar to make it clearer where certain things get
rendered.
- Adds a message to the sidebar to display No Results when
appropriate.
- Added the NoResults component to show when filtering posts and there
is nothing to show.
Uses new API features for preview, deleting, pinning, and closing. Refactors and improves styling to match new mockups.
Adds the new post filter bar element.
Implemented a ScrollThreshold reusable component to detect scrolling
events, which can be used in the place of a Button.
Removed the i18n entry created for the Button, which is no longer
needed.
This adds a major chunk of UI code to the application covering topic listing,
topic filtering, subtopic browsing, browsing posts by topic, filtering unread
posts, filtering followed posts, sorting posts by recent activity, most activty
and most votes, liking/unliking a post, following/unfollowing a post, listing
comments and replis in a post.
Co-authored-by: Kshitij Sobti <kshitij@sobti.in>