Skip to content

Source view: distinguish entity types in IRI hover hints and Ctrl+Click navigation #177

Description

@JohnRDOrazio

Summary

In the source view (Developer mode), all IRIs in subject position are indexed as OWL classes. The hover tooltip always shows "Ctrl+Click to navigate to class" regardless of whether the IRI is a class, property, or individual. Ctrl+Click always navigates to the class tree, which fails for non-class entities.

Current Behavior

  • IRI indexing in lib/editor/indexWorker.ts treats all subject-position IRIs as classes
  • Hover provider in components/editor/TurtleEditor.tsx shows "Ctrl+Click to navigate to class" for all IRIs
  • Ctrl+Click navigates to the class tree via navigateToNode, which only handles classes

Desired Behavior

  • The IRI index should store the entity type (class, property, individual, other) alongside each IRI's position
  • Hover tooltip should reflect the entity type: "Ctrl+Click to navigate to class/property/individual" or "Ctrl+Click to view in source" for untyped entities
  • Ctrl+Click should navigate to the correct tab based on entity type (using the entityNavigationRef pattern already implemented for lint issues)

Implementation Notes

  • The web worker (lib/editor/indexWorker.ts) parses Turtle source and could detect rdf:type declarations to classify entities
  • Alternatively, entity type info could come from the backend's indexed ontology data
  • The IriPosition interface would need an optional entityType field
  • The hover provider in TurtleEditor.tsx (around the HoverProvider registration) would read the entity type to customize the message
  • The Ctrl+Click handler would use entityNavigationRef or equivalent to route correctly

Related

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUser experience improvementsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions