Changes between Initial Version and Version 1 of Ticket #11300


Ignore:
Timestamp:
Dec 12, 2013, 2:14:01 PM (7 years ago)
Author:
Olek Nowodziński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11300

    • Property Summary changed from Image2 in D8 to Image2: polishing and refactoring of internals
  • Ticket #11300 – Description

    initial v1  
    1 There's a couple of things to be done to match D8 requirements:
     1Some refactoring got to be done to make Image2 flexible and "environment-friendly". Those changes are relevant for third-party developers, e.g. for D8.
    22
    3 1. The internal form of the widget got to be styleable: instead of inline styles, we need to introduce classes.
    4  a. The non-captioned image has no class.
    5  b. The class of captioned image must be configurable via `config.image2_captionedClass`
    6  c. Tons of '''tests to be aligned''' to the new API.
     31. The internal form of the widget got to be styleable: instead of inline styles, we need to introduce classes. With inline styles, the look of the widget is not configurable and possibly incompatible with custom stylesheets during editor's lifetime.
     4 a. The non-captioned image should have no class.
     5 b. The class of captioned image must be configurable via `config.image2_captionedClass` and applied to `<figure class="...">`.
     6 c. Class "caption" is obsolete so it will be removed.
     7 d. Tons of '''tests to be aligned''' to the new API.
    78
    892. We should guarantee that additional attributes (e.g. `data-*`) are preserved, regardless of the internal state of the widget. Extra attributes must survive any kind of internal processing and re-emerge in editor's output (1:1).
    910 a. Quite likely it's already working because the image node in DOM is passed along with states of a widget ('''needs tests''').
    1011 b. Alternatively, attributes can be serialized in upcast, saved in widget's data and exploded while downcasting. But let's stick to (a) as an easiest "solution" first.
    11 
    12 3. Our static caption placeholder (the "Caption" text) is no solution for Drupal because e.g. it must disappear once editable gains focus. It is possible to implement that with CSS but we need to understand limitations of such approach (i.e. browser compatibility).
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy