* feat: added rate limit dialogue
* test: added test cases for post comment
* test: added test for content creation dialogue
* test: added test cases for empty topics
* test: added test cases
* feat: added content rate limit dialogue on post API for post and comment
* fix: fixed editor close issue on submit
* test: addd test cases
* feat: Modified discussions FE so that ONLY users with verified emails can create content
* feat: added comment and response functionality
* test: fixed test cases
* refactor: refactor code and added HOC
* test: added test cases
* test: added test cases for failed and denied
* feat: added states for button
* refactor: added callback function
* test: added test case to close the dialogue
* refactor: refactor function
* feat: added captcha to discussion post creation
* feat: added captcha for comment and response
* fix: removed learner check
* test: fixed test cases
* fix: removed comment and added check for empty sitekey
* fix: fixed translation issue
* test: added test cases for recaptcha
* test: should allow posting a comment with CAPTCHA
* test: added submit post test cases
* test: test edge cases for api
* test: added test cases for react-google-recaptcha
* test: added test case for default values for captcha
* fix: removed unused catch
---------
Co-authored-by: sundasnoreen12 <sundasnoreen12@gmail.com>
Co-authored-by: Awais Ansari <awais.ansari63@gmail.com>
A list of all posts in a topic is stored in an object for quick lookup. This is used when switching between topics to get the list of posts in that topic. When filters change the list of posts in a topics is updated and this is picked up by the UI. If changing filters when browsing a topic results in an empty result, this would cause the original list of topics for that topic to be retained, causing the filter to simply not apply. This commit fixes that by resetting the post list in that case.
Fixes an issue where filtering by post type wasn't working, since the filter wasn't being passed to the API.
It also simplifies the code a bit and adds tests.
Allow admins select a cohort when creating a new post.
If a user is not a discussions administrator, or if trying to edit
existing post, can't select a cohort (field is hidden).
fix: fix adding threads for topics that haven't been preloaded
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.
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>