Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed drag crashing for streamfiles #1928

Merged
merged 1 commit into from
Mar 10, 2024
Merged

Conversation

sebjulliand
Copy link
Collaborator

Changes

This fixes an issue preventing streamfiles from being dragged and dropped from the IFS browser.
Dragging a streamfile would trigger the following error, shown in the developer console:
image

That happened during the item JSON serialization finding a circular reference (i.e. IFSFileItem's command would reference this, which indeed creates a circular reference).

To fix this, the command won't reference this anymore but only the required field to call the command (i.e. this.path).

The same fix has been applied on ObjectBrowserMemberItem to prevent the same problem in case it gets serialized.

How to test this PR

  1. Confirm drag'n'drop fails for a single streamfile without the PR (checkout the developer console to confirm the error)
  2. Checkout the PR
  3. Confirm drag'n'drop succeeds for a single streamfile
  4. Opening a streamfile for browse/edit must work
  5. Opening a source member for browse/edit must work

Checklist

  • have tested my change

@sebjulliand sebjulliand added the bug A confirmed issue when something isn't working as intended label Mar 9, 2024
@sebjulliand sebjulliand requested a review from chrjorgensen March 9, 2024 22:11
@sebjulliand sebjulliand self-assigned this Mar 9, 2024
Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebjulliand Drag and drop of streamfiles works now - also into the editor space.

I'm not sure what you mean by

Opening a streamfile for browse/edit must work
Opening a source member for browse/edit must work

Streamfiles can be opened by dragging or clicking.
Members can only be opened by clicking. Isn't that enough?

@sebjulliand
Copy link
Collaborator Author

@chrjorgensen it's just to be safe, because I made a change on the command call bound to the ifs file item and source member item.

Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. Approved and merged. 👍

@chrjorgensen chrjorgensen merged commit e20783b into master Mar 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed issue when something isn't working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants