Skip to content

Commit

Permalink
Merge pull request #881 from dcashpeterson/main
Browse files Browse the repository at this point in the history
added default web part height
  • Loading branch information
dcashpeterson authored Jan 20, 2025
2 parents 89db6df + 3756c5d commit fbd4b87
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 29 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log

## Version 5.0.0.6

- Bug fix for [#850](../../../issues/850) - Dropdown selection of playlist item is not working in V5.
- Bug fix for [#872](../../../issues/872) - Learning Pathways dropdowns suddenly stopped working.
- Bug fix for [#878](../../../issues/878) - Removed error in focus for image dialog.
- Bug fix for [#771](../../../issues/771) - Accessibility concerns with template. Changed the template back to white.
- Enhancement for [#820](../../../issues/820) - Adding default web part height option.

## Version 5.0

**This version is a major release that includes new features. It will support updating from either the version 2.x or 3.x of the learning pathways solution. You should take appropriate caution when updating to this version of the web part by backing up your learning pathways master site content, specifically your custom subcategories, custom playlists, and custom assets. Please see [Backup Playlist Content](./installation/BackupInstructions.md) for more detail instructions.**

- Updated SPFx version to 1.19
Expand Down
16 changes: 8 additions & 8 deletions docs/learningpathways/v4/en-us/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6317,7 +6317,7 @@
"Id": "6c579f61-8adb-4514-9458-021de2023fa0",
"Title": "Add staff and view a calendar",
"Description": "",
"Url": "https://support.office.com/en-us/client/6c579f61-8adb-4514-9458-021de2023fa0?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/6c579f61-8adb-4514-9458-021de2023fa0?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6328,7 +6328,7 @@
"Id": "6dc89bcf-9420-4820-ac10-e1c13d2b2e68",
"Title": "Plan and schedule a live event",
"Description": "",
"Url": "https://support.office.com/en-us/client/f92363a0-6d98-46d2-bdd9-f2248075e502?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/f92363a0-6d98-46d2-bdd9-f2248075e502?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6339,7 +6339,7 @@
"Id": "6dd4a6fd-d88f-4baf-b08e-06755a680926",
"Title": "Join a Teams meeting",
"Description": "",
"Url": "https://support.office.com/en-us/client/078e9868-f1aa-4414-8bb9-ee88e9236ee4?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/078e9868-f1aa-4414-8bb9-ee88e9236ee4?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "615f17eb-2c5b-4494-8541-4304435ca306",
"Source": "Microsoft",
Expand All @@ -6350,7 +6350,7 @@
"Id": "702a2977-e662-4038-bef5-bdf8ee47b17b",
"Title": "Create a team with templates",
"Description": "",
"Url": "https://support.office.com/en-us/client/702a2977-e662-4038-bef5-bdf8ee47b17b?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/702a2977-e662-4038-bef5-bdf8ee47b17b?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6361,7 +6361,7 @@
"Id": "712ef898-a27e-42fa-a9c1-bfd0733bae97",
"Title": "Hide chats and delete messages",
"Description": "",
"Url": "https://support.office.com/en-us/client/10e105ed-0c22-4d94-b7b6-d543a27c472b?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/10e105ed-0c22-4d94-b7b6-d543a27c472b?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6372,7 +6372,7 @@
"Id": "7237da86-9409-40e1-9b05-fc3eba33404c",
"Title": "Manage meetings",
"Description": "",
"Url": "https://support.office.com/en-us/client/ba44d0fd-da3c-4541-a3eb-a868f5e2b137?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/ba44d0fd-da3c-4541-a3eb-a868f5e2b137?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6383,7 +6383,7 @@
"Id": "75734507-da8d-4ff1-a541-9136a825581b",
"Title": "Manage notifications on the go",
"Description": "",
"Url": "https://support.office.com/en-us/client/de42104f-10e1-4b05-9be7-4b078b8bc94f?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/de42104f-10e1-4b05-9be7-4b078b8bc94f?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand All @@ -6394,7 +6394,7 @@
"Id": "77d55b36-b274-4fee-acbe-978ccf14c7e6",
"Title": "Work in channels",
"Description": "",
"Url": "https://support.office.com/en-us/client/77d55b36-b274-4fee-acbe-978ccf14c7e6?embed=true&themeid=6&themeid=6",
"Url": "https://support.office.com/en-us/client/77d55b36-b274-4fee-acbe-978ccf14c7e6?embed=true&themeid=6",
"TechnologyId": "c209f64e-0291-437a-9615-17747eab50d0",
"SubjectId": "",
"Source": "Microsoft",
Expand Down
Binary file modified installation/customlearning.sppkg
Binary file not shown.
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/de-de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Sortieren anpassen",
ResetSort: "Sortierung zurücksetzen",
AlwaysShowSearchLabel: "Suchleiste immer anzeigen",
AlwaysOpenAssetInDialog: "Öffnen Sie Wiedergabelisten immer im Dialog"
AlwaysOpenAssetInDialog: "Öffnen Sie Wiedergabelisten immer im Dialog",
DefaultWebPartHeightTitle: "Standardmäßige Webparthöhe"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Customize Sort",
ResetSort: "Reset Sort",
AlwaysShowSearchLabel: "Always Show Search Bar",
AlwaysOpenAssetInDialog: "Always Open Assets In Dialog"
AlwaysOpenAssetInDialog: "Always Open Assets In Dialog",
DefaultWebPartHeightTitle: "Default Web Part height"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/es-es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Personalizar orden",
ResetSort: "Restablecer orden",
AlwaysShowSearchLabel: "Mostrar siempre la barra de búsqueda",
AlwaysOpenAssetInDialog: "Siempre abrir recursos en el cuadro de diálogo"
AlwaysOpenAssetInDialog: "Siempre abrir recursos en el cuadro de diálogo",
DefaultWebPartHeightTitle: "Altura predeterminada del elemento web"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/fr-fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Personnaliser le tri",
ResetSort: "Réinitialiser le tri",
AlwaysShowSearchLabel: "Toujours afficher la barre de recherche",
AlwaysOpenAssetInDialog: "Toujours ouvrir les actifs dans la boîte de dialogue"
AlwaysOpenAssetInDialog: "Toujours ouvrir les actifs dans la boîte de dialogue",
DefaultWebPartHeightTitle: "Hauteur par défaut du composant WebPart"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/it-it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Personalizza l'ordinamento",
ResetSort: "Reimposta ordinamento",
AlwaysShowSearchLabel: "Mostra sempre la barra di ricerca",
AlwaysOpenAssetInDialog: "Apri sempre le risorse nella finestra di dialogo"
AlwaysOpenAssetInDialog: "Apri sempre le risorse nella finestra di dialogo",
DefaultWebPartHeightTitle: "Altezza predefinita della webpart"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/ja-jp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "並べ替えのカスタマイズ",
ResetSort: "並べ替えをリセット",
AlwaysShowSearchLabel: "常に検索バーを表示",
AlwaysOpenAssetInDialog: "常にダイアログでアセットを開く"
AlwaysOpenAssetInDialog: "常にダイアログでアセットを開く",
DefaultWebPartHeightTitle: "デフォルトの Web パーツの高さ"
};
});
1 change: 1 addition & 0 deletions src/webpart/src/webparts/common/loc/mystrings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ declare interface IM365LPStrings {
ResetSort: string;
AlwaysShowSearchLabel: string;
AlwaysOpenAssetInDialog: string;
DefaultWebPartHeightTitle: string;
}

declare module 'M365LPStrings' {
Expand Down
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/nl-nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Sortering aanpassen",
ResetSort: "Sortering opnieuw instellen",
AlwaysShowSearchLabel: "Zoekbalk altijd weergeven",
AlwaysOpenAssetInDialog: "Altijd in het dialoogvenster openen"
AlwaysOpenAssetInDialog: "Altijd in het dialoogvenster openen",
DefaultWebPartHeightTitle: "Standaard webonderdeelhoogte"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Personalizar classificação",
ResetSort: "Redefinir classificação",
AlwaysShowSearchLabel: "Mostrar sempre a barra de pesquisa",
AlwaysOpenAssetInDialog: "Sempre abrir ativos na caixa de diálogo"
AlwaysOpenAssetInDialog: "Sempre abrir ativos na caixa de diálogo",
DefaultWebPartHeightTitle: "Altura padrão do webpart",
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/ru-ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "Настроить сортировку",
ResetSort: "Сбросить сортировку",
AlwaysShowSearchLabel: "Всегда показывать строку поиска",
AlwaysOpenAssetInDialog: "Всегда открывать ресурсы в диалоговом окне"
AlwaysOpenAssetInDialog: "Всегда открывать ресурсы в диалоговом окне",
DefaultWebPartHeightTitle: "Высота веб-части по умолчанию"
};
});
3 changes: 2 additions & 1 deletion src/webpart/src/webparts/common/loc/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ define([], (): IM365LPStrings => {
CustomizeSort: "自定义排序",
ResetSort: "重置排序",
AlwaysShowSearchLabel: "始终显示搜索栏",
AlwaysOpenAssetInDialog: "始终在对话框中打开资产"
AlwaysOpenAssetInDialog: "始终在对话框中打开资产",
DefaultWebPartHeightTitle: "默认 Web 部件高度"
};
});
22 changes: 15 additions & 7 deletions src/webpart/src/webparts/customLearning/CustomLearningWebPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface ICustomLearningWebPartProps {
customSortOrder: string[];
alwaysShowSearch: boolean;
openAssetsInDialog: boolean;
defaultWebPartHeight: string;
}

