Skip to content

Use Sortable to move entities in entities editor#6810

Merged
bramkragten merged 9 commits intodevfrom
entity-sortable
Sep 7, 2020
Merged

Use Sortable to move entities in entities editor#6810
bramkragten merged 9 commits intodevfrom
entity-sortable

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

@zsarnett zsarnett commented Sep 7, 2020

Proposed change

a91c25083e43554295a349d7feaf4311

Type of change

  • New feature (thank you!)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • 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:

@zsarnett
Copy link
Copy Markdown
Contributor Author

zsarnett commented Sep 7, 2020

Todo: Test on Mobile

Tested

}

return html`
${sortStyles}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Put this in styles()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ITs a template result

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So change it to CSSResult :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should rename it anyway when we are going to use it on multiple places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you know how to dynamically return styles in static get styles() ? So that we only append if this.editMode in HaSidebar?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use

<style>
dragStyles.cssText
</style>

@bramkragten bramkragten merged commit bb24624 into dev Sep 7, 2020
@bramkragten bramkragten deleted the entity-sortable branch September 7, 2020 11:47
@bramkragten bramkragten mentioned this pull request Sep 7, 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.

3 participants