[MTE-105] Fix dx problems with image block Created: 10/Aug/17 Updated: 18/Oct/17 Resolved: 17/Aug/17 |
|
| Status: | Closed |
| Project: | Magnolia Templating Essentials |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.4, 1.2 |
| Type: | Story | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Maxime Michel |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Release notes required: |
Yes
|
| Documentation update required: |
Yes
|
| Epic Link: | Content Editor fine-tuning |
| Sprint: | Basel 109 |
| Story Points: | 3 |
| Description |
|
The standard blocks will be available in the stock stories app and should be as developer friendly as possible. The image block has two problems. The simple problem is that the css class of the image is "lead-image" which does not make sense. It should probably simply be blank. The main problem is that the basic HTML structure changes depending on whether the image block (or the asset it exposes) has a caption or credit supplied (A wrapping div is either present or not). This makes any CSS or JS much harder to develop and test - and a developer might not even realize that the HTML structure changes - ie they are developing a project and no one has supplied any caption or credit - they launch the project, then an author adds a caption to an image and breaks the website. This problem exists in the mtk image macro, which is used by the image block. New structure Possible approaches: Modify the mtk image macro to accept a new parameter (or a new template definition parameter) to change the wrapping behaviour. |
| Comments |
| Comment by Christopher Zimmermann [ 10/Aug/17 ] |
|
Maybe defintiion parameter alwaysWrap=true? |