From e20efc1077d82b3bb8c2fdfd6f49db8420cf6f72 Mon Sep 17 00:00:00 2001 From: JonathanTGold <62672270+JonathanTGold@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:14:50 +0200 Subject: [PATCH] fix(FEC-13517): Wrong and inconsistent order of plugins (#334) fix: Plugins buttons sometimes display with the wrong icon solves: FEC-13517 FEC-13517 Related Prs kaltura/playkit-js-ui-managers#51 kaltura/playkit-js-transcript#175 kaltura/playkit-js-share#38 kaltura/playkit-js-moderation#74 kaltura/playkit-js-playlist#53 kaltura/playkit-js-related#61 kaltura/playkit-js-navigation#348 kaltura/playkit-js-info#90 kaltura/playkit-js-downloads#39 -------------------------------------------------------------- Co-authored-by: JonathanTGold --- src/index.ts | 2 +- src/qna-plugin.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 028f0f93..4d0d0bcf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,5 +9,5 @@ const NAME = __NAME__; export {QnaPlugin as Plugin}; export {VERSION, NAME}; -const pluginName: string = 'qna'; +export const pluginName: string = 'qna'; KalturaPlayer.core.registerPlugin(pluginName, QnaPlugin); diff --git a/src/qna-plugin.tsx b/src/qna-plugin.tsx index 25f79737..e7d17ce4 100644 --- a/src/qna-plugin.tsx +++ b/src/qna-plugin.tsx @@ -14,6 +14,7 @@ import {icons} from './components/icons'; import {PluginStates, QnaPluginConfig, TimedMetadataEvent, CuePoint, ModeratorSettings} from './types'; import {ui} from '@playkit-js/kaltura-player-js'; import {Utils} from './utils'; +import { pluginName } from "./index"; const {SidePanelModes, SidePanelPositions, ReservedPresetNames} = ui; const {Text} = KalturaPlayer.ui.preacti18n; @@ -213,9 +214,14 @@ export class QnaPlugin extends KalturaPlayer.core.BasePlugin { expandMode: this.config.expandMode === SidePanelModes.ALONGSIDE ? SidePanelModes.ALONGSIDE : SidePanelModes.OVER, onDeactivate: this._deactivatePlugin }) as number; - + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore this._pluginIcon = this.upperBarManager!.add({ - label: 'Q&A', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + displayName: 'Q&A', + ariaLabel: 'Q&A', + order: 20, svgIcon: {path: icons.PLUGIN_ICON, viewBox: `0 0 ${icons.BigSize} ${icons.BigSize}`}, onClick: this._handleClickOnPluginIcon as () => void, component: () => {