You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solution description:
Moved the CustomDrawer component from packages/app to plugins/quickstart/dev to resolve workspace accessibility issues during development. This ensures the component is directly available to the dev plugin without relying on the app workspace package
✔️ Checklist
A changeset describing the change and affected packages. (more info)
Added or Updated documentation
Tests for new functionality and regression tests for bug fixes
• Moved CustomDrawer component from packages/app to plugins/quickstart/dev
• Exported CustomDrawer as public dev API through package exports
• Updated DrawerComponent to use CustomDrawer instead of raw MUI Drawer
• Enhanced package.json with improved scripts, metadata, and scalprum configuration
Diagram
flowchart LR
A["packages/app<br/>ApplicationDrawer.tsx"] -->|"import from"| B["plugins/quickstart/dev<br/>CustomDrawer.tsx"]
C["DrawerComponent.tsx"] -->|"uses"| B
B -->|"exported as"| D["package.json<br/>dev export"]
D -->|"enables"| E["External consumers<br/>can import CustomDrawer"]
• Added @internal JSDoc comments to CustomDrawerProps type and CustomDrawer component
• Marked component as internal API to indicate it's for development use only
View more (3) 4. workspaces/quickstart/plugins/quickstart/dev/DrawerComponent.tsx
✨ Enhancement +7/-27
Refactor to use CustomDrawer component
• Removed direct MUI Drawer implementation and styling logic
• Replaced with CustomDrawer component wrapper for cleaner abstraction
• Added setDrawerWidth to context destructuring for width change handling
• Removed unused imports for Drawer and ThemeConfig
Export CustomDrawer and enhance package configuration
• Added ./dev export pointing to CustomDrawer.tsx for external access
• Added dev entry to typesVersions for TypeScript support
• Enhanced scripts with lint:check, lint:fix, prettier commands, and test coverage
• Added pluginPackage field and scalprum configuration with exposed modules
• Added package metadata including keywords, homepage, bugs, maintainers, and author
1. App depends on /dev entrypoint 🐞 Bug⛯ Reliability
Description
packages/app now imports CustomDrawer from the plugin’s @.../dev entrypoint. This couples the
app runtime to an internal/dev-only module surface, which is non-standard in this repo and increases
the chance of breakage if the ./dev export is changed/removed or not packaged for production
consumption.
+import { CustomDrawer } from '@red-hat-developer-hub/backstage-plugin-quickstart/dev';
Evidence
The app imports from @.../dev. Other frontend plugins in this repo typically export only main
(.) and optional ./alpha entrypoints, not ./dev, so relying on ./dev from app runtime is a
maintainability/packaging risk (and becomes a functional risk if Finding #1 occurs).
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
`packages/app` imports `CustomDrawer` from `@red-hat-developer-hub/backstage-plugin-quickstart/dev`, coupling app runtime to a dev-only/internal module surface.
## Issue Context
- This becomes a direct build/runtime risk if the `./dev` entrypoint isn’t shipped (see packaging mismatch in the plugin package.json).
- Even if shipped, it sets a precedent that the app depends on plugin dev internals.
## Fix Focus Areas
- workspaces/quickstart/packages/app/src/components/Root/ApplicationDrawer.tsx[17-27]
- workspaces/quickstart/plugins/quickstart/package.json[63-87]
## Suggested directions
1) Move `CustomDrawer` into the plugin’s `src/` and export it from a clearly-internal runtime entrypoint (e.g. `./internal`).
2) Alternatively, move `CustomDrawer` into a shared workspace package intended for reuse by `packages/app` and plugin dev tooling.
3) Update `ApplicationDrawer.tsx` import to use that new non-dev entrypoint.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. Width-change API is inert 🐞 Bug✓ Correctness
Description
Callers pass onWidthChange={setDrawerWidth} into CustomDrawer, but CustomDrawer never invokes
onWidthChange (and does not use minWidth/maxWidth). This makes the width-change plumbing
effectively dead and can confuse future maintainers or break any intended “resizable drawer”
behavior.
DrawerComponent and ApplicationDrawer wire setDrawerWidth into CustomDrawer via
onWidthChange, implying CustomDrawer should emit width updates. However, CustomDrawer only
reads drawerWidth for rendering and never calls onWidthChange, so no width updates can originate
from CustomDrawer.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
`CustomDrawer` exposes `onWidthChange`, `minWidth`, and `maxWidth`, and callers pass `setDrawerWidth` via `onWidthChange`, but the component never calls `onWidthChange` and does not use the min/max constraints.
## Issue Context
This makes the width-change API inert and can mislead consumers into thinking resizing is supported.
## Fix Focus Areas
- workspaces/quickstart/plugins/quickstart/dev/CustomDrawer.tsx[39-84]
- workspaces/quickstart/plugins/quickstart/dev/DrawerComponent.tsx[25-66]
- workspaces/quickstart/packages/app/src/components/Root/ApplicationDrawer.tsx[180-187]
## Suggested directions (choose one)
1) **Implement resizing**: add UI/logic to adjust width, clamp to `[minWidth, maxWidth]`, and invoke `onWidthChange(newWidth)`.
2) **Remove the inert API**: drop `onWidthChange/minWidth/maxWidth` from `CustomDrawerProps` and remove `onWidthChange={...}` at call sites.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ⓘ The new review experience is currently in Beta. Learn more
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, I just made a Pull Request!
Part of :
https://issues.redhat.com/browse/RHDHBUGS-2770
Solution description:
Moved the
CustomDrawercomponent frompackages/apptoplugins/quickstart/devto resolve workspace accessibility issues during development. This ensures the component is directly available to the dev plugin without relying on the app workspace package✔️ Checklist