Skip to content

rollback change, and truncate tooltip - #3300

Merged
igorDykhta merged 3 commits into
keplergl:masterfrom
bdjulbic:fix/truncate-tooltip-value-pr
Feb 6, 2026
Merged

rollback change, and truncate tooltip#3300
igorDykhta merged 3 commits into
keplergl:masterfrom
bdjulbic:fix/truncate-tooltip-value-pr

Conversation

@bdjulbic

@bdjulbic bdjulbic commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Rollback of #3298
The previous fix for hiding geometry fields in tooltips wasn't covering all use cases.

Problem: Geometry fields loaded as strings via CSV (displayed as vector tilesets) show excessively long WKT values in map tooltips.
image

Solution: Apply truncation to tooltip values exceeding 60 characters, shortening them to 30 characters with ellipsis. This handles all long string values uniformly without needing to detect specific field types.
Screenshot 2026-02-06 at 14 52 58

Copilot AI review requested due to automatic review settings February 6, 2026 14:02
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic force-pushed the fix/truncate-tooltip-value-pr branch from 1a8f8bd to 81a1520 Compare February 6, 2026 14:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request rolls back the WKT (Well-Known Text) heuristic detection feature and adds tooltip value truncation to improve UI readability.

Changes:

  • Removed isWkt function and related test cases that performed heuristic WKT geometry detection
  • Added truncation for long tooltip values (>60 chars truncated to 30 chars) using lodash/truncate

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/node/utils/dataset-utils-test.js Removed isWkt test cases and updated import statement
src/common-utils/src/data-type.ts Removed isWkt function and WKT detection logic from field type analysis
src/components/src/map/layer-hover-info.tsx Added tooltip truncation with configurable thresholds for better UX

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const H3_ANALYZER_TYPE = 'H3';

// Returns true if the value is likely a WKT geometry string (heuristic check).
const WKT_PREFIX_RE =

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rollbacking this change from previous PR
it wasn't covering all usecases

instead option for truncating very long tooltip

t.end();
});

test('datasetUtils.isWkt', t => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rollbacking this change from previous PR
it wasn't covering all usecases

instead option for truncating very long tooltip

Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic force-pushed the fix/truncate-tooltip-value-pr branch from 6919cdc to 0d3a797 Compare February 6, 2026 14:31
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic force-pushed the fix/truncate-tooltip-value-pr branch from 196c444 to 368e356 Compare February 6, 2026 14:32
@igorDykhta
igorDykhta merged commit e5b7df1 into keplergl:master Feb 6, 2026
7 checks passed
@bdjulbic
bdjulbic deleted the fix/truncate-tooltip-value-pr branch March 17, 2026 08:05
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.

3 participants