fix(frontend): update mui Tree* dependency for FieldsView.tsx #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I've been using
opendiffy/diffy
and building from source with some customization. Upon doing so I've noticed the default frontend@mui/lab
Tree* components have been deprecated and now must be imported from@mui/x-tree-view
with TreeView having been renamed to SimpleTreeView as well as some slight changes in component props to both SimpleTreeView and TreeItem.Changes
Adds
@mui/x-tree-view
as frontend dependency and replace TreeView & TreeItem to be imported from aforementioned package with migrated syntax following the following docs:Bug Reproduction & Testing Change
One can verify the bug by standing up the docker-compose stack, building the diffy image from source locally by replacing L53 in docker-compose.yml with something like:
On
master
:stand up docker compose stack locally building diffy from source following the above modification to the compose file, ex.
docker compose -p diffy-local -f docker-compose.yml up --build
make a request to the diffy server at 8880 (request failure doesn't matter for this bug reproduction), ex.
navigate to the frontend at http://localhost:8888
clicking on the entry on the left hand Endpoints list will show nothing under right side Fields and there will be a warning in the developer console about the deprecation, see screenshot:
Do the same on this branch (building diffy image from source) and it will work as it did before, screenshot for reference:
Additional Context & Consideration
The current diff/diffy:latest image, does not have this problem likely due to a frontend docker build cache with a
@mui/lab
version prior to the deprecation.It might be worth considering adding a frontend dependency lock file so this issue does not arise for future users who choose to build from source.