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

feat: add new Custom Tooltip plugin #650

Merged
merged 14 commits into from
Oct 21, 2021
Merged

feat: add new Custom Tooltip plugin #650

merged 14 commits into from
Oct 21, 2021

Conversation

ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Oct 13, 2021

  • display custom tooltip via a custom formatter, subscribes to onMouseEnter and onMouseLeave to create a Custom Tooltip
  • also add 2x new events to work with header-row as well onHeaderRowMouseEnter and onHeaderRowMouseLeave

TODOs

  • working basic POC
  • add optional async tooltip (with Promise)
  • tooltip auto-positioning (top, bottom, left-align, right-align)
  • optionally read cell title (in a regular cell formatter) without even the need to create a customTooltip every time
  • add custom tooltip for Column Header as well
  • add custom tooltip for Header-Row (filters) as well
    • requires to add 2x new events onHeaderRowMouseEnter and onHeaderRowMouseLeave
  • merge and reuse code from Slick.AutoTooltip to remove the need for that plugin
  • add Cypress E2E tests
  • add css ref to create tooltip w/arrow article

NgcJIGthF9

- regular tooltip should also work without a defining any formatter, for example it should work with AutoTooltip
- also add `tooltipTextMaxLength` option that will truncate text when text is too long
- add option to delay showing/opening the custom tooltip
- add 2x new slick event: `onHeaderRowMouseEnter` and `onHeaderRowMouseLeave`
@ghiscoding ghiscoding changed the title WIP - feat: add new Custom Tooltip plugin feat: add new Custom Tooltip plugin Oct 21, 2021
@ghiscoding
Copy link
Collaborator Author

@6pac
Hey I'm finally done with this PR, isn't that a beauty lol, it covers all my use cases and also make AutoTooltip redundant.
Note that it requires to add 2x new events onHeaderRowMouseEnter and onHeaderRowMouseLeave added to SlickGrid.
Feel free to merge but wait a bit more to release a new version, I still got other small PRs to do

cheers

@6pac 6pac merged commit 07cad59 into master Oct 21, 2021
@ghiscoding ghiscoding deleted the feat/custom-tooltip branch October 21, 2021 01:22
@ghiscoding
Copy link
Collaborator Author

ghiscoding commented Oct 25, 2021

@6pac hey thanks for the release, I tested it and it's all good on my side except for 1 small demo issue, I made a small casing typo in the filename. I didn't see it on my side because Ms Windows doesn't care about filename casing. I just fixed it with this commit and I'm now wondering, do you have a script or something that you run to refresh all the Examples after a release? Would it be possible to refresh just the Examples without a new release? If not, then let's wait for the next release.

Thanks for everything mate

plugins/slick.customTooltip.css → plugins/slick.customtooltip.css (the T for Tooltip should be lowercase)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants