angular / angular/components

feat(cdk/drag-drop): X and Y as percentage values instead of px

Open
#28,607 7 comments 0 reactions 0 assignees View on GitHub
feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Feature Description

We are developing a mobile app in which users should be able to move elements back and forth in a certain area. The position of the elements should obviously be identical for every user. However, this does not work since each user has a different smartphone and therefore a different screen width, as cdk/drag-drop works with px values. One should be able to switch from px to % in order to ensure the correct position regardless of the screen resolution (or the width of the boundary element).

Contributor guide

Open the contributing guide

Research direction

Start by locating the cdk/drag-drop implementation that stores and applies X and Y positions, then inspect its existing pixel-based behavior and tests. Define how percentage values should be accepted and converted relative to the boundary element; done means positions remain consistent across different boundary widths and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.