From 0ad923b6a08a9d7acfb050827c766e6ee528483a Mon Sep 17 00:00:00 2001 From: logonoff Date: Thu, 20 Feb 2025 11:17:07 -0500 Subject: [PATCH 1/2] fix(lightspeed): remove resets from PF CSS import fixes https://issues.redhat.com/browse/RHIDP-5575 --- workspaces/lightspeed/.changeset/tiny-crews-raise.md | 5 +++++ workspaces/lightspeed/plugins/lightspeed/src/plugin.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 workspaces/lightspeed/.changeset/tiny-crews-raise.md diff --git a/workspaces/lightspeed/.changeset/tiny-crews-raise.md b/workspaces/lightspeed/.changeset/tiny-crews-raise.md new file mode 100644 index 000000000..cdf6aea90 --- /dev/null +++ b/workspaces/lightspeed/.changeset/tiny-crews-raise.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-lightspeed': patch +--- + +Remove CSS resets from PatternFly CSS import diff --git a/workspaces/lightspeed/plugins/lightspeed/src/plugin.ts b/workspaces/lightspeed/plugins/lightspeed/src/plugin.ts index b3dcd55e7..0f9607168 100644 --- a/workspaces/lightspeed/plugins/lightspeed/src/plugin.ts +++ b/workspaces/lightspeed/plugins/lightspeed/src/plugin.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import '@patternfly/react-core/dist/styles/base.css'; +import '@patternfly/react-core/dist/styles/base-no-reset.css'; import '@patternfly/chatbot/dist/css/main.css'; import { From ac7434b543bdd84d5bc6360e0650f1ebffe546a2 Mon Sep 17 00:00:00 2001 From: logonoff Date: Tue, 11 Mar 2025 12:47:38 -0400 Subject: [PATCH 2/2] fix(lightspeed): fix alignment issues with title and headermenu --- .../src/components/LightSpeedChat.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx b/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx index 6d1018437..23355b763 100644 --- a/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx +++ b/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx @@ -56,9 +56,23 @@ import { LightspeedChatBox } from './LightspeedChatBox'; import { LightspeedChatBoxHeader } from './LightspeedChatBoxHeader'; const useStyles = makeStyles(theme => ({ + body: { + // remove default margin and padding from common elements + '& h1, & h2, & h3, & h4, & h5, & h6, & p, & ul, & ol, & li': { + margin: 0, + padding: 0, + }, + }, header: { padding: `${theme.spacing(3)}px !important`, }, + headerMenu: { + // align hamburger icon with title + '& .pf-v6-c-button': { + display: 'flex', + alignItems: 'center', + }, + }, headerTitle: { justifyContent: 'left !important', }, @@ -321,12 +335,16 @@ export const LightspeedChat = ({ onConfirm={handleDeleteConversation} /> )} - + setIsDrawerOpen(!isDrawerOpen)} + className={classes.headerMenu} />