Skip to content

feat(drag-drop): add API to get/set current position of a standalone draggable #14696

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

Merged

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 2, 2019

Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return.

Fixes #14420.
Fixes #14674.

@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Jan 2, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 2, 2019
@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch 2 times, most recently from 3fb0b3c to 8f88ce2 Compare January 2, 2019 12:27
@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch 2 times, most recently from 32610e9 to 6402dbe Compare January 12, 2019 15:18
@crisbeto
Copy link
Member Author

The feedback has been addressed @jelbourn.

@ngbot
Copy link

ngbot bot commented Jan 15, 2019

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@fabianberrutti
Copy link

Hi @jelbourn @crisbeto
When could it be working?

@draggie
Copy link

draggie commented Feb 6, 2019

Really waiting to get this feature!

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch 2 times, most recently from 82a0cf8 to 13025ad Compare February 10, 2019 21:58
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Feb 11, 2019
@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch from 13025ad to c03077f Compare February 20, 2019 07:05
@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch from c03077f to 4faa61b Compare February 24, 2019 16:45
@bogusweb
Copy link

bogusweb commented Mar 5, 2019

any update?

@patters-code
Copy link

Hi, I have been watching for this change to be released since January, I know this is targeting a minor release rather than a patch release but I cannot find any indication or timetable for when the next minor release might be.

Is there a public facing plan or schedule somewhere or some indication of what needs to be completed before the next minor release (or release that this will be included in)?

@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch from 2016c25 to 82a2cbf Compare March 23, 2019 15:23
@pradt
Copy link

pradt commented Mar 25, 2019

I'm really grateful for this feature, I've run into this problem and looking forward to seeing this solution. Is there any update as to when this will be available ?

@jelbourn jelbourn added the P2 The issue is important to a large percentage of users, with a workaround label Mar 25, 2019
@molayodecker
Copy link

A branch-manger issue is blocking merging @jelbourn @devversion. Can this be fixed so that this PR can be merged

@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label Apr 1, 2019
…draggable

Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return.

Fixes angular#14420.
Fixes angular#14674.
@crisbeto crisbeto force-pushed the 14674/drag-drop-standalone-position branch from 82a2cbf to 959c79b Compare April 1, 2019 19:13
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Apr 1, 2019
@ngbot
Copy link

ngbot bot commented Apr 1, 2019

I see that you just added the pr: merge ready label, but the following checks are still failing:
    failure status "branch-manager" is failing
    pending status "ci/circleci: api_golden_checks" is pending
    pending status "ci/circleci: bazel_build_test" is pending
    pending status "ci/circleci: build_release_packages" is pending
    pending status "ci/circleci: e2e_tests" is pending
    pending status "ci/circleci: lint" is pending
    pending status "ci/circleci: prerender_build" is pending
    pending status "ci/circleci: tests_browserstack" is pending
    pending status "ci/circleci: tests_local_browsers" is pending
    pending status "ci/circleci: tests_saucelabs" is pending

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@mmalerba mmalerba merged commit 2f009d0 into angular:master Apr 3, 2019
@Jigar3195
Copy link

When guys you plan to release get/set position fixes, we are waiting for it.

@MDzyga
Copy link

MDzyga commented Apr 8, 2019

@crisbeto @jelbourn
I saw that you add method getFreeDragPosition and it's working but set new position doesn't work (nothing happened).

@crisbeto
Copy link
Member Author

crisbeto commented Apr 8, 2019

@MDzyga can you post an example of what you're doing? Also it would be better to open an issue.

@MDzyga
Copy link

MDzyga commented Apr 9, 2019

@crisbeto I opened issue with some details #15765

@matze1234
Copy link

matze1234 commented Apr 26, 2019

@MDzyga ist right, setting the position doesn't work. I've tried setting the freeDragPosition object and called change detection afterwards, but nothing happens :(

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to render the top and left position of the div with cdkdrag drag-drop: make CdkDragEnd private property _activeTransform.x & y public