Compare commits

..

2 Commits

Author SHA1 Message Date
renovate[bot]
ac471e2dd7 fix(deps): update dependency @edx/frontend-platform to v8.3.7 (#768)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 09:44:05 -04:00
Zameel Hassan
f04429f6f7 fix: add null check for post objects in usePostList hook (#752)
Adds defensive null checks when accessing post properties in the posts
forEach loop to prevent potential errors in the MFE discussion sidebar.
This addresses the issue reported in #751.
2025-05-12 18:47:17 +05:00
8 changed files with 2091 additions and 4847 deletions

2
.env
View File

@@ -22,5 +22,3 @@ USER_INFO_COOKIE_NAME=''
SUPPORT_URL='' SUPPORT_URL=''
LEARNER_FEEDBACK_URL='' LEARNER_FEEDBACK_URL=''
STAFF_FEEDBACK_URL='' STAFF_FEEDBACK_URL=''
# Fallback in local style files
PARAGON_THEME_URLS={}

View File

@@ -23,5 +23,3 @@ USER_INFO_COOKIE_NAME='edx-user-info'
SUPPORT_URL='https://support.edx.org' SUPPORT_URL='https://support.edx.org'
LEARNER_FEEDBACK_URL='' LEARNER_FEEDBACK_URL=''
STAFF_FEEDBACK_URL='' STAFF_FEEDBACK_URL=''
# Fallback in local style files
PARAGON_THEME_URLS={}

6854
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,9 +32,9 @@
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-footer": "^14.6.0", "@edx/frontend-component-footer": "^14.6.0",
"@edx/frontend-component-header": "^6.2.0", "@edx/frontend-component-header": "^6.2.0",
"@edx/frontend-platform": "^8.3.8", "@edx/frontend-platform": "^8.3.3",
"@edx/openedx-atlas": "^0.6.0", "@edx/openedx-atlas": "^0.6.0",
"@openedx/paragon": "^23.4.5", "@openedx/paragon": "^22.16.0",
"@reduxjs/toolkit": "1.9.7", "@reduxjs/toolkit": "1.9.7",
"@tinymce/tinymce-react": "5.1.1", "@tinymce/tinymce-react": "5.1.1",
"babel-polyfill": "6.26.0", "babel-polyfill": "6.26.0",

View File

@@ -1,16 +1,24 @@
@import "~@edx/brand/paragon/fonts.scss";
@import "~@edx/brand/paragon/variables.scss";
@import "~@openedx/paragon/scss/core/core.scss";
@import "~@edx/brand/paragon/overrides.scss";
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome";
.course-tabs-navigation { .course-tabs-navigation {
border-bottom: solid 1px #eaeaea; border-bottom: solid 1px #eaeaea;
.nav a, .nav a,
.nav button { .nav button {
&:hover { &:hover {
background-color: var(--pgn-color-light-400); background-color: $light-400;
} }
} }
.nav a { .nav a {
&:not(.active):hover { &:not(.active):hover {
background-color: var(--pgn-color-light-400); background-color: $light-400;
border-bottom: none; border-bottom: none;
} }
} }
@@ -22,7 +30,7 @@
.nav-link { .nav-link {
border-bottom: 4px solid transparent; border-bottom: 4px solid transparent;
border-top: 4px solid transparent; border-top: 4px solid transparent;
color: var(--pgn-color-gray-700); color: $gray-700;
// temporary until we can remove .btn class from dropdowns // temporary until we can remove .btn class from dropdowns
border-left: 0; border-left: 0;
@@ -32,9 +40,9 @@
&:hover, &:hover,
&:focus, &:focus,
&.active { &.active {
font-weight: var(--pgn-typography-font-weight-normal); font-weight: $font-weight-normal;
color: var(--pgn-color-primary-500); color: $primary-500;
border-bottom-color: var(--pgn-color-primary-500); border-bottom-color: $primary-500;
} }
} }
} }

View File

@@ -92,7 +92,7 @@ const CommentsView = ({ threadType }) => {
variant="plain" variant="plain"
block="true" block="true"
className="card mb-4 px-0 border-0 py-10px mt-2 font-style font-weight-500 className="card mb-4 px-0 border-0 py-10px mt-2 font-style font-weight-500
line-height-24 text-primary-500 bg-white" line-height-24 text-primary-500"
onClick={handleAddResponse} onClick={handleAddResponse}
data-testid="add-response" data-testid="add-response"
> >

View File

@@ -11,9 +11,9 @@ const usePostList = (ids) => {
const sortedIds = useMemo(() => { const sortedIds = useMemo(() => {
posts.forEach((post) => { posts.forEach((post) => {
if (post.pinned) { if (post && post.pinned) {
pinnedPostsIds.push(post.id); pinnedPostsIds.push(post.id);
} else { } else if (post) {
unpinnedPostsIds.push(post.id); unpinnedPostsIds.push(post.id);
} }
}); });

View File

@@ -1,9 +1,13 @@
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints; @import "~@edx/brand/paragon/fonts.scss";
@import "~@edx/brand/paragon/variables.scss";
@import "~@openedx/paragon/scss/core/core.scss";
@import "~@edx/brand/paragon/overrides.scss";
@import "~@edx/frontend-component-footer/dist/footer"; @import "~@edx/frontend-component-footer/dist/footer";
@import "~@edx/frontend-component-header/dist/index"; @import "~@edx/frontend-component-header/dist/index";
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome";
body, body,
#main #main
@@ -24,10 +28,6 @@ body,
font-size: 16px !important; font-size: 16px !important;
} }
.btn-plain {
background-color: var(--pgn-color-card-bg-base) !important;
}
#post, #post,
#comment, #comment,
#reply, #reply,
@@ -41,23 +41,23 @@ body,
} }
.text-staff-color { .text-staff-color {
color: var(--pgn-color-warning-700); color: $warning-700;
} }
.outline-staff-color { .outline-staff-color {
outline: var(--pgn-color-warning-700) solid 2px; outline: $warning-700 solid 2px;
} }
.text-TA-color { .text-TA-color {
color: var(--pgn-color-success-700); color: $success-700;
} }
.outline-TA-color { .outline-TA-color {
outline: var(--pgn-color-success-700) solid 2px; outline: $success-700 solid 2px;
} }
.outline-anonymous { .outline-anonymous {
outline: var(--pgn-color-light-400) solid 2px; outline: $light-400 solid 2px;
} }
.font-size-8 { .font-size-8 {
@@ -173,7 +173,7 @@ body,
} }
.learner > a:hover { .learner > a:hover {
background-color: var(--pgn-color-light-300); background-color: $light-300;
} }
.py-10px { .py-10px {
@@ -252,12 +252,12 @@ header {
} }
.border-light-400-2 { .border-light-400-2 {
border: 2px solid var(--pgn-color-light-400) !important; border: 2px solid $light-400 !important;
border-width: 2px !important; border-width: 2px !important;
} }
.border-primary-500-2 { .border-primary-500-2 {
border: 2px solid var(--pgn-color-primary-500) !important; border: 2px solid $primary-500 !important;
border-width: 2px !important; border-width: 2px !important;
} }
@@ -383,8 +383,8 @@ header {
} }
.btn-icon.btn-icon-primary:hover { .btn-icon.btn-icon-primary:hover {
background-color: var(--pgn-color-light-300) !important; background-color: $light-300 !important;
color: var(--pgn-color-primary-500) !important color: $primary-500 !important
} }
@@ -427,38 +427,38 @@ header {
} }
.hover-button:hover { .hover-button:hover {
background-color: var(--pgn-color-light-300) !important; background-color: $light-300 !important;
height: 36px !important; height: 36px !important;
border: none !important; border: none !important;
} }
.btn-tertiary:hover { .btn-tertiary:hover {
background-color: var(--pgn-color-light-300) !important; background-color: $light-300 !important;
} }
.nav-button-group { .nav-button-group {
.nav-link { .nav-link {
&:hover { &:hover {
background-color: var(--pgn-color-light-300) !important; background-color: $light-300 !important;
} }
} }
.nav-link.active, .nav-link.active,
.show>.nav-link { .show>.nav-link {
background-color: var(--pgn-color-primary-500) !important; background-color: $primary-500 !important;
} }
} }
.course-tabs-navigation { .course-tabs-navigation {
.nav a { .nav a {
&:hover { &:hover {
background-color: var(--pgn-color-light-300) !important;; background-color: $light-300 !important;;
} }
} }
} }
.btn-tertiary:disabled { .btn-tertiary:disabled {
color: var(--pgn-color-gray-700) !important; color: $gray-700 !important;
background-color: transparent !important; background-color: transparent !important;
} }
@@ -535,14 +535,14 @@ code {
.post-preview, .post-preview,
.discussion-comments { .discussion-comments {
blockquote { blockquote {
border-left: 2px solid var(--pgn-color-gray-200); border-left: 2px solid $gray-200;
margin-left: 1.5rem; margin-left: 1.5rem;
padding-left: 1rem; padding-left: 1rem;
} }
} }
.add-comment-btn { .add-comment-btn {
border: 1px solid var(--pgn-color-light-300) !important; border: 1px solid $light-300 !important;
} }
.icon-size-24 { .icon-size-24 {
@@ -588,7 +588,7 @@ code {
} }
th, td { th, td {
border: 1px dashed var(--pgn-color-gray-200); border: 1px dashed $gray-200;
padding: 0.4rem; padding: 0.4rem;
white-space: nowrap; white-space: nowrap;
} }