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 description and due support to todo lists #19107

Merged
merged 6 commits into from
Dec 21, 2023
Merged

Add description and due support to todo lists #19107

merged 6 commits into from
Dec 21, 2023

Conversation

bramkragten
Copy link
Member

Proposed change

CleanShot 2023-12-21 at 12 46 29

CleanShot 2023-12-21 at 12 46 46

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:

Copy link
Member

@piitaya piitaya left a comment

Choose a reason for hiding this comment

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

We should check for supported features in the dialog to only show field if the entity support it. Maybe, we should pass the full supported feature instead of canUpdate and canDelete

Comment on lines +95 to +96
scrimClickAction
escapeKeyAction
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
scrimClickAction
escapeKeyAction

Do you think we can allow escape to easily close the popup if the user misclick the checkbox and it opens the dialog?

Copy link
Member Author

Choose a reason for hiding this comment

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

The rule is to not allow it on dialogs with input forms 🤷

Comment on lines 232 to 255
<span>
${this.hass!.localize(
"ui.panel.lovelace.cards.todo-list.unchecked_items"
)}
</span>
${this.todoListSupportsFeature(TodoListEntityFeature.MOVE_TODO_ITEM)
? html`
? html`<ha-button-menu>
<ha-icon-button
class="reorderButton"
.path=${mdiSort}
.title=${this.hass!.localize(
slot="trigger"
.path=${mdiDotsVertical}
></ha-icon-button>
<ha-list-item @click=${this._toggleReorder} graphic="icon">
${this.hass!.localize(
"ui.panel.lovelace.cards.todo-list.reorder_items"
)}
@click=${this._toggleReorder}
.disabled=${unavailable}
>
</ha-icon-button>
`
<ha-svg-icon
slot="graphic"
.path=${mdiSort}
.disabled=${unavailable}
>
</ha-svg-icon>
</ha-list-item>
</ha-button-menu>`
: nothing}
Copy link
Member

@piitaya piitaya Dec 21, 2023

Choose a reason for hiding this comment

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

Should we hide unchecked header if there is no unchecked items?

CleanShot 2023-12-21 at 16 21 43

Copy link
Member Author

@bramkragten bramkragten Dec 21, 2023

Choose a reason for hiding this comment

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

not sure we should hide or just show a message underneath that There are no items to do!

@bramkragten bramkragten merged commit 09dcc29 into dev Dec 21, 2023
13 checks passed
@bramkragten bramkragten deleted the todo-list branch December 21, 2023 20:30
@allenporter
Copy link
Contributor

FYI I've got a pending PR to change the API to support clearing fields home-assistant/core#106208

@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2024
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