GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove EdgeHandler dependency on EdgeStyle.EntityRelation for better tree shaking · Issue #978 · maxGraph/maxGraph

Remove EdgeHandler dependency on EdgeStyle.EntityRelation for better tree shaking #978

New issue
Copy link
New issue
Copy link
Closed
Enhancement
#1040
Closed
Remove EdgeHandler dependency on EdgeStyle.EntityRelation for better tree shaking#978
Enhancement
#1040
Copy link
Assignees
redfish4ktc
Milestone
0.24.0

Description

@tbouffard
tbouffard
opened on Dec 17, 2025
Issue body actions

Is your feature request related to a problem? Please describe.

EdgeStyle.EntityRelation is currently a direct dependency inside EdgeHandler.

This creates a strong coupling in the codebase:

  • It limits tree shaking.
  • Even if EntityRelation is not used, it is still bundled in the final application.
  • This reduces the benefits of previous tree shaking work, especially the improvements introduced in Make Graph.createEdgeHandler and Graph.isOrthogonal configurable and independent from EdgeStyle implementation #767.

As a result, applications pay a bundle size cost for a feature they may not use.

Describe the solution you'd like

Explore a way to remove the direct dependency between EdgeHandler and EdgeStyle.EntityRelation.

One possible solution to explore:

  • Introduce new metadata when registering an edgeStyle.
  • This metadata could be used by EdgeHandler to determine whether it needs to apply the special processing that is currently hardcoded for EntityRelation.
  • This would follow the same approach already used in feat!: improve tree-shaking of EdgeStyle #809.

The goal is to:

  • Decouple EdgeHandler from specific edge style implementations.
  • Improve tree shaking.
  • Avoid bundling EntityRelation when it is not used.

In addition, this will allow for the same treatment of applications that provide an alternative implementation to EntityRelation or other EdgeStyle, if necessary. This will provide greater flexibility and possibilities.

Describe alternatives you've considered

  • Keeping the current direct dependency, but this continues to limit tree shaking.
  • Moving logic elsewhere without metadata, but this risks reintroducing implicit coupling.

Additional context

This request is directly related to bundle size optimization and long term maintainability.
It also aligns with previous efforts to make connectors and edge styles more modular and tree-shaking friendly.

Reacted by coderabbitai

Activity

  1. tbouffard
    added a parent issue on Dec 17, 2025
    • Strategies for Further Tree-Shaking Improvements #665
  2. tbouffard
    added
    enhancementNew feature or request
    triageIssue/PR under review for categorization
    on Dec 17, 2025
  3. coderabbitai commented on Dec 17, 2025

    @coderabbitai
    coderabbitaiBot
    on Dec 17, 2025 – with coderabbitai
    More actions

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples
    • Example 1
    • Example 2
    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    🔗 Similar Issues

    Related Issues

    • Make EdgeHandler registration in SelectionCellsHandler optional and modular #890
    • Refactor Perimeter and EdgeStyle to support tree shaking #759

    🔗 Related PRs

    #724 - docs: improve jsdoc for custom implementation of EdgeStyle [merged]
    #775 - refactor: reorganize builtin style elements [merged]
    #785 - feat!: improve tree-shaking of Perimeter [merged]
    #787 - feat: improve IDE guidance for style element registration [merged]
    #796 - refactor!: remove ARROW, EDGESTYLE, PERIMETER enums [merged]

    👤 Suggested Assignees

    • tbouffard

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  4. tbouffard
    changed the title [-]Reduce EdgeHandler dependency on EdgeStyle.EntityRelation for better tree shaking[/-] [+]Remove EdgeHandler dependency on EdgeStyle.EntityRelation for better tree shaking[/+] on Dec 17, 2025
  5. tbouffard
    added the
    Enhancement
    issue type on Dec 18, 2025
  6. tbouffard
    removed
    enhancementNew feature or request
    triageIssue/PR under review for categorization
    on Dec 18, 2025
  7. redfish4ktc
    self-assigned this
    on Apr 3, 2026
  8. redfish4ktc
    added this to the 0.24.0 milestone on Apr 3, 2026
  9. redfish4ktc
    closed this as completedin #1040on Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @redfish4ktc
    redfish4ktc

Labels

No labels
No labels

Type

Enhancement

Projects

No projects

    Milestone

    • 0.24.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.