From 111a0740155ee36404a10c1bb1d1382c2fdf3a37 Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Mon, 13 May 2024 15:17:21 -0400 Subject: [PATCH 1/7] added .github folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4fb48d9..73d9803 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ __tests__/integration/editioncrafter/css/ .cache/ storybook-static .DS_Store +.github \ No newline at end of file From 95981bc9eda777b447540065942f66738d5cd873 Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Mon, 13 May 2024 15:18:54 -0400 Subject: [PATCH 2/7] deleted storybook workflow --- .github/workflows/storybook.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/storybook.yml diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml deleted file mode 100644 index c493d92..0000000 --- a/.github/workflows/storybook.yml +++ /dev/null @@ -1,24 +0,0 @@ -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 From 89952fef6002551da07014aae6228b6920cdecfd Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Mon, 13 May 2024 15:20:30 -0400 Subject: [PATCH 3/7] added deploy.yml back to workflows --- .github/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cdd2f42 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,39 @@ +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/.gitignore b/.gitignore index 73d9803..4fb48d9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ __tests__/integration/editioncrafter/css/ .cache/ storybook-static .DS_Store -.github \ No newline at end of file From c649050f78c84ac83a88bb4fa4ae20e83e3c99e2 Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Mon, 13 May 2024 15:21:28 -0400 Subject: [PATCH 4/7] adds github folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4fb48d9..73d9803 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ __tests__/integration/editioncrafter/css/ .cache/ storybook-static .DS_Store +.github \ No newline at end of file From 66c446752c3b3f8f36cc79e5b709a798a1fd111c Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Fri, 17 May 2024 11:38:50 -0400 Subject: [PATCH 5/7] fixed issues with image viewer and transcription panes not refreshing --- editioncrafter/src/component/DocumentView.js | 48 ++----------------- .../stories/EditionCrafter.stories.js | 6 ++- 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/editioncrafter/src/component/DocumentView.js b/editioncrafter/src/component/DocumentView.js index e83294a..ffd32a1 100644 --- a/editioncrafter/src/component/DocumentView.js +++ b/editioncrafter/src/component/DocumentView.js @@ -30,6 +30,11 @@ const DocumentView = (props) => { const navigate = useNavigate(); const location = useLocation(); + //"reload" the page if the config props change + useEffect(() => { + dispatchAction(props, 'RouteListenerSaga.userNavigatation', location); + }, [props.config]); + useEffect(() => { setSinglePaneMode(props.containerWidth < 960); }, [props.containerWidth]); @@ -39,49 +44,6 @@ const DocumentView = (props) => { navigate(pathname + location.search); }; - useEffect(() => { - const reloadDocument = async (document) => { - if (!document.loaded) { - // handle the case where we've passed in an array of manifest URLs, in which case the `variorum` parameter should be set to `true` - if (document.variorum) { - const variorumData = {}; - for (const key of Object.keys(document.manifestURL)) { - const response = await fetch(document.manifestURL[key]).then((res) => (res.json())); - variorumData[key] = response.data; - } - const variorumManifest = { - type: 'variorum', - documentData: variorumData, - }; - return variorumManifest; - } - const singleResponse = await fetch(document.manifestURL).then((res) => (res.json())); - return singleResponse; - } - - return null; - }; - - const reloadGlossary = async (glossary) => { - if (!glossary.loaded && glossary.URL) { - const glossaryData = fetch(glossary.URL).then((res) => (res.json())); - return glossaryData; - } - } - // if the top-level component props have been updated such that the document initial state has been reinitialized, dispatch the loadDocument action with the new data - if (!props.document.loaded) { - reloadDocument(props.document).then((res) => { - dispatchAction(props, 'DocumentActions.loadDocument', res); - }); - } - // update the glossary as well if necessary - if (!props.glossary.loaded && props.glossary.URL) { - reloadGlossary(props.glossary).then((res) => { - dispatchAction(props, 'GlossaryActions.loadGlossary', res); - }) - } - }, [props.config]); - const getViewports = () => { const { folioID, transcriptionType, folioID2, transcriptionType2, folioID3, transcriptionType3 diff --git a/editioncrafter/stories/EditionCrafter.stories.js b/editioncrafter/stories/EditionCrafter.stories.js index c02c833..dfaf753 100644 --- a/editioncrafter/stories/EditionCrafter.stories.js +++ b/editioncrafter/stories/EditionCrafter.stories.js @@ -134,16 +134,18 @@ export const fullScreen = () => ( export const stateChange = () => { const [manifest, setManifest] = useState('https://cu-mkp.github.io/editioncrafter/taos-baptisms-example/iiif/manifest.json'); const [glossary, setGlossary] = useState(undefined); + const [title, setTitle] = useState('FHL_007548733_TAOS_BAPTISMS_BATCH_2') useEffect(() => { setTimeout(() => { - setManifest('https://cu-mkp.github.io/dyngleyfamily-editioncrafter-data/O_8_35/iiif/manifest.json'); + //setManifest('https://cu-mkp.github.io/dyngleyfamily-editioncrafter-data/O_8_35/iiif/manifest.json'); setGlossary('https://cu-mkp.github.io/editioncrafter-data/fr640_3r-3v-example/glossary.json'); + setTitle('Taos Baptisms Batch 2'); }, 10000); }, []) return ( Date: Fri, 17 May 2024 11:49:19 -0400 Subject: [PATCH 6/7] delete deploy.yml --- .github/workflows/deploy.yml | 39 ------------------------------------ 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/deploy.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 From 18a9a95e8355833d051b4e7ec5333f68be6fcb3c Mon Sep 17 00:00:00 2001 From: Rebecca Black Date: Fri, 17 May 2024 11:51:42 -0400 Subject: [PATCH 7/7] Create storybook.yml --- .github/workflows/storybook.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/storybook.yml diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml new file mode 100644 index 0000000..c5ec348 --- /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