export default class CustomLearningWebPart extends BaseClientSideWebPart<ICustomLearningWebPartProps> {
Expand Down Expand Up @@ -370,7 +371,8 @@ export default class CustomLearningWebPart extends BaseClientSideWebPart<ICustom
webpartTitle: this.properties.title,
teamsEntityId: this._teamsContext?.page?.subPageId ?? '',
alwaysShowSearch: this.properties.alwaysShowSearch || false,
openAssetsInDialog: (this.properties.openAssetsInDialog && this.displayMode != DisplayMode.Edit) ? this.properties.openAssetsInDialog : false
openAssetsInDialog: (this.properties.openAssetsInDialog && this.displayMode != DisplayMode.Edit) ? this.properties.openAssetsInDialog : false,
defaultWebPartHeight: this.properties.defaultWebPartHeight
};

element = React.createElement(React.Suspense, { fallback: shimmer },
Expand Down Expand Up @@ -525,14 +527,17 @@ export default class CustomLearningWebPart extends BaseClientSideWebPart<ICustom
type: PropertyPaneDropdownOptionType.Header
});
plItems[catId] = [];
if (catId.length > 0) {
plItems[catId].push({
key: cachedPlaylists[i].Id,
text: cachedPlaylists[i].Title as string,
});
}
}
}

