Skip to content

feat(scraps): adopt GlobalDrawer component into design system#113489

Merged
natemoo-re merged 18 commits into
masterfrom
nm/ui/drawer
Apr 21, 2026
Merged

feat(scraps): adopt GlobalDrawer component into design system#113489
natemoo-re merged 18 commits into
masterfrom
nm/ui/drawer

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Apr 20, 2026

Copy link
Copy Markdown
Member

Moves GlobalDrawer into @sentry/scraps/drawer. Combines individual boolean options with a single mode: 'blocking' | 'passive', which is also wired through to the SlideOverPanel primitive. Removed overrides like drawerCss and transitionProps (only used in a few places, not needed).

Most file changes here are just updating imports from sentry/components/globalDrawer/components to @sentry/scraps/drawer

Recommended review mode: Only files owned by you
files-owned-by-you

Closes DE-1167, DE-1170, DE-1173

@linear-code

linear-code Bot commented Apr 20, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 20, 2026
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 21, 2026
@github-actions

This comment was marked as outdated.

Comment thread static/app/components/core/drawer/index.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d3bf81ee482168e5c298d1670c3339078b510d7d. Configure here.

Comment thread static/app/components/core/drawer/index.tsx Outdated
@natemoo-re natemoo-re removed the Scope: Backend Automatically applied to PRs that change backend components label Apr 21, 2026
Comment on lines 55 to 62
openDrawer(() => <SeerDrawer group={group} project={project} event={event} />, {
ariaLabel: t('Seer drawer'),
drawerKey: 'seer-autofix-drawer',
drawerCss: css`
height: fit-content;
max-height: 100%;
`,
resizable: true,
closeOnOutsideClick: false,
shouldLockScroll: false,
mode: 'passive',
onClose: () => {
navigate(
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Seer drawer now always renders at full viewport height because the drawerCss prop that set height: fit-content was removed.
Severity: LOW

Suggested Fix

Reintroduce the height: fit-content styling to the Seer drawer. This can be done by applying a style directly to the Drawer component or by using a styled-component wrapper that sets the height appropriately, ensuring it only takes up the space required by its content.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/views/issueDetails/streamline/sidebar/seerDrawer.tsx#L55-L62

Potential issue: The Seer drawer component will now always render at the full height of
the viewport, regardless of its content's size. This is because the `drawerCss` prop,
which previously applied `height: fit-content`, was removed during the refactor to use
the `mode: 'passive'` API. The underlying `DrawerSlidePanel` component has a hardcoded
`height: 100%`, and without the `drawerCss` override, this style is now applied, causing
the drawer to occupy the entire screen height instead of fitting its content.

Comment on lines -58 to -64
drawerCss: css`
height: fit-content;
max-height: 100%;
`,
resizable: true,
closeOnOutsideClick: false,
shouldLockScroll: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warms my heart to see all these props removed

Comment thread static/app/components/core/backdrop/backdrop.tsx
@natemoo-re
natemoo-re enabled auto-merge (squash) April 21, 2026 20:27
@natemoo-re
natemoo-re merged commit cd71233 into master Apr 21, 2026
61 checks passed
@natemoo-re
natemoo-re deleted the nm/ui/drawer branch April 21, 2026 20:30
natemoo-re added a commit that referenced this pull request May 1, 2026
Following up on #113489 #113968, this PR moves `GlobalModal` into
Scraps.
- The canonical import is now `@sentry/scraps/modal`.
- The only API change is renaming the hook from `useGlobalModal` ->
`useModal`.

Additional refactors to come.
cleptric pushed a commit that referenced this pull request May 5, 2026
Following up on #113489 #113968, this PR moves `GlobalModal` into
Scraps.
- The canonical import is now `@sentry/scraps/modal`.
- The only API change is renaming the hook from `useGlobalModal` ->
`useModal`.

Additional refactors to come.
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants