Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ add sd-drawer #314

Closed
25 of 33 tasks
Tracked by #241
mariohamann opened this issue Aug 1, 2023 · 3 comments · Fixed by #344
Closed
25 of 33 tasks
Tracked by #241

feat: ✨ add sd-drawer #314

mariohamann opened this issue Aug 1, 2023 · 3 comments · Fixed by #344
Assignees
Labels
CL-migration All components which need to be migrated from Component Library

Comments

@mariohamann
Copy link
Contributor

mariohamann commented Aug 1, 2023

Description

Drawers slide in from a container to expose additional options and information.

https://shoelace.style/components/drawer

API

Coming from https://github.com/solid-design-system/figma/issues/54#issue-1811521181
https://www.figma.com/file/HHBbD5kdSWjiD8H1lA8jHf/Drawer?type=design&node-id=0-1&mode=design&t=0SAKc9ip7D2bSSNT-11

Overview

Image

Props

Image

Image

Slots

Image

Image

Image

Hand-off

https://www.figma.com/file/yN3BI0cWA3AlcrKWEpBIP5/Drawer?type=design&node-id=1103-913&mode=design&t=Ck5DjbhRklpiyyuc-11

image

Components detailed requirements

  • Proceed with this branch: https://github.com/solid-design-system/solid/tree/feat/sd-drawer
  • Props
    • open
    • label (behavior tbd see "open questions")
    • placement (left, right)
    • contained prop (only for testing purposes)
  • CSS-Properties
    • --width (width of the drawer and NOT the overlay)
    • remove all shoelace properties
  • Slots
    • default (no name)
    • header
    • footer
  • Stories
  • Parts
    • same as Shoelace but change header-actions to e. g. header-content
  • Migration guide
// ui-offcanvas-panel
  @Prop({ reflect: true, mutable: true }) open: boolean;

  @Prop({ reflect: true }) darken: boolean; // this won't be provided any more 

  @Prop() position: 'left' | 'right' = 'left';

  @Prop() activeBelow: number; // → placement

  @Prop() closeOutside: boolean; // this won't be provided 

  @Event() offcanvasTrigger: EventEmitter<{id: string}>; // this won't be provided any more 
// ui-offcanvas-trigger
// -> not needed anymore, just trigger with methods

// ui-offcanvas-provider
// → not needed anymore

Technical Information

open questions

  • what about the label? is it required? only for screen readers?
  • what with the initial focus? shouldnt it be inside the drawer? @coraliefeil can you ask your A11y contact about the expected behavior?

DoR

  • Item has business value
  • Item has been estimated by the team
  • Item is clear and well-defined
  • Item dependencies have been identified

DoD

  • Documentation has been created/updated (if applicable)
  • Migration Guide has been created/updated (if applicable)
  • Relevant E2E tests (Features, A11y, Bug fixes) are created/updated
  • Relevant stories (Features, A11y) are created/updated
  • Implementation works successfully on feature branch
@coraliefeil
Copy link
Contributor

@azraefendic
It is advisable to jump directly to the first element (This is expected behaviour usability-wise.). You just have to weigh it against the effort. But it is not a barrier as long as you can focus into the drawer.

@van-nguyen-ht
Copy link
Contributor

van-nguyen-ht commented Aug 14, 2023

@azraefendic @mariohamann
Hi guys, I've updated the documentation per discussed. To achieve negative margin for the button, the left padding is left empty while an extra padding can be turn on/off depending on either a button is used in the Header slot or not.

Image

Here's the current build

@coraliefeil
Copy link
Contributor

Got this answer from my dev colleague:

Depends on label and function. Basically, it is never wrong to provide information. In case of doubt, this has to be done via ARIA, but usually the label is somehow missing in the "normal" UX.

@karlbaumhauer @mariohamann FYI

@mariohamann mariohamann linked a pull request Aug 29, 2023 that will close this issue
5 tasks
azraefendic added a commit that referenced this issue Aug 31, 2023
## Description
Add new component sd-drawer

Related to #314 

## DoD
- [x] Documentation has been created/updated (if applicable)
- [x]  Migration Guide has been created/updated (if applicable)
- [x] Relevant E2E tests (Features, A11y, Bug fixes) are created/updated
- [x]  Relevant stories (Features, A11y) are created/updated
- [x]  Implementation works successfully on feature branch
karlbaumhauer pushed a commit that referenced this issue Aug 31, 2023
# [@solid-design-system/components-v1.9.0](components/1.8.0...components/1.9.0) (2023-08-31)

### Features

* ✨ add sd-drawer ([#344](#344)) ([cf6b09a](cf6b09a)), closes [#314](#314)
@yoezlem yoezlem added the CL-migration All components which need to be migrated from Component Library label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-migration All components which need to be migrated from Component Library
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants