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

Fix asset thumbnail url in import screens #20330

Merged
merged 2 commits into from Feb 1, 2018

Conversation

epeach
Copy link

@epeach epeach commented Jan 31, 2018

[Axosoft Ticket Describing Bug] (https://codeorg.axosoft.com/viewitem?id=1230&type=features&force_use_number=true)

When importing assets from ProjectA to ProjectB, the import confirmation screen showed an AssetThumbnail which used a url for where the asset would be saved in ProjectB, once the import was complete, resulting in a broken link. I enabled passing in a projectId to AssetThumbnail which, when passed in, specifies the project to which the asset belongs. The import screen now displays a thumbnail of ProjectA's assets when confirming the import of assets and then imports to ProjectB.

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

Great fix!

asset={{filename: 'bar.png', category: 'image', willReplace: false}}
/>
);
expect(itemWithoutProjectId.find('img').prop('src')).to.contain("/v3/assets/undefined/bar.png");
Copy link
Contributor

Choose a reason for hiding this comment

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

Nonblocking: Is there a way to assert what the "current project id" is in this test?

Copy link
Author

Choose a reason for hiding this comment

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

I don't believe so. Since the clientApi.js refers to the project.js to get the project name and this AssetListItem lives independently of a project, I don't believe there is a way to associate this AssetListItem with a project.

@epeach epeach merged commit 3311941 into staging Feb 1, 2018
@epeach epeach deleted the fix-import-screen-broken-images branch February 25, 2018 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants