Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use display entities #698

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Dec 2, 2024

Description

Nearly all views that show details of a node, edge, or type would do the exact same transformations at the view level. This change abstracts all of that logic to a single place, ensuring the logic is consistent and making it easier to modify the behavior across the app.

The next step of this refactoring will be to abstract the neighbor count logic to the same DisplayVertex. And after that we will have a good foundation for loading a node/edge from a simple ID, which is foundational to URL sharing.

Validation

  • Smoke test all areas of the app

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@kmcginnes kmcginnes force-pushed the display-entities branch 4 times, most recently from a5f20a5 to 27336ba Compare December 3, 2024 18:24
@kmcginnes kmcginnes marked this pull request as ready for review December 3, 2024 18:24
@kmcginnes kmcginnes force-pushed the display-entities branch 3 times, most recently from 722543b to ed9b9a0 Compare December 4, 2024 01:14

// Map all the attributes for displaying
const typeAttributes = get(
vertexTypeAttributesSelector(vertex.types ?? [vertex.type])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use vertexTypes from above

typeAttributes: AttributeConfig[],
textTransform: (text?: string) => string
): DisplayAttribute[] {
const nodeAttributeNames = Object.keys(entity.attributes);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update the name

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.

[Spike] Investigate hurdles to entity detail query
1 participant