From de311ac3c9f922d0f989839ccc0f3eceda6fdea2 Mon Sep 17 00:00:00 2001 From: Nick Laiacona Date: Tue, 7 May 2024 09:39:45 -0400 Subject: [PATCH 1/3] add odt example --- editioncrafter/package-lock.json | 4 +- .../stories/EditionCrafter.stories.js | 48 ++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/editioncrafter/package-lock.json b/editioncrafter/package-lock.json index f8e0f5b..348a143 100644 --- a/editioncrafter/package-lock.json +++ b/editioncrafter/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cu-mkp/editioncrafter", - "version": "0.2.7", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cu-mkp/editioncrafter", - "version": "0.2.7", + "version": "1.0.1", "license": "MIT", "dependencies": { "@material-ui/core": "^4.12.4", diff --git a/editioncrafter/stories/EditionCrafter.stories.js b/editioncrafter/stories/EditionCrafter.stories.js index d3208bb..52ab0c4 100644 --- a/editioncrafter/stories/EditionCrafter.stories.js +++ b/editioncrafter/stories/EditionCrafter.stories.js @@ -57,25 +57,49 @@ export const IntervistePescatori = () => ( /> ); -export const MultiDocument = () => ( +export const OrnamentDesignTranslation = () => ( From 735010de89866daad2ff0ac2779be9f30a66b909 Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Wed, 8 May 2024 00:47:31 -0400 Subject: [PATCH 2/3] improved variorum navigation and fixed folio name collision bug --- editioncrafter/src/action/DocumentActions.js | 2 +- editioncrafter/src/component/DocumentView.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/editioncrafter/src/action/DocumentActions.js b/editioncrafter/src/action/DocumentActions.js index 21ac014..b69bc60 100644 --- a/editioncrafter/src/action/DocumentActions.js +++ b/editioncrafter/src/action/DocumentActions.js @@ -160,7 +160,7 @@ function parseSingleManifest(manifest, transcriptionTypes, document) { const thumbnailURL = `${bodyId}/full/${thumbnailDimensions.join(',')}/0/default.jpg`; const folio = { - id: folioID, + id: document ? `${document}_${folioID}` : folioID, doc_id: document || manifest.id, name: canvasLabel, pageNumber: i, diff --git a/editioncrafter/src/component/DocumentView.js b/editioncrafter/src/component/DocumentView.js index bb3ffa4..5d394f8 100644 --- a/editioncrafter/src/component/DocumentView.js +++ b/editioncrafter/src/component/DocumentView.js @@ -368,6 +368,7 @@ const DocumentView = (props) => { hasNext: current_hasNext, previousFolioShortID: prevID, nextFolioShortID: nextID, + documentID: doc.variorum ? doc.folioIndex[shortID].doc_id : doc.documentName, }; }; @@ -384,6 +385,7 @@ const DocumentView = (props) => { const viewType = determineViewType(side); const key = viewPaneKey(side); const folioID = docView[side].iiifShortID; + const document = docView[side].documentID; const { transcriptionType } = docView[side]; if (viewType === 'ImageView') { @@ -425,7 +427,7 @@ const DocumentView = (props) => { documentView={docView} documentViewActions={documentViewActions} side={side} - selectedDoc={props.document.variorum && Object.keys(props.document.derivativeNames)[side === 'left' ? 0 : side === 'right' ? 1 : Object.keys(props.document.derivativeNames).length > 2 ? 2 : 1]} + selectedDoc={document ? document : props.document.variorum && Object.keys(props.document.derivativeNames)[side === 'left' ? 0 : side === 'right' ? 1 : Object.keys(props.document.derivativeNames).length > 2 ? 2 : 1]} /> ); } if (viewType === 'GlossaryView') { From ede4c10fc73308bbb2833d44fdd02f3fb9dd9ee7 Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Thu, 9 May 2024 10:40:16 -0400 Subject: [PATCH 3/3] added storybook workflow --- .github/workflows/deploy.yml | 39 --------------------------------- .github/workflows/storybook.yml | 24 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/storybook.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index cdd2f42..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Deploy to GitHub Pages - -on: - # Trigger the workflow every time you push to the `main` branch - # Using a different branch name? Replace `main` with your branch’s name - push: - branches: [ main ] - # Allows you to run this workflow manually from the Actions tab on GitHub. - workflow_dispatch: - -# Allow this job to clone the repo and create a page deployment -permissions: - contents: read - pages: write - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout your repository using git - uses: actions/checkout@v4 - - name: Install, build, and upload your site - uses: withastro/action@v2 - with: - path: ./astro-web # The root location of your Astro project inside the repository. (optional) - # node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) - # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) - - deploy: - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml new file mode 100644 index 0000000..c493d92 --- /dev/null +++ b/.github/workflows/storybook.yml @@ -0,0 +1,24 @@ +name: Build and deploy to GitHub pages for testing + +on: + push: + branches: + - dev # Trigger the action only on PR merges into dev +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + - name: Install and Build 🔧 + run: | # Install npm packages and build the Storybook files + npm run build + npm run build-storybook + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.4.2 + with: + branch: gh-pages # The branch the action should deploy to. + folder: editioncrafter/storybook-static # The folder that the build-storybook script generates files. + clean: true # Automatically remove deleted files from the deploy branch \ No newline at end of file