Problem/Motivation

This is a very helpful module, and I'm using it to provide my users with the ability to select an image's orientation, which is great. But I run into an issue. I have a convention of naming my display modes after the context in which I generally use them. This doesn't necessarily make much sense to a user selecting the view mode to use on a field.

So my options are to rename the view mode to something that the end user would understand in the context of them picking a mode to display an image (e.g. "portrait", or "landscape"), which has the drawback of also renaming the mode in any other developer focused context, e.g. picking view modes to use in a list. In this case, I lose some of the contextual information that I may have placed in the name of the view mode (e.g. if it's responsive, image dimensions etc.). Or my other option is to create an entirely new display mode on the media entity that is maybe a duplicate of an existing view mode, which is additional work, and adds unnecessary complexity in an already complex system.

Proposed resolution

It would be great if in the field config, you can add overrides to the selected view modes names.

Remaining tasks

  • Design UI changes
  • Implement UI and config changes
  • Test backward compatibility

User interface changes

?

Comments

bburg created an issue. See original summary.

kyberman’s picture

Component: Code » User interface
Issue summary: View changes

Thank you, John. This sounds like a good addition, so patches are welcome!

Could you please elaborate on the UI changes as a starting point?
I can see multiple ways to improve the "Display mode" field settings - the easiest one could be a textarea of "display_mode_machine_name:new_name" mappings. Or something more complex is needed?