diff --git a/workspaces/lightspeed/.changeset/soft-yaks-hope.md b/workspaces/lightspeed/.changeset/soft-yaks-hope.md new file mode 100644 index 0000000000..c2071a06d2 --- /dev/null +++ b/workspaces/lightspeed/.changeset/soft-yaks-hope.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-lightspeed': patch +--- + +Moved the `CustomDrawer` component from `packages/app` to `plugins/lightspeed/dev` to resolve workspace accessibility issues during development. diff --git a/workspaces/lightspeed/packages/app/package.json b/workspaces/lightspeed/packages/app/package.json index e1503caf45..a0762f3676 100644 --- a/workspaces/lightspeed/packages/app/package.json +++ b/workspaces/lightspeed/packages/app/package.json @@ -47,7 +47,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@mui/material": "^5.12.2", - "@red-hat-developer-hub/backstage-plugin-lightspeed": "*", + "@red-hat-developer-hub/backstage-plugin-lightspeed": "workspace:^", "@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0", "react": "^18.0.2", "react-dom": "^18.0.2", diff --git a/workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx b/workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx index b332851847..03a02a1aeb 100644 --- a/workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx +++ b/workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx @@ -22,7 +22,7 @@ import { useEffect, useRef, } from 'react'; -import { CustomDrawer } from './CustomDrawer'; +import { CustomDrawer } from '@red-hat-developer-hub/backstage-plugin-lightspeed/dev'; /** * Partial drawer state exposed by drawer plugins diff --git a/workspaces/lightspeed/packages/app/src/components/Root/CustomDrawer.tsx b/workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx similarity index 96% rename from workspaces/lightspeed/packages/app/src/components/Root/CustomDrawer.tsx rename to workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx index 695153e642..5a209c13e5 100644 --- a/workspaces/lightspeed/packages/app/src/components/Root/CustomDrawer.tsx +++ b/workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx @@ -14,13 +14,14 @@ * limitations under the License. */ -/* eslint-disable no-restricted-imports */ import Box from '@mui/material/Box'; import Drawer from '@mui/material/Drawer'; -/* eslint-enable no-restricted-imports */ import { ThemeConfig } from '@red-hat-developer-hub/backstage-plugin-theme'; +/** + * @internal + */ export type CustomDrawerProps = { children: React.ReactNode; minWidth?: number; @@ -32,6 +33,9 @@ export type CustomDrawerProps = { [key: string]: any; }; +/** + * @internal + */ export const CustomDrawer = (props: CustomDrawerProps) => { const { children, diff --git a/workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx b/workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx index bd7821ad36..efbd0f7d18 100644 --- a/workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx +++ b/workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx @@ -18,9 +18,8 @@ import { PropsWithChildren } from 'react'; import { ChatbotDisplayMode } from '@patternfly/chatbot'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { CustomDrawer } from '../../../packages/app/src/components/Root/CustomDrawer'; import { useLightspeedDrawerContext } from '../src/hooks/useLightspeedDrawerContext'; +import { CustomDrawer } from './CustomDrawer'; export const DrawerComponent = ({ children }: PropsWithChildren) => { const { displayMode, drawerWidth, setDrawerWidth } = diff --git a/workspaces/lightspeed/plugins/lightspeed/package.json b/workspaces/lightspeed/plugins/lightspeed/package.json index 7381a4d423..2a515e9ac5 100644 --- a/workspaces/lightspeed/plugins/lightspeed/package.json +++ b/workspaces/lightspeed/plugins/lightspeed/package.json @@ -10,6 +10,7 @@ "exports": { ".": "./src/index.ts", "./alpha": "./src/alpha.ts", + "./dev": "./dev/CustomDrawer.tsx", "./package.json": "./package.json" }, "typesVersions": { @@ -17,6 +18,9 @@ "alpha": [ "src/alpha.ts" ], + "dev": [ + "dev/CustomDrawer.tsx" + ], "package.json": [ "package.json" ] diff --git a/workspaces/lightspeed/plugins/lightspeed/report-dev.api.md b/workspaces/lightspeed/plugins/lightspeed/report-dev.api.md new file mode 100644 index 0000000000..4b45d529f7 --- /dev/null +++ b/workspaces/lightspeed/plugins/lightspeed/report-dev.api.md @@ -0,0 +1,7 @@ +## API Report File for "@red-hat-developer-hub/backstage-plugin-lightspeed" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +// (No @packageDocumentation comment for this package) +``` diff --git a/workspaces/lightspeed/yarn.lock b/workspaces/lightspeed/yarn.lock index 3d32a262de..daac22d909 100644 --- a/workspaces/lightspeed/yarn.lock +++ b/workspaces/lightspeed/yarn.lock @@ -10387,7 +10387,7 @@ __metadata: languageName: unknown linkType: soft -"@red-hat-developer-hub/backstage-plugin-lightspeed@npm:*, @red-hat-developer-hub/backstage-plugin-lightspeed@workspace:plugins/lightspeed": +"@red-hat-developer-hub/backstage-plugin-lightspeed@workspace:^, @red-hat-developer-hub/backstage-plugin-lightspeed@workspace:plugins/lightspeed": version: 0.0.0-use.local resolution: "@red-hat-developer-hub/backstage-plugin-lightspeed@workspace:plugins/lightspeed" dependencies: @@ -14900,7 +14900,7 @@ __metadata: "@material-ui/icons": "npm:^4.9.1" "@mui/material": "npm:^5.12.2" "@playwright/test": "npm:1.58.2" - "@red-hat-developer-hub/backstage-plugin-lightspeed": "npm:*" + "@red-hat-developer-hub/backstage-plugin-lightspeed": "workspace:^" "@red-hat-developer-hub/backstage-plugin-theme": "npm:^0.12.0" "@testing-library/dom": "npm:^9.0.0" "@testing-library/jest-dom": "npm:^6.0.0"