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 ResizeObserver to EntityRow #9837

Merged

Conversation

andrist
Copy link
Contributor

@andrist andrist commented Aug 18, 2021

Proposed change

Add observer to entity-rows so elements hidden due to space constraints
do not stay hidden when the window is resized (enlarged).

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

Additional information

Checklist

  • The code change is tested and works locally.
  • [X ] There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

@andrist
Copy link
Contributor Author

andrist commented Aug 18, 2021

@bramkragten, @emufan please point me at instructions for testing this locally.

@andrist andrist changed the title Andrist/missing numbers observer Change minimum width to show numbers next to slider to 300px Aug 20, 2021
@andrist andrist changed the title Change minimum width to show numbers next to slider to 300px Add ResizeObserver to EntityRow Aug 20, 2021
@spacegaier
Copy link
Member

spacegaier commented Sep 6, 2021

Has this any relation to this merged PR #8310?

EDIT: Only partially. The PR I mentioned sets new width values, but this one here will add an observer to react to updates.

@spacegaier
Copy link
Member

@bramkragten, @emufan please point me at instructions for testing this locally.

What exactly do you mean? Didn't you do these changes in your local dev HA instance?

@spacegaier
Copy link
Member

This resolves the conditional row issue for me now. Do we need the same for hui-number-entity-row.ts as well? There we also have a similar clientWidth check currently.

@bramkragten
Copy link
Member

This resolves the conditional row issue for me now. Do we need the same for hui-number-entity-row.ts as well? There we also have a similar clientWidth check currently.

Yes, that is a direct copy of this element...

@bramkragten bramkragten merged commit b3dedae into home-assistant:dev Sep 6, 2021
@andrist
Copy link
Contributor Author

andrist commented Sep 6, 2021

@bramkragten, @emufan please point me at instructions for testing this locally.

What exactly do you mean? Didn't you do these changes in your local dev HA instance?

No, not yet. I'll look for instructions on setting up a local dev instance then (don't have one yet).

@andrist
Copy link
Contributor Author

andrist commented Sep 6, 2021

Has this any relation to this merged PR #8310?

(Context: Currently if the page is opened with a small window, there is no way to get the numbers shown by resizing, without a reload).

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2021
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.

input_number: missing/disappearing current values and units of measurement
4 participants