(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
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
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.
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
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.
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
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>