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

Mechanism to find unused assets #1324

Closed
1 task done
fernandolucchesi opened this issue Oct 18, 2022 · 12 comments
Closed
1 task done

Mechanism to find unused assets #1324

fernandolucchesi opened this issue Oct 18, 2022 · 12 comments
Assignees
Labels
🚀 ready to deploy Use this if issue is ready to be deployed

Comments

@fernandolucchesi
Copy link
Contributor

fernandolucchesi commented Oct 18, 2022

Feature Flagged

  • studio\src\lib\structure\items\AssetLibrary.js
@padms padms self-assigned this Dec 30, 2022
padms added a commit that referenced this issue Jan 2, 2023
padms added a commit that referenced this issue Jan 3, 2023
@SvSven
Copy link
Contributor

SvSven commented Jan 6, 2023

Looks good to me! Nice and simple ✅

@padms
Copy link
Contributor

padms commented Jan 6, 2023

@meols This is ready for test

padms added a commit that referenced this issue Jan 6, 2023
@fernandolucchesi
Copy link
Contributor Author

There seems to be an edge case:

image

Displays as unused because it is the draft., but the original is being used. I believe if the original is being used, we should not list the draft:
image
image

As for the deskStructure, I think:

.                                              Unused assets   
.                            ->                Unused videos
____________ 
Unused files                        

Has a better UX

@meols
Copy link
Collaborator

meols commented Jan 10, 2023

@fernandolucchesi - any acceptance criteria for this?

@padms
Copy link
Contributor

padms commented Jan 11, 2023

@fernandolucchesi Can I further split this in to published unused assets and new unused assets .. This would simplify the query and will not give "Operation timed out" error..

padms added a commit that referenced this issue Jan 12, 2023
@fernandolucchesi
Copy link
Contributor Author

@fernandolucchesi Can I further split this in to published unused assets and new unused assets .. This would simplify the query and will not give "Operation timed out" error..

I think it is the best option

@padms
Copy link
Contributor

padms commented Jan 13, 2023

@fernandolucchesi done. Please check now.

@fernandolucchesi
Copy link
Contributor Author

Great! Approved ✅

@padms
Copy link
Contributor

padms commented Jan 18, 2023

@meols This can be tested now. A new folder called "Unused Files" is added under Asset Library, which has four sub folders showing list of published files which are not referenced anywhere, and list of assets which are unpublished drafts.

@meols
Copy link
Collaborator

meols commented Feb 13, 2023

@padms - I have struggled a bit with testing this – and also taken a long time, sorry! 😄 Can this functionality only be used for files (mostly pdf and xls) that are created with an “asset container” and not all file formats (images included) that are in media?
If I upload a new file to media it isn’t visible in the new Drafts assets folder, but it needs to be linked to an asset container as well to be shown.
If I replaced a file in an asset container without going to media to delete the old version of it, the old version isn’t showing in any of the Unused files folders when it’s no longer attached to an asset container.
But what I noticed when testing was that in Media we can Browse assets and add a filter for “In use” and choose True or False and then search for e.g. “.xls” to find unused .xls and .xlsx files.
What are the benefits with using the Unused files” folder compared with this search in Media?

@padms
Copy link
Contributor

padms commented Feb 14, 2023

@meols -
image

If you see the above image, there are some assets that are not used on the actual page. If you filter for unused assets under media, you might see them as being used.

In order to find which assets are actual used on the page, you have to look for unused asset references both in media and in asset library. This newly created 'Unused Files' will show the list of all such files.

More about why we have to create asset reference here.

@meols
Copy link
Collaborator

meols commented Feb 14, 2023

OK, thanks @padms - Then we have two ways to find files 😄

padms added a commit that referenced this issue Feb 17, 2023
@padms padms added the 🚀 ready to deploy Use this if issue is ready to be deployed label Feb 17, 2023
@padms padms closed this as completed Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 ready to deploy Use this if issue is ready to be deployed
Projects
None yet
Development

No branches or pull requests

4 participants