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

Feat 226539: use mocked graphical data #86

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

NoraKri
Copy link
Contributor

@NoraKri NoraKri commented Feb 7, 2025

Aim of the PR

This PR fixes AB#226539

We are creating a new graphical format that sends data to the frontend in the form of JSON. This PR aims to start creating components and functions that fetch such data and displays it.

Implementation

There are two new components:

  • LinesGraphicalDataExample.tsx: This component handles lines, both dashed and normal.
  • SymbolGraphicalDataExample.tsx: This component handles equipment, nozzles, pipingcomponents etc. Everything that has an SVG is a symbol and handled by this component.

In addition, a modified Pandid-component is created for testing:
PandIdGraphicalDataExample.tsx: Fetches graphical data from the endpoint and loops over all lines and symbols to display them.

New interfaces have been created for the new format.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • This change requires a documentation update

If the changes impact any dependent services then provide details.

How Has This Been Tested?

Tested by visually confirming that both symbols and lines are rendered in the editor and are clickable, both as internal and boundary.

Additional Changes

  • The graphical data endpoint returned the JSON as a string instead of pure JSON. Changed this endpoint to return JSON.
  • Changed graphical data format example style names to match JavaScript variable naming conventions.

@markus-ap
Copy link
Contributor

markus-ap commented Feb 7, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

Copy link
Contributor

@eoye eoye left a comment

Choose a reason for hiding this comment

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

Very nice work! 🤩 I've tested it out and it works, and very cool with the toggle button!

@eoye eoye merged commit b237f80 into main Feb 10, 2025
6 checks passed
@eoye eoye deleted the feat/226539-use-mocked-graphical-data branch February 17, 2025 12:37
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