Mosaic: Handling of Images-/Files in Tiles

NOOOOO, my users love that, I'm going to cry :disappointed_relieved:. it was much easier to for the users. Plone user friendliness just went down a notch

(PS. I love Mosaic)

The implementation was complete orthogonal to all other content handling. It was not a field nor a own type. And I vote against all that introduces another way to store content.

Yes, we thought it would be more consistent to add/manage content like you do everywhere else on the site for images/files.

It's also consistent to have the users insert/add images from the WYSIWYG so you don't have multiple ways to add/manage images. That being said, I'm not strictly against re-adding a Image tile--it just needs to be done in a way where the images are normal content. It could also just be an addon.

1 Like

Before final 2.0 we should document, how to keep the deprecated tiles available in Mosaic editor, and even the they can really be removed only in a major standardtiles release and with a migration. So, most probably @rnunez can keep using image tiles for a long while.

My Editors use the Image Tile extensivly for Landing Pages. I would find it a little bit pity, if the Image Tile go away.

@1letter @rnunez do you specifically like the way the image and attachment tiles storage works or is it that you just want a specific tile to add an image instead of using rich text tiles?

I want this Tile not the technical specification.:slight_smile: My Editors understand the procedures, "I want add an Image" also "I use the Image Tile". I understand the use of RichText-Tile. But the Layout use a specific Slot, e.g. only an Image, the Editor should only add an Image not Text or other HTML Stuff.

3 Likes

Okay, I understand and that's reasonable enough.

1 Like

Just a specific tile to add an image and another for attachment (file) would do. I understand and agree with the change of storage but personally, I like the fact that the image/attachment follow the same permissions of the object and if you deleted the object it got rid of the image/attachment as well. Also, if you got rid of the tile it was gone, you would not have images/attachments polluting your site.

I usually use folderish types and upload the image as a subitem of the document - so it has same permissions (no own workflow on images/files) and it gets deleted with its parent..

And that also means you can never share images between pages.

However, maybe I have a skewed view of this since I'm trying to use mosaic for all content on my site whereas others might only be using it for a few pages.

And as @jensens suggests, this also maps better long term if can move to collapsing Page/Folder into one content type that is folderish.

Again, as @datakurre suggested, right now the tiles are hidden. You can still re-enable them.

I'm not saying to keep the tiles storage, I'm all in favor of using the image and files content types.

I just wanted to point out what I like about the tiles storage approach. But we do need an Image and File tiles that do not add the extra steps needed using RichText tiles.

Like @1letter said "I want this Tile not the technical specification.:slight_smile: My Editors understand the procedures"

1 Like

I'm interested on this discussion also; in the past we faced some nasty problems because we were storing images in tile annotations (see, for instance, this issue recently fixed: https://github.com/collective/collective.cover/issues/532).

we need to find a way to provide this feature while keeping the implementation details clear; image scaling is also an issue here.

Ok i have a question about the right use of "Video" Tile, with Wildcard.Media Addon. For me, the way it's unclear. What I have done so far:

  1. i enabled the Media-Button in the RichText Editor via registry.xml
    <!--  TinyMCE Toolbar Media Player Button Enable -->
    <records
        interface="plone.app.mosaic.interfaces.IFormat"
        prefix="plone.app.mosaic.richtext_toolbar.media">
        <value key="name">toolbar-media</value>
        <value key="category">actions</value>
        <value key="label">Edit Media</value>
        <value key="action">media</value>
        <value key="icon">false</value>
        <value key="favorite">false</value>
        <value key="weight">2000</value>
    </records>

    <record
        interface="plone.app.mosaic.interfaces.IWidgetAction"
        name="plone.app.mosaic.widget_actions.plone_app_z3cform_wysiwyg_widget_WysiwygWidget.actions"
        field="actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>
    
    <record
        interface="plone.app.mosaic.interfaces.IWidgetAction"
        name="plone.app.mosaic.widget_actions.plone_app_z3cform_wysiwyg_widget_WysiwygFieldWidget.actions"
        field="actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>
    
    <record
        interface="plone.app.mosaic.interfaces.IWidgetAction"
        name="plone.app.mosaic.widget_actions.plone_app_widgets_dx_RichTextWidget.actions"
        field="actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>
    
    <record
        interface="plone.app.mosaic.interfaces.IWidgetAction"
        name="plone.app.mosaic.widget_actions.plone_app_z3cform_widget_RichTextFieldWidget.actions"
        field="actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>
    
    <record
        name="plone.app.mosaic.structure_tiles.text.available_actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>
    
    <record
        name="plone.app.mosaic.app_tiles.plone_app_standardtiles_rawhtml.available_actions">
        <value purge="False">
            <element>toolbar-media</element>
        </value>
    </record>    
    <!--  /TinyMCE Toolbar Media Player Button Enable -->

My Raw HTML Code, copied from WildcardMedia Video Contenttype View

<video poster="../media/videos/imagetrailer/@@images/image" controls="controls">
  <source src="../media/videos/imagetrailer/@@view/++widget++form.widgets.IVideo.video_file/@@stream">
</video>

I paste the HTML Code via Embed-Tab, but the Transformation of HTML is only an Image-Tag, the same happens if i paste this Code via Raw-HTML Button of the Editor

<img class="mce-object mce-object-video" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-mce-p-controls="controls" data-mce-p-poster="../media/videos/imagetrailer/@@images/image" data-mce-html="%0A%3Csource%20src%3D%22../media/videos/imagetrailer/@@view/++widget++form.widgets.IVideo.video_file/@@stream%22%20/%3E" data-mce-object="video" data-mce-selected="1">

Then i use the Existing Content Tile and set the reference to the Video Contenttype. But the Heading "h1" is available. Thats not what i want. I hide this via CSS, but the Rule matched also when i use another "Existing Content Tile".

Any Ideas to solve this Problem?
What happens when i use the "Embeded Tile"? Should i write a Browser View which provide the JSON Structure for the "plone.app.standardtiles.embed" or should i write my own View for Wildcard Media Video Contenttype or have i miss an option to solve the Problem? A little confusion in my Head, sorry.

Update:
Ok, now i'm using TinyMCE, add an image with a Link and the Modal Pattern and load the #content-core from the WildcardMedia Contenttype in the Dialog. Not that really what i want, but its a first Workaround.

I just realized that the table and list are also gone :anguished:

It's in the rich text tile.

From a user perspective I can understand very well that explicit image, file, video, etc tiles are what they want.
I wouldn't want to add a richttext tile to be able to add an image or a video, which has nothing to do with text.

It's just that TinyMCE isn't just a text editor but a HTML editor, which is better in editing text than creating sophisticated HTML layouts. Even if it's a good HTML editor in comparison, it sucks in practice.

2 Likes

I know, but why do we have an embed if that also be done by rich text (Layout can also be done in rich text by editing the source).

I think it was a better user experience for non-tech when images, attachments(files), tables, and lists were inserted tiles way. Advanced users could still use the rich text as usual.

I disagree. It was extremely confusing for users to not be able to add a table/list/etc in rich text and then not be able to add different elements in their table/list/etc. It was very confusing. We're trying to simply the UI.

I think the least confusing is to have them as tiles that can be inserted either into a richtext tile or as its own seperate tile. Then there is no difference. Rich text should also be able to be dragged into its own tile.

1 Like

Plone Foundation Code of Conduct