From 879ffddb3b38b2679a34fd260a81ced23fcff39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20ROU=C3=8BN=C3=89?= Date: Thu, 11 Jul 2024 14:15:53 +0200 Subject: [PATCH] [3756] Add an extension point to contribute custom footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://github.com/eclipse-sirius/sirius-web/issues/3756 Signed-off-by: Florian ROUËNÉ --- CHANGELOG.adoc | 5 +++-- .../src/footer/Footer.types.ts | 14 +++++++++++++ .../src/footer/FooterExtensionPoints.tsx | 20 +++++++++++++++++++ .../{Footer.tsx => SiriusWebFooter.tsx} | 3 ++- .../sirius-web-application/src/index.ts | 2 ++ .../src/views/new-project/NewProjectView.tsx | 7 ++++--- .../views/project-browser/ProjectBrowser.tsx | 5 ++++- .../project-settings/ProjectSettingsView.tsx | 5 +++-- 8 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.types.ts create mode 100644 packages/sirius-web/frontend/sirius-web-application/src/footer/FooterExtensionPoints.tsx rename packages/sirius-web/frontend/sirius-web-application/src/footer/{Footer.tsx => SiriusWebFooter.tsx} (92%) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 0939757700..720a09ca34 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -30,8 +30,9 @@ === Improvements -- https://github.com/eclipse-sirius/sirius-web/issues/3744[#3744] [diagram] Add support for helper lines during multi selection move. -- https://github.com/eclipse-sirius/sirius-web/issues/3770[#3770] [diagram] Enable helper lines by default. +- https://github.com/eclipse-sirius/sirius-web/issues/3744[#3744] [diagram] Add support for helper lines during multi selection move +- https://github.com/eclipse-sirius/sirius-web/issues/3770[#3770] [diagram] Enable helper lines by default +- https://github.com/eclipse-sirius/sirius-web/issues/3756[#3756] [sirius-web] Add an extension point to contribute custom footer == v2024.7.0 diff --git a/packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.types.ts b/packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.types.ts new file mode 100644 index 0000000000..422aee8659 --- /dev/null +++ b/packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.types.ts @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ + +export interface FooterProps {} diff --git a/packages/sirius-web/frontend/sirius-web-application/src/footer/FooterExtensionPoints.tsx b/packages/sirius-web/frontend/sirius-web-application/src/footer/FooterExtensionPoints.tsx new file mode 100644 index 0000000000..21e3a43922 --- /dev/null +++ b/packages/sirius-web/frontend/sirius-web-application/src/footer/FooterExtensionPoints.tsx @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +import { ComponentExtensionPoint } from '@eclipse-sirius/sirius-components-core'; +import { FooterProps } from './Footer.types'; +import { SiriusWebFooter } from './SiriusWebFooter'; + +export const footerExtensionPoint: ComponentExtensionPoint = { + identifier: 'footer', + FallbackComponent: SiriusWebFooter, +}; diff --git a/packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.tsx b/packages/sirius-web/frontend/sirius-web-application/src/footer/SiriusWebFooter.tsx similarity index 92% rename from packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.tsx rename to packages/sirius-web/frontend/sirius-web-application/src/footer/SiriusWebFooter.tsx index 3f4c304a50..0c8c8d80ec 100644 --- a/packages/sirius-web/frontend/sirius-web-application/src/footer/Footer.tsx +++ b/packages/sirius-web/frontend/sirius-web-application/src/footer/SiriusWebFooter.tsx @@ -13,6 +13,7 @@ import Link from '@material-ui/core/Link'; import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; +import { FooterProps } from './Footer.types'; const useFooterStyles = makeStyles((theme) => ({ footer: { @@ -26,7 +27,7 @@ const useFooterStyles = makeStyles((theme) => ({ }, })); -export const Footer = () => { +export const SiriusWebFooter = ({}: FooterProps) => { const classes = useFooterStyles(); return (