Skip to content

Add the Feature of Reordering Shopping List by Moving Up or Down an Item#7281

Closed
ShaneQi wants to merge 1 commit intohome-assistant:devfrom
ShaneQi:feature/shopping-list-move-up-down
Closed

Add the Feature of Reordering Shopping List by Moving Up or Down an Item#7281
ShaneQi wants to merge 1 commit intohome-assistant:devfrom
ShaneQi:feature/shopping-list-move-up-down

Conversation

@ShaneQi
Copy link
Copy Markdown
Contributor

@ShaneQi ShaneQi commented Oct 9, 2020

Proposed change

Adding the feature of recording shopping list (in shopping list card) by adding reorder button, move up button and move down button.

The Core Counterpart PR: home-assistant/core#41565

Kapture 2020-10-09 at 12 04 17

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

N/A

Additional information

  • This PR fixes or closes issue: N/A
  • This PR is related to issue: N/A
  • Link to documentation pull request: N/A

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:

@ShaneQi ShaneQi changed the title Reorder Shopping List by Moving Up or Down an Item Add the Feature of Reordering Shopping List by Moving Up or Down an Item Oct 9, 2020
@ShaneQi ShaneQi marked this pull request as ready for review October 9, 2020 17:09
@zsarnett
Copy link
Copy Markdown
Contributor

zsarnett commented Oct 9, 2020

Would you be comfortable using the Sortable Library to enable Drag and drop? Because I think that would be the better way to do this.

Examples are the Sidebar and the Entity picker for Card editors

@vigonotion
Copy link
Copy Markdown

I would also suggest to use drag and drop, here is the link to a gif of the card editor in action: https://www.home-assistant.io/blog/2020/09/17/release-115/#order-entities-in-lovelace-ui-editor

@ShaneQi
Copy link
Copy Markdown
Contributor Author

ShaneQi commented Oct 9, 2020

Would you be comfortable using the Sortable Library to enable Drag and drop? Because I think that would be the better way to do this.

Examples are the Sidebar and the Entity picker for Card editors

@vigonotion @zsarnett

I definitely can look into that.

I thought about drag and drop because that is absolutely way better user experience. But I wasn't confident about pulling it off. (because of some nightmare projects I had in college, long story)

But now you pointed out the examples in HA codebase, I'd be happy to look into it.

@ShaneQi
Copy link
Copy Markdown
Contributor Author

ShaneQi commented Oct 9, 2020

@vigonotion @zsarnett

So I took a look at the sidebar drag & drop implementation, and did a prototype with shopping list.

It's actually not as complicated as I thought with help of the lib Sortable.

So I'm going to close this PR and go for drag & drop, stay tuned!

Kapture 2020-10-09 at 16 39 06

@ShaneQi ShaneQi closed this Oct 9, 2020
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants