Commit Graph

28 Commits

Author SHA1 Message Date
Bilal Qamar
5c6e40bc48 feat: upgraded to node v18, added .nvmrc and updated workflows (#471)
* feat: upgraded to node v18, added .nvmrc and updated workflows

* refactor: updated packages

* refactor: resolved eslint issues
2023-06-09 09:12:08 +02:00
SaadYousaf
7b000f1974 feat: send enableInContextSidebar param to backend to identify source of content for events 2023-03-09 09:02:10 +05:00
Adolfo R. Brandes
0c71e8b5b7 feat: Support runtime configuration (second attempt)
(This reintroduces the change in 9f84230c that was later reverted by
67b0b33a.)

frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] https://github.com/openedx/frontend-platform/pull/335
2022-12-20 17:54:21 +05:00
AsadAzam
67b0b33a81 Revert "feat: Support runtime configuration"
This reverts commit 9f84230c17.
2022-12-12 15:36:40 +05:00
Adolfo R. Brandes
9f84230c17 feat: Support runtime configuration
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] https://github.com/openedx/frontend-platform/pull/335
2022-12-09 10:39:59 +00:00
Mehak Nasir
b23846b1e4 fix: handled thread not found result on frontend 2022-12-01 15:44:18 +05:00
Kshitij Sobti
ae6397ea32 fix: filtering posts in a topic doesn't work when filtered results are empty (#203)
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.
2022-06-24 08:56:08 +00:00
Awais Ansari
59187d2217 feat: implement learners area new UI (#197)
* feat: implement learners area new UI

* fix: learners list UI

* fix: initial learner sort based on role
2022-06-20 16:14:13 +05:00
Awais Ansari
7502006f01 feat: add cohort filter in filter action bar (#172)
* feat: add cohort filter in the filter action bar

* test: fix posts view fail test cases

* test: add test case for cohort filter
2022-06-01 13:39:33 +05:00
Ahtisham Shahid
8d02ad33af fix: show reported label in case of reported response (#173)
* fix: show reported label in case of reported response

* fix: resolved linter issues

Co-authored-by: AhtishamShahid <ahtishamshahid@A006-00850.local>
2022-05-31 13:21:21 +05:00
Kshitij Sobti
e8a3e4eaa8 feat: add support for pagination on learner page [BD-38] [TNL-9844] (#129)
Adds support for pagination on the learners page, including the learners list, the post, comments and responses lists.
2022-04-20 11:10:27 +00:00
Arunmozhi
14fe0d4ea5 feat: adds content area to browse learner contributions (#84)
When the learners tab is enabled and is accessible, the contributions of
a learner can be viewed by sorting them into Posts, Responses and
Comments, by selecting a specific learner. This implements the new
design of authored/reported tabs.

https://openedx.atlassian.net/browse/TNL-8844
2022-04-05 08:37:09 +00:00
Kshitij Sobti
b6da098331 feat: Add support for specifying post close reasons [BD-38] [TNL-8843] [BB-5012] (#96)
Adds support for specifying an edit reason when a moderator edits a user's post.

Co-authored-by: Felipe Trzaskowski <felipe.trzaskowski@gmail.com>
2022-04-01 07:56:25 +00:00
Mehak Nasir
a15f144120 fix: removed edit reason code 2022-03-28 23:47:39 +05:00
Felipe Trzaskowski
194a3f2485 feat: Add support for specifying edit reasons (#46)
Adds support for specifying an edit reason when a moderator edits a user's post.

Co-authored-by: Kshitij Sobti <kshitij@opencraft.com>
2022-03-17 12:41:47 +00:00
Kshitij Sobti
d802e5331f fix: filtering by post type wasn't working [BD-38] [TNL-9609] (#82)
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.
2022-03-14 05:36:28 +00:00
Kshitij Sobti
ceea220d62 feat: Fully implements support for cohorts
Uses the discussions settings API to fetch course division configuration and makes the cohort selection dynamic based on if a topic is divided.
2021-12-06 11:15:01 +05:30
Kshitij Sobti
18d19369a9 feat: add support for anonymous posting
Hooks up the configuration API to allow posting threads anonymously.
2021-11-16 10:54:48 +05:30
Awais Jibran
681bc4de67 Merge pull request #27 from open-craft/felipetrz/bb-4961-tiny-mce-improvements
feat: TinyMCE improvements [BD-38] [TNL-8779] [BB-4961]
2021-11-04 09:47:10 +05:00
Felipe Trzaskowski
2138c12eb4 fix: remove the "powered by tiny" text
fix: skin loading with transparent background

For some reason, loading the skin from `skin.min.css` was resulting in
dialogs and menus appearing with a transparent background. Replacing the
import for the non-minified version, `skin.css`, solves the problem.

feat: enable native browser spellchecking

Disabling the TinyMCE context menu is required for the native
spellchecking right click suggestions to work.

feat: enable autosave plugin

Autosaves to local storage every second.
Restores draft when empty.

feat: add new toolbar buttons

Additional toolbar buttons requested: quoting, code formatting, HTML button with text
label, clear formatting, undo/redo

feat: add image button to the toolbar, and load the imagetools plugin

The imagetools only work on images loaded from the same domain.

feat: add image upload capability

Depends on an upload endpoint in the REST API.

feat: enable a11y_advanced_options

This will only affect the image plugin.
For full a11y checking functionality, a premium TinyMCE key is required.

fix: TinyMCE content styles not being properly loaded

Content CSS need to be loaded as raw text, to be included in the TinyMCE
initialization. For this, we need webpack's `raw-loader` as a dependency.

fix: refactor the upload API call into posts/data/api

feat: pass courseId and threadId to the upload API endpoint

fix: rename customized buttons with openedx prefix

fix: use exact version for dependencies

fix: improve jsdoc and update the upload endpoint

fix: simplify TinyMCE side of the upload call

fix: update the upload url
2021-10-29 17:15:27 -03:00
Maxim Beder
5fafa44b56 feat: add cohort selection
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
2021-10-28 21:51:48 +02:00
Kshitij Sobti
c8c3bb925c feat: Improve UX to match new mockups
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.
2021-10-28 16:43:28 +05:30
Kshitij Sobti
5db87f54bb feat: Add post actions dropdown menu
Adds a dropdown menu for comments and posts to perform actions like pinning, unpinning, reporting etc.
2021-09-20 14:52:19 +05:30
Kshitij Sobti
582a5fd3ae refactor: update normalisation code to work in thunks instead of reducers 2021-09-14 19:22:47 +05:30
Kshitij Sobti
f509b98bdf Update to match mockups better 2021-08-27 12:20:11 +05:00
Patrick Cockwell
93d10f9280 feat: Add major UI components and functionality
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>
2021-07-12 11:02:48 +05:30
Kshitij Sobti
27b5f48907 Add code for interacting with Discussions API
This commit adds code for interacting with the Discussions API, along with the
associated reducers, thunks, selectors etc.
2020-11-05 15:50:38 +05:30
Kshitij Sobti
491f7b7acd Basic discussions forum framework
Adds the basic structure for the Discussions MFE around which future development
will happen.
2020-10-21 23:59:23 +05:30