Skip to content

feat: Drawer#101

Open
daBack wants to merge 2 commits intomainfrom
38-drawer
Open

feat: Drawer#101
daBack wants to merge 2 commits intomainfrom
38-drawer

Conversation

@daBack
Copy link
Contributor

@daBack daBack commented Feb 22, 2026

Så sheeten funkar som den ska, förutom lock. försökte importera ett paket, men fick det inte ens att funka i IDE:n. är de för att de är gamla js?

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2026

⚠️ No Changeset found

Latest commit: 8da4388

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for scouterna-ui ready!

Name Link
🔨 Latest commit 8da4388
🔍 Latest deploy log https://app.netlify.com/projects/scouterna-ui/deploys/69b6f8812ee74a00084bfd2b
😎 Deploy Preview https://deploy-preview-101--scouterna-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@scriptcoded
Copy link
Member

@daBack Oj det här är coolt! Men ingen aning om varför eventen inte syns 🤔 Men det verkar vara så för alla stories så det är säkert jag som pajat något 😄

Copy link
Member

@scriptcoded scriptcoded left a comment

Choose a reason for hiding this comment

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

Verkar funka bra! 🥳 Utöver lite petty kommentarer på koden, funderar på om vi ska "unmounta" slotten när panelen göms? Just nu finns contenten kvar i domen även när panelen är stängd.

Image

@daBack daBack requested a review from scriptcoded March 15, 2026 18:21
@daBack daBack marked this pull request as ready for review March 15, 2026 18:21
Copilot AI review requested due to automatic review settings March 15, 2026 18:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new scout-drawer Stencil web component to the design system, along with Storybook documentation and a focus-trap dependency to support proper keyboard navigation when the drawer is open.

Changes:

  • Introduces scout-drawer component implementation and styling in ui-webc.
  • Adds an accompanying Storybook story for the new component.
  • Adds dom-focus-lock dependency (and updates lockfile).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
packages/ui-webc/src/components/drawer/drawer.tsx New drawer component logic, props/events, focus-lock integration
packages/ui-webc/src/components/drawer/drawer.css Drawer layout, animations, backdrop and header/button styling
packages/ui-webc/src/components/drawer/readme.md Auto-generated component docs for props/events
packages/storybook/src/stories/drawer.stories.tsx Storybook story to demo and interact with the drawer
packages/ui-webc/package.json Adds dom-focus-lock dependency
pnpm-lock.yaml Lockfile updates for new dependency + deprecation metadata
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +137 to +141
// biome-ignore lint/a11y/useButtonType: <not needed>
<button
class="back-button"
onClick={() => this.onBackButtonClick()}
>
Comment on lines +63 to +69
@State() focusedNode: Element = null;

componentWillLoad(): Promise<void> | void {
this.focusedNode = document.activeElement;
}
disconnectedCallback(): void {
this.focusedNode;
this.focusedNode = document.activeElement;
}
disconnectedCallback(): void {
this.focusedNode;
Comment on lines +142 to +145
<span class="icon" innerHTML={backIcon}>
<span class="visually-hidden">{this.backButtonLabel}</span>
</span>
</button>
Comment on lines +153 to +156
<span class="icon" innerHTML={exitIcon}>
<span class="visually-hidden">{this.exitButtonLabel}</span>
</span>
</button>
Comment on lines 2305 to +2308
basic-ftp@5.0.5:
resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==}
engines: {node: '>=10.0.0'}
deprecated: Security vulnerability fixed in 5.2.0, please upgrade
}

@Watch("open")
setDialogOpenState(open: boolean) {
Comment on lines +88 to +100
@Watch("open")
setDialogOpenState(open: boolean) {
const drawer = this.rootElement.shadowRoot.querySelector(
".drawer--container",
) as HTMLElement;
if (open) {
this.drawerState = "opening";
focusLock.on(drawer);
} else {
focusLock.off(drawer);
this.drawerState = "closing";
}
}
Comment on lines +90 to +96
const drawer = this.rootElement.shadowRoot.querySelector(
".drawer--container",
) as HTMLElement;
if (open) {
this.drawerState = "opening";
focusLock.on(drawer);
} else {
Comment on lines 55 to 59
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"iconoir": "^7.11.0",
"dom-focus-lock": "^1.1.0",
"@tabler/icons": "^3.36.1"
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.

3 participants