Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lightspeed): remove resets from PF CSS import #469

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/lightspeed/.changeset/tiny-crews-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-lightspeed': patch
---

Remove CSS resets from PatternFly CSS import
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -321,12 +335,16 @@ export const LightspeedChat = ({
onConfirm={handleDeleteConversation}
/>
)}
<Chatbot displayMode={ChatbotDisplayMode.embedded}>
<Chatbot
displayMode={ChatbotDisplayMode.embedded}
className={classes.body}
>
<ChatbotHeader className={classes.header}>
<ChatbotHeaderMain>
<ChatbotHeaderMenu
aria-expanded={isDrawerOpen}
onMenuToggle={() => setIsDrawerOpen(!isDrawerOpen)}
className={classes.headerMenu}
/>
<ChatbotHeaderTitle className={classes.headerTitle}>
<Title headingLevel="h1" size="3xl">
Expand Down
2 changes: 1 addition & 1 deletion workspaces/lightspeed/plugins/lightspeed/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down