Skip to content

Fix empty dashboard drop target - #27

Merged
aferd merged 1 commit into
patternfly:mainfrom
kdoberst:fix-inability-to-add-widgets-on-new-dashboard
Dec 3, 2026
Merged

aferd merged 1 commit into
patternfly:mainfrom
kdoberst:fix-inability-to-add-widgets-on-new-dashboard

Conversation

@kdoberst

@kdoberst kdoberst commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Issue

This fixes an issue where if the dashboard is empty, it is extremely difficult to drag a widget onto the dashboard. This is because when a widget starts go over the target area, the empty status text disappears causing the target area to have a minimal height. See video below:

Screen.Recording.2026-11-11.at.6.57.08.PM.mov

This PR fixes this issue by ensuring a minimum height even when the target area is empty.

Summary

  • Reserve drop space on the inner React Grid container when the dashboard is empty
  • Use a PatternFly spacer token and shared CSS custom property instead of inline styles or hard-coded pixels
  • Add a regression test for the empty-grid drop target modifier

Testing

  • yarn jest packages/module/src/WidgetLayout/__tests__/GridLayout.test.tsx --runInBand
  • ./node_modules/.bin/tsc --build --verbose packages/module/tsconfig.json
  • ./node_modules/.bin/eslint packages/module/src/WidgetLayout/GridLayout.tsx packages/module/src/WidgetLayout/__tests__/GridLayout.test.tsx
  • git diff --check

@aferd
aferd merged commit 21a0c4b into patternfly:main Dec 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants