{"action":"created","issue":{"url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/127","labels_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/127/comments","events_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/127/events","html_url":"https://github.com/plone/plone.app.mosaic/issues/127","id":102137537,"number":127,"title":"Implement a \"FieldCompoundTile\" and a \"BehaviorTile\"","user":{"login":"rnixx","id":246021,"avatar_url":"https://avatars.githubusercontent.com/u/246021?v=3","gravatar_id":"","url":"https://api.github.com/users/rnixx","html_url":"https://github.com/rnixx","followers_url":"https://api.github.com/users/rnixx/followers","following_url":"https://api.github.com/users/rnixx/following{/other_user}","gists_url":"https://api.github.com/users/rnixx/gists{/gist_id}","starred_url":"https://api.github.com/users/rnixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnixx/subscriptions","organizations_url":"https://api.github.com/users/rnixx/orgs","repos_url":"https://api.github.com/users/rnixx/repos","events_url":"https://api.github.com/users/rnixx/events{/privacy}","received_events_url":"https://api.github.com/users/rnixx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-20T13:23:01Z","updated_at":"2015-08-20T13:25:21Z","closed_at":null,"body":"While working on a p.a.mosaic integration with @agitator we encountered the need for more complex tiles.\r\n\r\nUsecases:\r\n\r\n* Edit date range data (plone.app.event)\r\n* Display summary event details (plone.app.event)\r\n* Edit some control data for standard fields (like scale for a lead image)\r\n\r\nThe related fields should show up in the tile edit form and the fields should be available in the data attribute of the tile for displaying.\r\n\r\nThe concrete field compound tile may be a subclass with an attribute compound_fields or similar defining which fields get included, e.g.:\r\n\r\n```\r\nclass MyCompoundTile(FieldCompoundTile):\r\n    compound_fields = [\r\n        'title',\r\n        'IEventBasic.start',\r\n        'IEventBasic.end',\r\n        'IEventBasic.whole_day',\r\n        'IEventRecurrence.recurrence'\r\n    ]\r\n```\r\n\r\nIf given entry is dot seperated, i points to a behavior.\r\nIf not, it's a field name of the base type.\r\n\r\nNote: When adopting latest plone.behavior changes to existing standard behaviors (PLIP 20239, https://github.com/plone/plone.behavior/pull/2 ), the behavior identification can be done with the name instead of the interface (), i.e. 'event_basic.start'.\r\n\r\nRespective, if a BehaviorTile is desired as well, a concrete class may look like:\r\n\r\n```\r\nclass MyBehaviorTile(BehaviorTile):\r\n    behavior = 'event_basic'\r\n```\r\n\r\nor via interface...\r\n\r\n```\r\n@adapter(IEventBasic)\r\nclass MyBehavior(BehaviorTile):\r\n    pass\r\n```\r\n\r\nNo idea whether it can be implemented using adapter decorator though.\r\n\r\nWhen implementing all this there should also be the possibility to reduce single field type choice and another category should be added for compound/behavior tiles.\r\n\r\n@datakurre @pbauer \r\n\r\nWhat are you thinking about this?"},"comment":{"url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/comments/133006093","html_url":"https://github.com/plone/plone.app.mosaic/issues/127#issuecomment-133006093","issue_url":"https://api.github.com/repos/plone/plone.app.mosaic/issues/127","id":133006093,"user":{"login":"agitator","id":365761,"avatar_url":"https://avatars.githubusercontent.com/u/365761?v=3","gravatar_id":"","url":"https://api.github.com/users/agitator","html_url":"https://github.com/agitator","followers_url":"https://api.github.com/users/agitator/followers","following_url":"https://api.github.com/users/agitator/following{/other_user}","gists_url":"https://api.github.com/users/agitator/gists{/gist_id}","starred_url":"https://api.github.com/users/agitator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agitator/subscriptions","organizations_url":"https://api.github.com/users/agitator/orgs","repos_url":"https://api.github.com/users/agitator/repos","events_url":"https://api.github.com/users/agitator/events{/privacy}","received_events_url":"https://api.github.com/users/agitator/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T13:25:21Z","updated_at":"2015-08-20T13:25:21Z","body":"yesss!"}}