[PR #1805] [CLOSED] Modify tooltip positioning and tooltip triangle pointer positioning #2907

Open
opened 2026-01-29 18:21:02 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1805
Author: @OleFosdal
Created: 11/21/2024
Status: Closed

Base: masterHead: master


📝 Commits (6)

  • ba11480 Modify tooltip positioning and tooltip triangle pointer positioning
  • aea6be1 Removed some missplaced code. Was never intention in the first place to be in this if-statement.
  • 4b5db80 Optimization and null-checks for tooltipContent
  • 003daed Fixes Right/Left tooltip triangle position
  • 72f1d44 Fixes triangle-pointer for smartPosition tooltips
  • 2ab2b2e Update "position" if smartPosition for tooltip happens

📊 Changes

3 files changed (+171 additions, -124 deletions)

View changed files

📝 Radzen.Blazor/RadzenTooltip.razor (+1 -6)
📝 Radzen.Blazor/themes/components/blazor/_tooltip.scss (+62 -18)
📝 Radzen.Blazor/wwwroot/Radzen.Blazor.js (+108 -100)

📄 Description

  • Determine tooltip-content css-class solely in javascript method openPopup().
  • Added support for left/right alligned triangle pointer for top/bottom tooltip.
  • Added support for top/bottom alligned triangle pointer for left/right tooltip.
  • Recalculate left position for bottom/top tooltips if they extend right side of screen.
  • Recalculate top position for left/right tooltips if they extend bottom side of screen.

I made this solution before Commit a0f1545 ("Tooltip position updated when forced to change"), so unfortunately i have not implemented that current fix/solution. However i dont see the need for that with this current code.

Have tested DateGrid/Chart popups too and have tried to avoid configuring theese as much as possible.
The "reset" logic of removing all css-classes before adding new might be able to be done more cleanly.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1805 **Author:** [@OleFosdal](https://github.com/OleFosdal) **Created:** 11/21/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`ba11480`](https://github.com/radzenhq/radzen-blazor/commit/ba11480cd2b545a8a98184060892010cb364c167) Modify tooltip positioning and tooltip triangle pointer positioning - [`aea6be1`](https://github.com/radzenhq/radzen-blazor/commit/aea6be1ace35f3892a0d95ef87435c221e6eb2ad) Removed some missplaced code. Was never intention in the first place to be in this if-statement. - [`4b5db80`](https://github.com/radzenhq/radzen-blazor/commit/4b5db809efebfc40aa43d41df0251336ee958d45) Optimization and null-checks for tooltipContent - [`003daed`](https://github.com/radzenhq/radzen-blazor/commit/003daed7f3f681ca4882fd4e926da191bd61d0af) Fixes Right/Left tooltip triangle position - [`72f1d44`](https://github.com/radzenhq/radzen-blazor/commit/72f1d442bca5a19945257f7e8d40cd14126db045) Fixes triangle-pointer for smartPosition tooltips - [`2ab2b2e`](https://github.com/radzenhq/radzen-blazor/commit/2ab2b2e96b2450532b58baeeaf57cdae7b721887) Update "position" if smartPosition for tooltip happens ### 📊 Changes **3 files changed** (+171 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenTooltip.razor` (+1 -6) 📝 `Radzen.Blazor/themes/components/blazor/_tooltip.scss` (+62 -18) 📝 `Radzen.Blazor/wwwroot/Radzen.Blazor.js` (+108 -100) </details> ### 📄 Description - Determine `tooltip-content` css-class solely in javascript method `openPopup()`. - Added support for left/right alligned triangle pointer for top/bottom tooltip. - Added support for top/bottom alligned triangle pointer for left/right tooltip. - Recalculate left position for bottom/top tooltips if they extend right side of screen. - Recalculate top position for left/right tooltips if they extend bottom side of screen. I made this solution before Commit a0f1545 ("Tooltip position updated when forced to change"), so unfortunately i have not implemented that current fix/solution. However i dont see the need for that with this current code. Have tested DateGrid/Chart popups too and have tried to avoid configuring theese as much as possible. The "reset" logic of removing all css-classes before adding new might be able to be done more cleanly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:21:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2907