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

Simplify data table template #17825

Merged
merged 2 commits into from
Sep 20, 2023
Merged

Simplify data table template #17825

merged 2 commits into from
Sep 20, 2023

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Sep 5, 2023

Proposed change

Only the full object instead of the property and the full object.
The value can be easily retrieve with entry[property]. This would simplify the data table usage and make the typing easier.

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:

@piitaya piitaya force-pushed the simplify_data_table_template branch 3 times, most recently from de2b0ad to 760e509 Compare September 5, 2023 13:27
@piitaya piitaya marked this pull request as draft September 5, 2023 13:27
@github-actions github-actions bot added Supervisor Related to the supervisor panel Design Related to Home Assistant design gallery labels Sep 5, 2023
@piitaya piitaya marked this pull request as ready for review September 6, 2023 13:19
@piitaya piitaya force-pushed the simplify_data_table_template branch from 31aed6e to b9ab4c9 Compare September 20, 2023 06:46
@piitaya piitaya merged commit 3349031 into dev Sep 20, 2023
@piitaya piitaya deleted the simplify_data_table_template branch September 20, 2023 10:09
@@ -68,7 +68,7 @@ export class HaConfigUsers extends LitElement {
width: "20%",
direction: "asc",
hidden: narrow,
template: (username) => html`${username || "—"}`,
template: (user) => html`${user.name || "—"}`,

Choose a reason for hiding this comment

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

This should be user.username, as now the Users table lists the Name twice, and the Username never.

Choose a reason for hiding this comment

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

Adding @piitaya - not sure if you'll get notified otherwise.

Choose a reason for hiding this comment

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

I'm not sure if this is being tracked anywhere. Do you want me to raise an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed #18187

@piitaya piitaya mentioned this pull request Oct 10, 2023
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed Design Related to Home Assistant design gallery Supervisor Related to the supervisor panel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants