Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Upgrade to react 18 and webpack 5 #89

Merged
merged 22 commits into from
Dec 29, 2022

Conversation

vincentfretin
Copy link
Contributor

References #40
Merge latest changes from aframe-inspector master, I ignored completely the changes in src/style folder.

How I did it:

git clone git@github.com:aframevr/aframe-inspector.git

Setting up upstream remote:

git clone git@github.com:3DStreet/3dstreet-editor.git
cd 3dstreet-editor
git remote add upstream git@github.com:aframevr/aframe-inspector.git

Update both remotes first if you already did the previous steps some time ago

git checkout master
git pull
git fetch upstream

Copy the repo in tmp directory to easily compare, and later retrieve the style folder unchanged

cp -rf ../3dstreet-editor /tmp/

Create a new branch

git checkout -b react18-webpack5

Merge:

git merge upstream/master
cp ../aframe-inspector/.babelrc .
cp ../aframe-inspector/.eslintrc .
cp /tmp/3dstreet-editor/README.md .
cp ../aframe-inspector/package-lock.json .
git add .babelrc .eslintrc README.md package-lock.json
cp ../aframe-inspector/package.json .
meld /tmp/3dstreet-editor/package.json package.json
# copy the deploy, prefirebase, repository, license changes, remove ghpages preghpages, remove ghpages shx dependencies
cp ../aframe-inspector/webpack.config.js .
# changes to 3dstreet-editor.js 3dstreet-editor.min.js
git add webpack.config.js
# fix conflicts in all js files
rm -rf src/style/
cp -rf /tmp/3dstreet-editor/src/style/ src/
git add src/style/
git rm src/components/modals/ModalHelp.js src/components/viewport/CameraToolbar.js
git merge --continue
# compare again aframe-inspector and 3dstreet-editor, make additional changes
git add -p src
git commit --amend
npm run prettier
npm run eslint
# additional fix...

vincentfretin and others added 18 commits October 4, 2022 18:19
* update aframe-environment-component to 1.3.1

* replace THREE.Math by THREE.MathUtils

* properly use BoxHelper, update method has no arguments anymore and setFromObject already call update so no need to call it a second time

* rename geometries to remove warnings

* fix rotate gizmo, setFromEuler needs a Euler instance
…hen using the inspector in a site that has tailwind base.css (#640)
* avoid error when attrValue is undefined (for example material component set via a mixin for shortOrange entity)

* fix wrong number type for animation loop property

* prevent copy to clipboard buttons to expand/collapse the panel

* refresh SceneGraph after cloning entity

* remove unused variables (this fixes the warning for SphereBufferGeometry in three r144)

* call helper update() only if the helper has an update method
* remove unused imports

* remove unused code

* cleanup some eslint globals and eslint disable comment usage

* remove empty ComponentHelp.js file

* remove console.log

* use substring instead of deprecated substr

* fix unneeded regex escape

* use import/export everywhere

* fix eslint no-extra-semi

* fix eslint comma-dangle

* disable space-before-function-paren eslint rule that conflicts with prettier

* declare className prop

* fix some eslint errors

* declare entity prop

* add prettier config so it uses single quotes when saving via vscode, add src/lib/TransformControls.js to prettierignore to not reformat this file

* remove unused variable

* fix 'inspector' is defined but never used

* remove unused trim function

* disable react/no-danger on those files

* remove unused onTouchStart onTouchEnd functions

* specify trailingComma none that will be needed with latest version of prettier

* fix some eslint errors found with latest eslint version
* Fix keydown/keyup listeners for shortcuts not properly removed when editor is reenabled

* there is no need to call forceUpdate after calling setState

* don't show + buttons when inspector is disabled

* fix right panel + button to really be on the right

* toggling a panel shouldn't impact the other one

* add top 0 on left and right classes so the + button really shows up

* replace spread syntax by Object.assign
On US international keyboards Ctrl + Alt are combined into AltGraph.
When this happens Ctrl and Alt are registered as unpressed,
breaking the toggle expression

Co-authored-by: meteoorkip <svenkonings@live.nl>
* fix eslint errors with latest eslint version

* update code to latest react api

* update all dependencies, remove non used dependencies, properly separate devDependencies

* fresh package-lock.json

* revert to using the spread syntax

* ignore new rules

* React import not needed with new jsx runtime

* inline the svg in the js bundle

* define three as external to be able to import jsm file from three package

* add three dependency

* use GLTFExporter from three r145

* remove vendor/GLTFExporter.js

* format files on pre-commit

* update package-lock.json
* Fix checkbox that was always black when tailwindcss base style is present on the page

* Fix alignement of span elements inside entityPrint

* Fix initial value position in select fields

* Remove 1px box-shadow applied by tailwindcss when input has focus
@netlify
Copy link

netlify bot commented Dec 26, 2022

Deploy Preview for 3dstreet-editor-builds ready!

Name Link
🔨 Latest commit 4367be0
🔍 Latest deploy log https://app.netlify.com/sites/3dstreet-editor-builds/deploys/63a9db81b2ca5900097ecf27
😎 Deploy Preview https://deploy-preview-89--3dstreet-editor-builds.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 settings.

@kfarr
Copy link
Contributor

kfarr commented Dec 27, 2022

Thanks @vincentfretin

I've tested all of the key functionality and it all seems to work!

@omedvediev can you review?

minor style issue that we can resolve later:

  • logo between viewer / editor doesn't disappear correctly

@omedvediev
Copy link
Contributor

Hello @kfarr! @vincentfretin 's branch looks great. The App compiles without any error or warning and there are no runtime issues.

@kfarr kfarr merged commit 45bc983 into 3DStreet:master Dec 29, 2022
@vincentfretin vincentfretin deleted the react18-webpack5 branch July 22, 2023 14:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants