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

WIP: Preload SVGs to improve load times #44

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

Conversation

NoraKri
Copy link
Contributor

@NoraKri NoraKri commented Nov 25, 2024

AB#201301

Pull requests practices for the SSI team

Aim of the PR

The frontend takes a long time to load. To improve this, we try preloading the SVGs to avoid fetching a file inside each component.

Implementation

  • Pandid.tsx now fetches all SVGs used in the diagram and stores them in a set.
  • All components now lookup their component name in the set and retrieve the SVG.

- Nozzle labels should be fixed before merge

Type of change

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

How Has This Been Tested?

  • Visual test that all SVGs are visible.

Additional Changes

  • Small fix: Height has been removed as a parameter from every SVGElement component.

NoraKri and others added 26 commits November 21, 2024 16:06
# Conflicts:
#	www/src/components/ActuatingSystem.tsx
#	www/src/components/CenterLine.tsx
#	www/src/components/Equipment.tsx
#	www/src/components/NozzleLabel.tsx
#	www/src/components/Pandid.tsx
#	www/src/components/ProcessInstrumentationFunction.tsx
#	www/src/components/SvgElement.tsx
#	www/src/components/piping/PipeSegment.tsx
#	www/src/components/piping/PipeSystem.tsx
#	www/src/components/piping/PipingComponent.tsx
#	www/src/hooks/useSerializeNodeSvg.tsx
#	www/src/hooks/useSerializePipeSvg.tsx
#	www/src/utils/SvgEdit.ts
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