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

Hide tooltip after clicking on a chart to display more info (cosmetic change) #18103

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

k3a
Copy link
Contributor

@k3a k3a commented Oct 2, 2023

Breaking change

Proposed change

Follow up to #18036.

Desktop browsers fire mouseout when a new DOM element appears between a chart and the mouse pointer but mobile browsers never send it, they would only send touchend or touchcancel. But chartjs uses touchend to emulate mouseup only.

Not having mouseout on mobile causes tooltip to stay visible after opening More Info dialog. Not a big deal as it can be hidden by clicking on the tooltip or elsewhere but it would be nicer if it hid automatically.

photo_2023-10-02_23-13-40

This PR additionally sends mouseout event to the chart's canvas to force tooltip to hide.
While this is a workaround, it should be harmless.

Other possible way to fix this would be creating PR to chart.js to somehow make touchend to also automatically call mouseout. I am not sure if that would be a better option as I am worried that some people may want to keep tooltip visible on mouseup for some specific use-cases. Here in these three cases we are sure we want tooltips to hide so maybe it is more sensible to simply add this workaround.

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:

@k3a k3a force-pushed the hide-tooltip-after-click branch 2 times, most recently from 4aadded to dbc7adf Compare October 2, 2023 23:59
@k3a k3a force-pushed the hide-tooltip-after-click branch from dbc7adf to bed2625 Compare October 3, 2023 00:16
@bramkragten bramkragten merged commit c106a0a into home-assistant:dev Oct 5, 2023
8 checks passed
piitaya added a commit that referenced this pull request Oct 5, 2023
* Update dependency @material/web to v1.0.0 (#18070)

* Update dependency @material/web to v1.0.0

* Fix icon button size

* Remove unused ios override

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Paul Bottein <[email protected]>

* Update dependency magic-string to v0.30.4 (#18089)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump postcss from 8.4.30 to 8.4.31 (#18110)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.30 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.30...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update CodeMirror (#18096)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update vaadinWebComponents monorepo to v24.1.10 (#18092)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Make the "icon next/prev" series load faster (#18087)

* Preserve ancillary fields in a repeat action when modifying the form (#18068)

* Do not clear alias when editing automation action, condition or trigger (#18114)

* Use restart dialog confirmation for quick command (#18113)

* Add translations for restore backup dialogs (#18112)

Co-authored-by: c0ffeeca7 <[email protected]>

* Hide tooltip after clicking on a chart to display more info (cosmetic change) (#18103)

* fix setting wake word to first option everytime (#18121)

* Fix class field for ha-icon-next/prev (#18118)

* Set border-radius to 0 for img in thread panel (#18124)

* Load Intl locale data in parallel (#18120)

* Load Intl locale data in parallel

* Switch to check result.ok

* Update dependency @codemirror/view to v6.21.1 (#18125)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bumped version to 20231005.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kendell R <[email protected]>
Co-authored-by: karwosts <[email protected]>
Co-authored-by: c0ffeeca7 <[email protected]>
Co-authored-by: K3A <[email protected]>
Co-authored-by: Bram Kragten <[email protected]>
Co-authored-by: Steve Repsher <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 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.

2 participants