Problem/Motivation
Node and taxonomy terms currently have a path item, so they have clean URLs. Should media entities hat nice URLs as well?
Proposed resolution
DISCUSS
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Add term page.png | 57.49 KB | gábor hojtsy |
| #11 | Add media drupal 8.3.x.png | 61.23 KB | gábor hojtsy |
| #10 | 2835861-10.patch | 678 bytes | gábor hojtsy |
Comments
Comment #2
gábor hojtsyWhat is not nice enough about these?
Or do you propose we DO NOT have a canonical path at all?
Comment #3
gábor hojtsyOh wait, you mean integrate with path module if it exists? Should path integrate with media or media integrate with path? I found this in path module, but it does not make it clear how is the underlying form built.
Comment #4
gábor hojtsyLooked around a bit. My initial reaction was "but media is more attached data than data on its own" at least in terms of public usage. Like if your media is a slideshow of things, it will be displayed on a page with other things. If your media is an embedded video or images, it will be embedded with ckeditor or as fields, etc. In ways similar to taxonomy terms. So I looked at the taxonomy term form and boom, that has a URL path field also. Haha.
Comment #5
gábor hojtsyTagging usability sprint also, that may help with some feedback.
Comment #6
gábor hojtsyComment #7
dawehnerNote: The main integration between node/taxonomy_term and path module is here:
Comment #8
berdirI think terms are much more public than media items, so it totally makes sense to have a path field there, not sure about media.
Also, pathauto actualy has generic integration for any entity type with a canonical link template to automatically expose a path field and provide patterns. So people who use pathauto (which is many I guess) get it anyway.
Comment #9
Bojhan commentedI think it generally makes sense to expose this? At the end its an item, like any other - that can be reached.
Comment #10
gábor hojtsy@dawehner, @Bojhan: ok, so this would be something like the attached then? It exposes the URL alias field, so it would show up like in the taxonomy term form. Should we fold this in #2831274: Bring Media entity module to core as Media module or maintain it here for a followup?
Comment #11
gábor hojtsyThe result of the patch is:
Comment #12
Bojhan commentedYhea, although the description should be more localised to this data.
Comment #13
gábor hojtsy@Bojhan: I had the same observation when looking at the existing taxonomy term form in core:
Comment #14
gábor hojtsyTurns out that element description is hardcoded in the PathWidget class, and is not even a widget setting for path widgets:
So seems like that could only be made to work with feature development on the path widget itself. Question is if we want to block this issue on that or not.
Comment #15
seanbI see there is definitely a use case to expose media items on specific paths, but when a user creates a media item from the library or the field widget, they just want to embed and might not care about the page for that item.
Exposing the path field there could be confusing for the user. This is something to think about (although this could be a followup). Most users will probably use media items like they use files.
Comment #16
gábor hojtsy@seanB: I think we can use form modes for this, a mode for the standalone media editing screen and one for the media library and then people can adjust field which fields they want to see exposed in each form.
Comment #17
dawehnerIMHO we should not block it, but here is the follow up: #2842047: Don't hardcode the description in PathWidget
Comment #18
naveenvalechaAgree. Thank you! Here's the patch on follow-up #2842047-2: Don't hardcode the description in PathWidget
// Naveen
Comment #19
yoroy commentedSo making the URL alias field description specific to the kind of entity is blocked on #2842047: Don't hardcode the description in PathWidget. Otherwise, the usability feedback needed was given.
Please proceed with adding the URL alias field, with its hardcoded description for now :)
Comment #20
gábor hojtsyI'll work on bringing this back to the #2831274: Bring Media entity module to core as Media module patch then once there are no multiple competing directions where changes like this could fall between the cracks.
Comment #22
gábor hojtsyJust folded this into the media patch at #2831274-288: Bring Media entity module to core as Media module.