-
Notifications
You must be signed in to change notification settings - Fork 53
Feature: uui-drag-handle
component
#1118
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
base: main
Are you sure you want to change the base?
Conversation
Hi there @bjarnef, thank you for this contribution! 👍 While we wait for the team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
There was a problem hiding this 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 drag-handle component package, its icon, and exposes it in the main library and icon registry.
- Introduces
@umbraco-ui/uui-drag-handle
with component, tests, story, and docs - Adds
iconDrag
SVG and registers it under the key"drag"
- Exposes the drag-handle package in the root
uui/lib/index.ts
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/uui/lib/index.ts | Expose uui-drag-handle in main library exports |
packages/uui-icon-registry-essential/lib/svgs/index.ts | Export new iconDrag |
packages/uui-icon-registry-essential/lib/svgs/iconDrag.ts | Add SVG definition for drag icon |
packages/uui-icon-registry-essential/lib/UUIIconRegistryEssential.ts | Register "drag" icon in the registry |
packages/uui-drag-handle/tsconfig.json | Configure TS build for new package |
packages/uui-drag-handle/rollup.config.js | Set up Rollup for package bundling |
packages/uui-drag-handle/package.json | Define package metadata and entry points |
packages/uui-drag-handle/lib/uui-drag-handle.element.ts | Implement <uui-drag-handle> component |
packages/uui-drag-handle/lib/index.ts | Export component element |
packages/uui-drag-handle/lib/uui-drag-handle.test.ts | Add basic instance and a11y tests |
packages/uui-drag-handle/lib/uui-drag-handle.story.ts | Add Storybook story for the component |
packages/uui-drag-handle/README.md | Document installation and basic usage |
Comments suppressed due to low confidence (2)
packages/uui-drag-handle/README.md:27
- The README doesn’t mention the
label
attribute provided by the component for an aria-label. Consider adding usage examples showing how to setlabel
for accessibility.
`<uui-drag-handle></uui-drag-handle>`
packages/uui-drag-handle/lib/uui-drag-handle.test.ts:1
- Add a test to verify that passing a
label
value sets the correctaria-label
on the rendered<uui-icon>
.
import { html, fixture, expect } from '@open-wc/testing';
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Description
Added a drag handle similar to examples mentioned here: umbraco/Umbraco-CMS#18519 (comment)
e.g. https://f36.contentful.com/components/drag-handle
We can possible also allow overriding from default icon and perhaps re-use
drag
event from UI library?It simplify the changes @madsrasmussen implemented in umbraco/Umbraco-CMS#18519 , handle accessibility and it we later adjust/change the handle icon, developers don't need to worry about this.
Types of changes
Motivation and context
How to test?
Screenshots (if appropriate)
Checklist