fix emoji picker in SG2

fix emoji picker in SG2 so that an empty array is passed if there are
no excluded emojis instead of an array with an empty string

closes EVAL-4435

flag=platform_service_speedgrader

test plan:
- ensure SG2 emoji picker shows all emojis and categories

Change-Id: I694b503ec249ae4703bba16b0d33298beb29118f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354655
QA-Review: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
This commit is contained in:
rohanchugh14 2024-08-08 15:59:23 -05:00 committed by Rohan Chugh
parent 45c63d9939
commit 815ba5964d
3 changed files with 4 additions and 3 deletions

View File

@ -1047,7 +1047,9 @@ class GradebooksController < ApplicationController
remote_env(speedgrader: Services::PlatformServiceSpeedgrader.launch_url)
env = {
GRADE_BY_QUESTION_SUPPORTED: nil
GRADE_BY_QUESTION_SUPPORTED: nil,
EMOJIS_ENABLED: @context.feature_enabled?(:submission_comment_emojis),
EMOJI_DENY_LIST: @context.root_account.settings[:emoji_deny_list],
}
js_env(env)

View File

@ -95,7 +95,7 @@ ready(() => {
hrefs: {
heroIcon: `/courses/${window.ENV.course_id}/gradebook`,
},
emojisDenyList: window.ENV.EMOJI_DENY_LIST?.split(','),
emojisDenyList: window.ENV.EMOJI_DENY_LIST ? window.ENV.EMOJI_DENY_LIST.split(',') : [],
mediaSettings: window.INST.kalturaSettings,
lang: window.navigator.language || ENV.LOCALE || ENV.BIGEASY_LOCALE,
},

View File

@ -195,7 +195,6 @@ function transform(result: any) {
comments: submission?.commentsConnection?.nodes,
rubricAssessments: submission.rubricAssessmentsConnection?.nodes,
submissionHistory: submission.submissionHistoriesConnection?.nodes,
// @ts-expect-error
submissionState: speedGraderHelpers.submissionState(submission, ENV.grading_role ?? ''),
}
}