react: Fix react dnd multiple HTML5backends bug#509
Draft
JohannesLares wants to merge 1 commit intoinveniosoftware:masterfrom
Draft
react: Fix react dnd multiple HTML5backends bug#509JohannesLares wants to merge 1 commit intoinveniosoftware:masterfrom
JohannesLares wants to merge 1 commit intoinveniosoftware:masterfrom
Conversation
React DnD should not use multiple HTML5 backends at the same time. Create one DnD manager, that is used InvenioRDM wide.
| import PropTypes from "prop-types"; | ||
| import { FieldArray, getIn } from "formik"; | ||
| import { HTML5Backend } from "react-dnd-html5-backend"; | ||
| import { manager } from "@js/invenio_rdm_records"; |
Contributor
There was a problem hiding this comment.
i will not comment on the idea itself, because i am not into it at the moment, but here we have dependency issue. normally invenio-vocabulary is a dependency of invenio-rdm-records. reversing that now in the assets would create a circular dependency which can be complicated in the future. would it be possible to create the base manager somewhere else?
Contributor
There was a problem hiding this comment.
you could do what you did in invenio-rdm-records here and use it then in invenio-rdm-records
Author
There was a problem hiding this comment.
Thanks for the reply, I did not notice that dependency issue. I'll swap the dependencies around regarding this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
React DnD should not use multiple HTML5 backends at the same time. Create one DnD manager, that is used InvenioRDM wide.
❤️ Thank you for your contribution!
Description
Modified React DnD functionality to have a single html5 backend compared to previous multiple html5 backends. React DnD does not support multiple html5 backends at once (check for example: react-dnd/react-dnd#3119 )
Note! This PR is related to invenio-rdm-records PR: inveniosoftware/invenio-rdm-records#2138
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Frontend
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: