Problem/Motivation
From #2962110-102: Add the Media Library module to Drupal core:
...the media tab lacks an empty table text the same as the other things under Content. We should add that for consistency.
This was replied to in #2962110-115: Add the Media Library module to Drupal core:
This table is provided by core media and is not altered by this patch. If we want to add empty table text we'd need to open a new issue and add an update hook since the View is already used on all sites using core media.
Let's look into that.
Proposed resolution
Provide empty text for the view, with an upgrade path.
Remaining tasks
Patch, test, review for usability, and commit.
User interface changes
Empty text will be added to a core view.
API changes
None.
Data model changes
None.
Comments
Comment #2
seanbThe default media view already had a empty text. Only the media library didn't have one. Patch attached adds a 'No media available.' text to the media library and changes the default text from 'No content available.' to 'No media available.' for the table view.
Not sure if we should add a update hook to change the text for existing sites. The library is not installed yet (if this makes it to 8.6) and changing the text for existing sites is probably not a good idea.
Comment #3
phenaproximaUpdate hooks are painful, especially when Views is involved. If it’s not essential, and I don’t think it is, let’s avoid it. :)
Comment #5
seanbAnother try.
Comment #7
chr.fritschRerolled and fixed the tests
Comment #8
chr.fritschSorry, I didn't want to change the status
Comment #9
marcoscanoLooks good to me.
Even though the added asserts could be technically out of scope for this, we would need to find an empty scenario to test this anyway, and this increases our test coverage.
So +1 from me when it's green.
Comment #10
alexpottCommitted c3615d2 and pushed to 8.6.x. Thanks!