fix: centralize drawer content spacing (#3278)#6124
Conversation
Contributor License AgreementHey @ded-furby! Thank you for your contribution to Filigran! Before we can merge this pull request, we need you to sign our Contributor License Agreement (CLA). Why do we need a CLA?The CLA helps protect both you and Filigran. It ensures that:
How to signYou can sign the CLA using either of these methods:
Once signed, this comment will be automatically updated. ❌ CLA not signed yet This is an automated message from the Filigran CLA Bot. If you have questions, please contact the maintainers. |
|
Thank you for your contribution. This PR is but one step away from being ready for merging: all commits must be PGP-signed. To get started, please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors Drawer container styling by introducing dedicated props to control padding and max-height, and updates callers to use these new props instead of passing containerStyle overrides.
Changes:
- Added
disableContainerPaddingandcontainerMaxHeightprops toDrawer. - Updated multiple
Drawercall sites to use the new props (removing inlinecontainerStylepadding/maxHeight overrides).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openaev-front/src/components/common/queryable/pagination/PaginationComponentV2.tsx | Switches to new Drawer props for padding/max-height in the ATT&CK Matrix drawer. |
| openaev-front/src/components/common/Drawer.tsx | Introduces new props and applies them to the container <div> styling. |
| openaev-front/src/admin/components/simulations/simulation/ExercisePopover.tsx | Uses disableContainerPadding instead of containerStyle padding override. |
| openaev-front/src/admin/components/scenarios/scenario/scenario_assistant/SelectTTPsDrawer.tsx | Switches to new Drawer props for padding/max-height in the ATT&CK Matrix drawer. |
| ...(disableContainerPadding ? {} : { padding: '10px 20px 20px 20px' }), | ||
| ...(containerMaxHeight ? { maxHeight: containerMaxHeight } : {}), | ||
| ...containerStyle, |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6124 +/- ##
============================================
+ Coverage 41.22% 42.54% +1.32%
Complexity 6731 6731
============================================
Files 2192 2237 +45
Lines 60725 61081 +356
Branches 7861 8024 +163
============================================
+ Hits 25033 25989 +956
+ Misses 34109 33404 -705
- Partials 1583 1688 +105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Related issue
What changed
disableContainerPaddingandcontainerMaxHeight.padding: 0,maxHeight: '100%') into Drawer prop usage for ATT&CK drawers.containerStyleoverrides in:SelectTTPsDrawerPaginationComponentV2ExercisePopoverWhy
This keeps spacing defaults in
Drawerand reduces duplicated inline overrides across usage sites.Validation
npm run check-ts(attempted) could not run:tscis not available in this environment (sh: tsc: command not found).npm run checkscript is not defined inopenaev-front/package.json(attempted and received missing script error).