Skip to content

Commit

Permalink
fix(FEC-13517): Wrong and inconsistent order of plugins (#334)
Browse files Browse the repository at this point in the history
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 <jonathan.gold@[email protected]>
  • Loading branch information
JonathanTGold and JonathanTGold authored Jan 24, 2024
1 parent ec24ebf commit e20efc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
10 changes: 8 additions & 2 deletions src/qna-plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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: () => {
Expand Down

0 comments on commit e20efc1

Please sign in to comment.