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

Add drag and drop to area dashboard #20289

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

bramkragten
Copy link
Member

Proposed change

Allows areas to be dragged from 1 floor to another.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten bramkragten added this to the 2024.4 milestone Mar 30, 2024
@frenck
Copy link
Member

frenck commented Mar 30, 2024

Tested it. If I unassign an area (by dragging it back into the unassigned group), it disappears from the list.

The floor ID gets messed up:

CleanShot 2024-03-30 at 19 54 17@2x

@piitaya
Copy link
Member

piitaya commented Mar 30, 2024

We should disable drag and drop on mobile because that would make the page unscrollable.

@bramkragten
Copy link
Member Author

Or should we add a delay?

@frenck
Copy link
Member

frenck commented Apr 2, 2024

Seems to work well now, just noticed the difference in size of assigned vs unassigned cards:

image

@bramkragten
Copy link
Member Author

Fixed

@piitaya
Copy link
Member

piitaya commented Apr 2, 2024

As we can scroll when dragging in mobile, I think it makes more sense to remove the DnD feature on mobile. WDYT?
We can add a nested md-menu to assign floor using an overflow menu per area card on mobile.

@bramkragten
Copy link
Member Author

As we can scroll when dragging in mobile, I think it makes more sense to remove the DnD feature on mobile. WDYT? We can add a nested md-menu to assign floor using an overflow menu per area card on mobile.

I like that is now targeted pure based on if the event was touch, and not just on the screensize...

@bramkragten bramkragten merged commit 2e58d66 into dev Apr 2, 2024
13 checks passed
@bramkragten bramkragten deleted the add-drag-and-drop-to-area-dashboard branch April 2, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants