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

Update to @iiif/helpers from Vault + new Atlas version. #237

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

stephenwf
Copy link
Member

@stephenwf stephenwf commented Feb 13, 2024

Summary of changes:

  • @iiif/vault -> @iiif/helpers
  • @iiif/vault-helpers -> @iiif/helpers
  • @atlas-viewer/atlas bumped to v2.x (currently a PR branch)
  • @iiif/parser bumped to v2.x
  • @iiif/presentation-3 bumped to v2.x
  • react-iiif-vault bumped to v1.x

In practice this will mean a few updates to the sandboxes.

import { Vault } from '@iiif/vault';
import { createThumbnailHelper } from '@iiif/vault-helpers';

Is now:

import { Vault, createThumbnailHelper } from '@digirati/canvas-panel-web-components';

Or just:

const vault = new CanvasPanel.Vault();
const vault2 = CanvasPanel.globalVault();

const helper = CanvasPanel.createThumbnailHelper();

A lot of changes under the hood, but no changes to the API. (Vault, React IIIF Vault or Helpers)

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for iiif-canvas-panel failed.

Name Link
🔨 Latest commit ce917ef
🔍 Latest deploy log https://app.netlify.com/sites/iiif-canvas-panel/deploys/666b3e70c84a480008f1024d

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for iiif-canvas-panel-demos failed.

Name Link
🔨 Latest commit ce917ef
🔍 Latest deploy log https://app.netlify.com/sites/iiif-canvas-panel-demos/deploys/666b3e701c510400080707e9

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for canvas-panel-storybook canceled.

Name Link
🔨 Latest commit ce917ef
🔍 Latest deploy log https://app.netlify.com/sites/canvas-panel-storybook/deploys/666b3e70619dfe00088364aa

Comment on lines +7 to 12
import externalStylesheet from '@site/sandboxes/external-stylesheet.csb/\_load';
import opacity from '@site/sandboxes/20-styling/opacity.csb/\_load'; import
opacity2 from '@site/sandboxes/20-styling/opacity2.csb/\_load'; import flexbox
from '@site/sandboxes/01-show-canvas/flexbox.csb/\_load'; import { Sandbox }
from '@site/Sandbox';

Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: fix. Looks like the automatic linting wrecked this (and a few more)

Copy link

codesandbox-ci bot commented Feb 13, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ce917ef:

Sandbox Source
simple-vue Configuration
vue-3-carousel Configuration
external-stylesheet-sandbox Configuration
example-sandbox Configuration
custom-preset Configuration
react-choices-example Configuration
reacting-to-the-user Configuration
external-annotation-pages Configuration
virtual-annotation-pages Configuration
loading-annotation-pages Configuration
annotation-display-1 Configuration
annotation-display-2 Configuration
choice-example Configuration
choice-react Configuration
more-regions-1 Configuration
more-regions-2 Configuration
regions-1 Configuration
regions-2 Configuration
regions-3 Configuration
regions-4 Configuration
regions-5 Configuration
regions-6 Configuration
responsive-1 Configuration

Comment on lines -179 to +199
<canvas-panel
iiif-content="http://example.org/canvas-1.json"
choice-id="http://example.org/choice-set-a/3, http://example.org/choice-set-b/7#opacity=0.5"
/> Useful for static rendering -----^
<canvas-panel
iiif-content="http://example.org/canvas-1.json"
choice-id="http://example.org/choice-set-a/3, http://example.org/choice-set-b/7#opacity=0.5"
/>
Useful for static rendering -----^
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: fix

Comment on lines 36 to 40
// 'https://cdn.jsdelivr.net/npm/@digirati/canvas-panel-web-components@latest',
"https://cdn.jsdelivr.net/npm/@digirati/canvas-panel-web-components@1.0.56",
// "https://cdn.jsdelivr.net/npm/@digirati/canvas-panel-web-components@1.0.56",
// 'https://cdn.jsdelivr.net/npm/@iiif/vault-helpers@latest/dist/index.umd.js'
],
// clientModules: [
// require.resolve('./packages/canvas-panel/dist/bundle.js'),
// ],
clientModules: [require.resolve("./packages/canvas-panel/dist/bundle.js")],
Copy link
Member Author

Choose a reason for hiding this comment

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

Should remove this.

@stephenwf
Copy link
Member Author

@abrin I'm almost finished this refactor, which includes a better build system.

I've published a temporary package, which has the new code (most recent main was merged in too).

canvas-panel-neo@1.0.1

Would it be possible for you to test this package and let me know if it continue to work as expected with your build tooling? The updates and compatibility are worth the update (in my opinion).

@abrin
Copy link
Contributor

abrin commented Jun 13, 2024

@stephenwf will do. @danieltbrennan is in the image viewer today and will give it a spin

@danieltbrennan
Copy link
Contributor

@stephenwf testing this and was able to build in our component without any problems at that step. So far though noticing an issue where the behavior of paged manifests as loaded with sequence-panel seems to have changed, notably that the first standalone page is being included again within the first pair of open pages. See below from our storybook:

Screen Shot 2024-06-13 at 1 55 04 PM
Screen Shot 2024-06-13 at 1 55 13 PM

Will test more but this is the first thing that caught my eye when running through our Storybook. Some fixtures for that type of manifest if useful:

https://data.getty.edu/media/manifest/bayard-custom (prezi v3)
https://media.getty.edu/iiif/manifest/2629d5fa-fb10-4b33-a9f9-59f053bf5604 (prezi v2)

@stephenwf
Copy link
Member Author

stephenwf commented Jun 14, 2024

Oh that is strange. I'll double check the changes. It does seem to be working in another viewer that uses the same sequence calculations, it must be a key or cache somewhere. I'll have a look into it!

Great news about the build changes though! That will hopefully make this a smooth transition, and much easier to iterate I hope.

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