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

Use Sortable to move entities in entities editor #6810

Merged
merged 9 commits into from
Sep 7, 2020
Merged

Conversation

zsarnett
Copy link
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
Contributor Author

zsarnett commented Sep 7, 2020

Todo: Test on Mobile

Tested

protected render(): TemplateResult {
if (!this.entities) {
return html``;
}

return html`
${sortStyles}
Copy link
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
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
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
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
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
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.

None yet

3 participants