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

Add new sample viewer #29

Merged
merged 22 commits into from
Jun 26, 2024
Merged

Add new sample viewer #29

merged 22 commits into from
Jun 26, 2024

Conversation

yonabystedt
Copy link
Contributor

  • upgraded yarn and other packages as needed to keep pace with the Web ecosystem.
  • removed existing sample viewer and added a new one that uses the same code from @vertigis/web-sdk to build and run as the samples themselves
  • linted
  • added simple tests for the sample viewer

There's an issue still present with cypress that needs to be addressed. It can kind of be worked around here but right now it prevents loading samples other than the default, and interacting directly with the 'map' object.

Both of these require access to the parent window of the iframe, and this isn't resolving correctly within the cypress environment. This will be a much bigger problem in the vertigis-web-samples repo than here.

@yonabystedt yonabystedt requested a review from rcooney June 21, 2024 20:17
Copy link

netlify bot commented Jun 21, 2024

Deploy Preview for vertigis-web-incubator ready!

Name Link
🔨 Latest commit 6ffacfa
🔍 Latest deploy log https://app.netlify.com/sites/vertigis-web-incubator/deploys/667c5f820b68f400088c2d53
😎 Deploy Preview https://deploy-preview-29--vertigis-web-incubator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yonabystedt
Copy link
Contributor Author

The issues with the cypress environment have been addressed. Apparently the modifyObstructiveCode flag (turned on by default) actually rewrites your code on the fly to break any references to the parent window.

Currently blocked because the deployment directory of the sample viewer build has changed to /libraries/sample-viewer/build and this needs to be reflected in the netlify configuration.

@rcooney
Copy link

rcooney commented Jun 26, 2024

Do we know what is causing the double load?

@yonabystedt
Copy link
Contributor Author

Do we know what is causing the double load?

Yes, it loads the first time as an empty shell before it figures out what library should be active, adjusts the configuration and reloads. Maybe it would be possible to make this seem less glitchy by suppressing the visibility of everything until it's actually ready...

@yonabystedt
Copy link
Contributor Author

Added a loading spinner to make the initial load seem snappier and less glitchy. It only shows up on netlify or if you run yarn serve-library-viewer after building.

@yonabystedt yonabystedt merged commit fcdee2a into main Jun 26, 2024
5 checks passed
@yonabystedt yonabystedt deleted the upgrade.yarn branch June 26, 2024 20:20
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.

2 participants