Skip to content

fix: name new point layer using label if provided (follow-up) - #3297

Merged
lixun910 merged 6 commits into
masterfrom
xli-improve-point-layer-default-name
Feb 5, 2026
Merged

fix: name new point layer using label if provided (follow-up)#3297
lixun910 merged 6 commits into
masterfrom
xli-improve-point-layer-default-name

Conversation

@lixun910

@lixun910 lixun910 commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

This is a follow-up PR for fix: name new point layer using label if provided #3296

The pair.defaultName will be default to 'point' for cases like arc layer, and this will makes the change in previous PR not working:

    label:
        pair.defaultName ||
        (typeof label === 'string' && label.replace(/\.[^/.]+$/, '')) ||
        'Point'

here is the update change in this pr:

label:
          pair.defaultName && pair.defaultName !== 'point'
            ? pair.defaultName
            : (typeof label === 'string' && label.replace(/\.[^/.]+$/, '')) || 'Point'
      };

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 PR is a follow-up to PR #3296 that addresses an issue where point layers created from lat/lng field pairs were defaulting to the name "point" instead of using the dataset label. The change removes the hardcoded fallback to 'point' in the findPointFieldPairs function, allowing the label fallback chain in point-layer to work correctly.

Changes:

  • Removed the || 'point' fallback when setting defaultName in findPointFieldPairs, allowing empty string values to fall through to the label fallback logic

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

Comment thread src/table/src/kepler-table.ts Outdated

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


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

Comment thread src/layers/src/point-layer/point-layer.ts Outdated

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

Comment thread src/layers/src/point-layer/point-layer.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lixun910
lixun910 merged commit e705fc8 into master Feb 5, 2026
8 checks passed
@lixun910
lixun910 deleted the xli-improve-point-layer-default-name branch February 5, 2026 20:54
bdjulbic pushed a commit to bdjulbic/kepler.gl that referenced this pull request Feb 6, 2026
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