Merge pull request #24101 from eduNEXT/lmm/depr70
[BD-10] [DEPR-70] Remove waffle flag edx_discussions.use_bootstrap.
This commit is contained in:
@@ -4,7 +4,6 @@ Discussion settings and flags.
|
||||
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace
|
||||
|
||||
USE_BOOTSTRAP = 'use_bootstrap'
|
||||
ENABLE_FORUM_DAILY_DIGEST = 'enable_forum_daily_digest'
|
||||
|
||||
|
||||
@@ -14,12 +13,6 @@ def waffle_flags():
|
||||
"""
|
||||
namespace = WaffleFlagNamespace(name='edx_discussions')
|
||||
return {
|
||||
# Waffle flag to enable the use of Bootstrap
|
||||
USE_BOOTSTRAP: WaffleFlag(
|
||||
namespace,
|
||||
USE_BOOTSTRAP,
|
||||
flag_undefined_default=True
|
||||
),
|
||||
# By default, enable forum notifications. Can be disabled platform wide.
|
||||
ENABLE_FORUM_DAILY_DIGEST: WaffleFlag(
|
||||
namespace,
|
||||
@@ -29,11 +22,6 @@ def waffle_flags():
|
||||
}
|
||||
|
||||
|
||||
def use_bootstrap_flag_enabled():
|
||||
"""Returns whether use of bootstrap is enabled."""
|
||||
return waffle_flags()[USE_BOOTSTRAP].is_enabled()
|
||||
|
||||
|
||||
def is_forum_daily_digest_enabled():
|
||||
"""Returns whether forum notification features should be visible"""
|
||||
return waffle_flags()[ENABLE_FORUM_DAILY_DIGEST].is_enabled()
|
||||
|
||||
@@ -8,7 +8,6 @@ from django.utils.translation import ugettext_noop
|
||||
|
||||
import lms.djangoapps.discussion.django_comment_client.utils as utils
|
||||
from lms.djangoapps.courseware.tabs import EnrolledTab
|
||||
from lms.djangoapps.discussion.config.waffle import use_bootstrap_flag_enabled
|
||||
from xmodule.tabs import TabFragmentViewMixin
|
||||
|
||||
|
||||
@@ -38,4 +37,4 @@ class DiscussionTab(TabFragmentViewMixin, EnrolledTab):
|
||||
"""
|
||||
Returns true if this tab is rendered with Bootstrap.
|
||||
"""
|
||||
return use_bootstrap_flag_enabled()
|
||||
return True
|
||||
|
||||
@@ -30,7 +30,7 @@ import openedx.core.djangoapps.django_comment_common.comment_client as cc
|
||||
from lms.djangoapps.courseware.access import has_access
|
||||
from lms.djangoapps.courseware.courses import get_course_with_access
|
||||
from lms.djangoapps.courseware.views.views import CourseTabView
|
||||
from lms.djangoapps.discussion.config.waffle import is_forum_daily_digest_enabled, use_bootstrap_flag_enabled
|
||||
from lms.djangoapps.discussion.config.waffle import is_forum_daily_digest_enabled
|
||||
from lms.djangoapps.discussion.django_comment_client.base.views import track_thread_viewed_event
|
||||
from lms.djangoapps.discussion.django_comment_client.constants import TYPE_ENTRY
|
||||
from lms.djangoapps.discussion.django_comment_client.permissions import has_permission
|
||||
@@ -423,7 +423,6 @@ def _create_base_discussion_view_context(request, course_key):
|
||||
user_info = cc_user.to_dict()
|
||||
course = get_course_with_access(user, 'load', course_key, check_if_enrolled=True)
|
||||
course_settings = make_course_settings(course, user)
|
||||
uses_bootstrap = use_bootstrap_flag_enabled()
|
||||
return {
|
||||
'csrf': csrf(request)['csrf_token'],
|
||||
'course': course,
|
||||
@@ -440,8 +439,7 @@ def _create_base_discussion_view_context(request, course_key):
|
||||
),
|
||||
'course_settings': course_settings,
|
||||
'disable_courseware_js': True,
|
||||
'uses_bootstrap': uses_bootstrap,
|
||||
'uses_pattern_library': not uses_bootstrap,
|
||||
'uses_bootstrap': True,
|
||||
}
|
||||
|
||||
|
||||
@@ -811,15 +809,11 @@ class DiscussionBoardFragmentView(EdxFragmentView):
|
||||
the files are loaded individually, but in production just the single bundle is loaded.
|
||||
"""
|
||||
is_right_to_left = get_language_bidi()
|
||||
if use_bootstrap_flag_enabled():
|
||||
css_file = BOOTSTRAP_DISCUSSION_CSS_PATH
|
||||
if is_right_to_left:
|
||||
css_file = css_file.replace('.css', '-rtl.css')
|
||||
return [css_file]
|
||||
elif is_right_to_left:
|
||||
return self.get_css_dependencies('style-discussion-main-rtl')
|
||||
else:
|
||||
return self.get_css_dependencies('style-discussion-main')
|
||||
|
||||
css_file = BOOTSTRAP_DISCUSSION_CSS_PATH
|
||||
if is_right_to_left:
|
||||
css_file = css_file.replace('.css', '-rtl.css')
|
||||
return [css_file]
|
||||
|
||||
|
||||
@expect_json
|
||||
|
||||
@@ -1847,18 +1847,6 @@ PIPELINE['STYLESHEETS'] = {
|
||||
],
|
||||
'output_filename': 'css/lms-style-student-notes.css',
|
||||
},
|
||||
'style-discussion-main': {
|
||||
'source_filenames': [
|
||||
'css/discussion/lms-discussion-main.css',
|
||||
],
|
||||
'output_filename': 'css/discussion/lms-discussion-main.css',
|
||||
},
|
||||
'style-discussion-main-rtl': {
|
||||
'source_filenames': [
|
||||
'css/discussion/lms-discussion-main-rtl.css',
|
||||
],
|
||||
'output_filename': 'css/discussion/lms-discussion-main-rtl.css',
|
||||
},
|
||||
'style-inline-discussion': {
|
||||
'source_filenames': [
|
||||
'css/discussion/inline-discussion.css',
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// ------------------------------
|
||||
// LMS discussion main styling
|
||||
//
|
||||
// NOTE: This is the right-to-left (RTL) configured style compile.
|
||||
// It should mirror lms-discussion-main w/ the exception of bi-app references.
|
||||
|
||||
// Load the RTL version of the edX Pattern Library
|
||||
$pattern-library-path: '../../edx-pattern-library' !default;
|
||||
|
||||
@import 'edx-pattern-library/pattern-library/sass/edx-pattern-library-rtl';
|
||||
|
||||
// Configure RTL variables
|
||||
@import 'base/variables-rtl';
|
||||
|
||||
// Load the shared build
|
||||
@import 'build';
|
||||
@@ -1,16 +0,0 @@
|
||||
// ------------------------------
|
||||
// LMS discussion main styling
|
||||
//
|
||||
// NOTE: This is the left-to-right (LTR) configured style compile.
|
||||
// It should mirror lms-discussion-main-rtl w/ the exception of bi-app references.
|
||||
|
||||
// Load the LTR version of the edX Pattern Library
|
||||
$pattern-library-path: '../../edx-pattern-library' !default;
|
||||
|
||||
@import 'edx-pattern-library/pattern-library/sass/edx-pattern-library-ltr';
|
||||
|
||||
// Configure LTR variables
|
||||
@import 'base/variables-ltr';
|
||||
|
||||
// Load the shared build
|
||||
@import 'build';
|
||||
Reference in New Issue
Block a user