Skip to content

Conversation

@evgenoid
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Labels visibility depends on xoom independently of type

Issue Number: #2

What is the new behavior?

Display label always for next types: all, nodes, edges

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@netlify
Copy link

netlify bot commented Jul 22, 2025

Deploy Preview for reagraph ready!

Name Link
🔨 Latest commit 324e070
🔍 Latest deploy log https://app.netlify.com/projects/reagraph/deploys/687f60efefc5530008a8d9b3
😎 Deploy Preview https://deploy-preview-344--reagraph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Copilot AI left a comment

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 fixes a bug where labels for certain types ('all', 'nodes', 'edges') were incorrectly hidden when the camera was positioned far from the nodes, even though these label types should always be visible regardless of zoom level.

  • Refactored label visibility logic to check for always-visible types before applying camera distance constraints
  • Added comprehensive test coverage for all label visibility scenarios
  • Removed unused nodeCount parameter from the function signature

Reviewed Changes

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

File Description
src/utils/visibility.ts Refactored logic to ensure 'all', 'nodes', and 'edges' label types are always visible regardless of camera distance
src/utils/visibility.test.ts Added comprehensive test suite covering all label visibility scenarios and edge cases

@reaviz reaviz deleted a comment from Copilot AI Jul 22, 2025
@amcdnl amcdnl merged commit 7042dde into master Jul 22, 2025
5 checks passed
@amcdnl amcdnl deleted the bugfix/label-visibility branch July 22, 2025 11:48
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.

4 participants