Skip to content

Commit

Permalink
Factorize the code to make it easier to add new modes AND added a Jux…
Browse files Browse the repository at this point in the history
…talinear edition mode (#303)

* - added a Juxta mode that creates a translation burrito
- added a 'factoryCreateContent.js'  file to help factorize some code for 'createObsContent', 'createVersificationUSFM' and 'createAudioVersification' in 'saveProjetcsMeta.js'

- fixing some typos, fixing lint

* Refactorization of 'saveProjectsMeta.js'

* Scripture Burrito as a resource : added the poissibility for the user to search and download a SB as a resource in a module

* removed checkbox from the UI and query sb resource everytime

* Added a juxtalinear editor along with a new mode.
- auto load a book on the opening of a project
- auto save after a modification
- fixed a bit of typos and code

* created a juxtaBurrito creator and a function to add juxta content. Also edited the icon for Juxta mode (it's visible now) you can create a new juxta project

* ADDED juxta support for SB creation and fixed some typos

* ADDED support for usfm import for a juxta project. Now we have to change the way a juxta json is built.

* juxtalineat mode functionnal

* UPDATE : now the interface handle corectly a json juxta file and update it if needed. and layout color update

* function to update a json juxta file if needed

* checksums ok for each modifications of the juxta

* bugfix : juxta was still using a translation settings

* quick fix

* added new kewboard shortcuts : 'Tab' to navigate through line chuncks, 'double click' to modify a chunck, 'enter' to end the modification of a chunck. And added seemless navigation between Juxtalinear editor and the BibleEditorX. Navigating through verses and chapters with the menu bar will load the corresponding sentence and vice versa.

* removing a useless 'console.log'

* FIXED font size when aditing a chunck, ADDED a bit of css and added a skip for the liter for .ts files

* I put the sentences loading one layer outside the main editor, to avoid the editor to re-render everytime the juxtalinear editor module

* Many bugfixes #303 (comment)

* add a check if the folder exists

* added a little bit of secure code for OBS loading

* changed the behavior of the Snackbar. If error === 'failure' the snackbar will show up for a longer time

* changed the behavior of the Snackbar. If error === 'failure' the snackbar will show up for a longer time

* bold text 'CREATE PROJECT' for better visibility and start to check 'canonSpecification' for a juxta project

* added the feature that download resources not imported by the user for juxtalinear project

* Now the user is correctly notified when the imported books does not match the canon specification, and also, the canon specification automatically matches the file imported

* minor bugfixes and code cleaning

* changed place of the 'nprogress' by few px

* added a better user-friendly messages to nugde the user to import at least one resource for a Juxtalinear project

* FIXED : archive a Text Translation project OK.

* star/unstar a juxtalinear project works now

* FIX : bug that prevented some resources to show up. and FIX : bug that was throwing an error when a user where to search for a resource in the resource search field, and click on 'no match found'

* deleted package-lock.json and updated yarn.lock

* updated french translation

* bugfix : you can now edit a juxta project properly

* fixed bug where on book change, the sentences where wronly saved under another filename

* make 'jsonFileContent.bookCode' to upper case for safety reasons

* FIX : export/import now works properly for juxtalinear projects

* fix obs auto zipping on export

* spinner and 'create project' button css fix.

* 'create project' button reverted

---------

Co-authored-by: danielc-n <[email protected]>
  • Loading branch information
DanielC-N and danielc-n authored Jun 14, 2024
1 parent d112b31 commit 2c83c31
Show file tree
Hide file tree
Showing 111 changed files with 10,486 additions and 4,598 deletions.
435 changes: 212 additions & 223 deletions e2e-tests/common.js

Large diffs are not rendered by default.

53 changes: 49 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"deploy": "yarn build && electron-builder -p always"
},
"eslintIgnore": [
"*.test.js"
"*.test.js",
"*.tsx",
"*.ts"
],
"build": {
"asar": true,
Expand Down Expand Up @@ -83,13 +85,17 @@
"@babel/eslint-parser": "^7.5.4",
"@babel/preset-env": "^7.18.2",
"@babel/preset-react": "^7.17.12",
"@capacitor/cli": "5.4.2",
"@netlify/plugin-nextjs": "^4.8.0",
"@playwright/test": "^1.36.2",
"@svgr/webpack": "^5.5.0",
"@testing-library/dom": "^8.13.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "14.2.0",
"@types/file-saver": "^2.0.5",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"ajv": "^6.12.2",
"autoprefixer": "^10.4.13",
"babel-jest": "^28.1.1",
Expand All @@ -112,14 +118,23 @@
"null-loader": "^4.0.1",
"postcss": "^8.4.21",
"prettier": "^2.8.3",
"source-map-explorer": "^2.5.3",
"tailwindcss": "^3.2.4"
},
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@capacitor/app": "5.0.6",
"@capacitor/core": "5.4.2",
"@capacitor/haptics": "5.0.6",
"@capacitor/keyboard": "5.0.6",
"@capacitor/status-bar": "5.0.6",
"@electron/remote": "^2.0.8",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@headlessui/react": "^1.7.8",
"@heroicons/react": "^2.0.14",
"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "4.0.0-alpha.57",
Expand All @@ -132,6 +147,13 @@
"@supabase/supabase-js": "^2.26.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.9",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.2",
"@types/react": "^18.2.25",
"@types/react-beautiful-dnd": "^13.1.5",
"@types/react-dom": "^18.2.10",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@xelah/type-perf-html": "^1.0.1",
"adm-zip": "^0.5.9",
"audiobuffer-to-wav": "^1.0.0",
Expand All @@ -146,12 +168,15 @@
"epitelete": "^0.2.20",
"epitelete-html": "0.2.20-beta.2",
"eslint-import-resolver-alias": "^1.1.2",
"font-detect-rhl": "1.0.5-1",
"file-saver": "^2.0.5",
"font-detect-rhl": "1.0.8",
"font-list": "^1.4.5",
"fs-extra": "^10.1.0",
"get-system-fonts": "^2.0.2",
"gitea-react-toolkit": "2.1.2",
"history": "^5.3.0",
"i18next": "^21.8.9",
"ionicons": "^7.1.2",
"is-electron": "^2.2.1",
"isomorphic-git": "^1.24.0",
"js-yaml": "^4.1.0",
Expand All @@ -169,16 +194,24 @@
"postcss-import": "^15.1.0",
"postcss-nested": "^6.0.0",
"prop-types": "15.8.1",
"proskomma-core": "^0.10.4",
"proskomma-json-tools": "^0.8.8",
"proskomma-react-hooks": "2.4.0",
"raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^18.2.0",
"react-i18next": "^11.17.1",
"react-icons": "^4.11.0",
"react-markdown": "^9.0.0",
"react-media-recorder": "^1.6.6",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.6",
"tc-ui-toolkit": "5.3.3",
"translation-helps-rcl": "3.5.12",
"typescript": "^4.9.5",
"use-deep-compare": "^1.1.0",
"usfm-editor": "0.8.7",
"usfm-grammar": "^2.3.0",
Expand All @@ -187,12 +220,24 @@
"webpack-node-externals": "^3.0.0",
"winston": "^3.7.2",
"word-aligner": "1.0.0",
"workbox-background-sync": "^7.0.0",
"workbox-broadcast-update": "^7.0.0",
"workbox-cacheable-response": "^7.0.0",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-google-analytics": "^7.0.0",
"workbox-navigation-preload": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-range-requests": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0",
"workbox-streams": "^7.0.0",
"ws": "^8.8.0",
"xregexp": "^5.1.1",
"yarn": "^1.22.19"
},
"optionalDependencies": {
"bufferutil": "^4.0.6",
"react-icons": "4.10.1",
"scripture-resources-rcl": "5.1.0",
"utf-8-validate": "^5.0.9"
},
Expand All @@ -204,4 +249,4 @@
"word-aligner": "$word-aligner",
"@mui/lab": "$@mui/lab"
}
}
}
2 changes: 2 additions & 0 deletions renderer/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"jsx": "react",
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"@/components/*": [
Expand Down
Loading

0 comments on commit 2c83c31

Please sign in to comment.