if (catId.length > 0) {
plItems[catId].push({
key: cachedPlaylists[i].Id,
text: cachedPlaylists[i].Title as string,
});
}


}
categories = sortBy(categories, (o) => { return o.text.toLowerCase(); });
for (let c = 0; c < categories.length; c++) {
Expand Down Expand Up @@ -591,6 +596,9 @@ export default class CustomLearningWebPart extends BaseClientSideWebPart<ICustom
options: this._ppWebpartMode,
selectedKey: this.properties.webpartMode
}),
PropertyPaneTextField('defaultWebPartHeight', {
label: strings.DefaultWebPartHeightTitle
}),
PropertyPaneToggle('alwaysShowSearch', {
label: strings.AlwaysShowSearchLabel,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface IAssetViewProps {
assetOrigins: string[];
selectAsset: (assetId: string) => void;
openAssetsInDialog: boolean;
defaultWebPartHeight: string;
}

export interface IAssetViewState {
Expand All @@ -42,12 +43,13 @@ export default class AssetView extends React.Component<IAssetViewProps, IAssetVi
private _IFrameCont;

private _messageReceived: boolean = false;
private _Height: number = 9000;
private _Height: number = 9000;// this.props.defaultWebPartHeight ? +this.props.defaultWebPartHeight : this.HEIGHT_DEFAULT;

constructor(props) {
super(props);
this._IFrame = React.createRef();
this._IFrameCont = React.createRef();
this.HEIGHT_DEFAULT = this.props.defaultWebPartHeight ? +this.props.defaultWebPartHeight : 9000;
}

public shouldComponentUpdate(nextProps: Readonly<IAssetViewProps>, nextState: Readonly<IAssetViewState>): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export interface ICustomLearningProps {
teamsEntityId: string;
alwaysShowSearch: boolean;
openAssetsInDialog: boolean;
defaultWebPartHeight: string;

}

export interface ICustomLearningState {
Expand Down Expand Up @@ -495,6 +497,7 @@ export default class CustomLearning extends React.Component<ICustomLearningProps
assetOrigins={this._uxService.CacheConfig.AssetOrigins}
selectAsset={this._selectAsset}
openAssetsInDialog={(this.props.openAssetsInDialog || this.state.renderPanel) ? true : false}
defaultWebPartHeight={this.props.defaultWebPartHeight}
/>;
break;
default:
Expand Down
6 changes: 3 additions & 3 deletions src/webpart/src/webparts/filePicker/FilePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class FilePicker extends React.PureComponent<IFilePickerProps, IF
private LOG_SOURCE: string = "🟢FilePicker";
private FILE_PICKER_URL: string;

private _container: React.RefObject<HTMLDivElement>;
//private _container: React.RefObject<HTMLDivElement>;
private _IFrameElement: React.RefObject<HTMLIFrameElement>;
private _FilePickerParams: any;
private _QueryString: URLSearchParams;
Expand All @@ -35,13 +35,13 @@ export default class FilePicker extends React.PureComponent<IFilePickerProps, IF
super(props);
this.state = new FilePickerState();
this._IFrameElement = React.createRef();
this._container = React.createRef();
//this._container = React.createRef();
}

public componentDidMount(): void {
try {
this._init();
this._container.current.focus();
//this._container.current.focus();
} catch (err) {
console.error(`${this.LOG_SOURCE} (componentDidMount) - ${err}`);
}
Expand Down

0 comments on commit fbd4b87

Please sign in to comment.