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

fix(plugins): display correct tooltip (fixes #3342) #30023

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

jonaschn
Copy link
Contributor

@jonaschn jonaschn commented Aug 27, 2024

SUMMARY

Fixes #3342
Display the correct tooltip information for chord charts (source and target values were switched)

BEFORE

image

AFTER

image

TESTING INSTRUCTIONS

Example SQL Dataset:

SELECT 'Alice' AS source, 'Bob' AS target, 5 AS interactions UNION ALL
SELECT 'Alice', 'Charlie', 3 UNION ALL
SELECT 'Bob', 'Charlie', 2 UNION ALL
SELECT 'Charlie', 'David', 1  UNION ALL
SELECT 'Bob', 'David', 4

ADDITIONAL INFORMATION

  • Has associated issue: Chord popups contain wrong information #3342
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@jonaschn jonaschn changed the title fix(chords): display correct tooltip (fixes #3342) fix(plugins): display correct tooltip (fixes #3342) Aug 27, 2024
@jonaschn jonaschn marked this pull request as ready for review August 27, 2024 12:52
@dosubot dosubot bot added viz:charts:chord Related to the Chord chart viz:charts:tooltip Related to tooltips in charts labels Aug 27, 2024
@jonaschn jonaschn marked this pull request as draft August 27, 2024 13:23
@jonaschn jonaschn marked this pull request as ready for review August 27, 2024 14:08
@@ -130,9 +130,9 @@ function Chord(element, props) {
.text(
d =>
`${nodes[d.source.index]} → ${nodes[d.target.index]}: ${f(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The diff looks a bit misleading.
I simply swapped d.source.value and d.target.value (line 133 and 135)

@rusackas
Copy link
Member

rusackas commented Aug 27, 2024

Agreed that it was wrong and that this fixes the display of the chart, but I'm so confused by the meaning of the diff. I mean, yes - swapping it swaps it, and that works. But now the code (modified by the diff) is
${nodes[d.target.index]} → ${nodes[d.source.index]} which displays the source column then then the target column. How is this now displaying correctly but with the items named incorrectly? 🤯 Are things mapped incorrectly somewhere further upstream in the code?

In other words, the code being changed here looked right before, and now looks wrong. Something must be mapped incorrectly elsewhere? It's like we mistakenly have + voltage on the black wire and - voltage on the red wire... this PR just swaps the wires at the wrong end, if I'm not mistaken. 😅

NEVERMIND. You're right, that is a confusing diff... I see what you did more clearly now.

LGTM :)

@rusackas rusackas merged commit c428108 into apache:master Aug 27, 2024
90 of 93 checks passed
@jonaschn
Copy link
Contributor Author

jonaschn commented Aug 28, 2024

@rusackas Thanks for merging. When do you expect to release this change?
Will it be part of 4.1.0?
I would really appreciate it because our users were constantly confused.

@sadpandajoe sadpandajoe added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 3, 2024
sadpandajoe pushed a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins size/XS v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch viz:charts:chord Related to the Chord chart viz:charts:tooltip Related to tooltips in charts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chord popups contain wrong information
3 participants