Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291583

Alignment being available as separate buttons AND in dropdown is confusing

$
0
0

Problem/Motivation

Noticed while reviewing #3259179: Split ckeditor5_alignment CKEditor 5 plugin, to allow for more precise upgrade path.

Alignment controls show up twice! They are present as dedicated toolbar buttons for given type of alignment, then they also present in a dropdown that includes all enabled alignment options.

Aside from this being noisy and feeling a bit "broken", this is especially confusing for non-sighted users that don't have the visual context clues to confirm these are duplicated controls in a slightly different package. It could be misinterpreted as a navigation bug - returning to an already-navigated element. It may also lead to the false impression that the control does something different without the visual cue of an identical icon.

CKEditor 5's default appears to be the dropdown https://ckeditor.com/docs/ckeditor5/latest/features/text-alignment.html

Steps to reproduce

Proposed resolution

  1. Keep the dropdown, lose the buttons
  2. Make the dropdown configurable (similar to headings), where the user can choose what alignment options will be available in the dropdown.
  3. Modify the upgrade path in \Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Core::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem() to instead generate the dropdown, and then also expand ::computeCKEditor5PluginSubsetConfiguration() to generate the appropriate configuration (much like headings).

Remaining tasks

- Implement UI to configure the alignments in the dropdown
- Implement an upgrade path from CK 4 to 5
- Implement an upgrade for already migrated CKE5 configs (to be defined, see #6)
- Implement test coverage both for the functionality and the CKE version upgrade
- Review that all until RTBC

User interface changes

Adds a configuration for the alignments (similarly to what headings does) in the text format configuration page when the alignment dropdown is added to the page.

API changes

The API will need to change in the CKE 4 to 5 upgrade path methods.

Data model changes

Release notes snippet

CKEditor 5 alignment was previously available via individual toolbar buttons or within a single dropdown. It is now only available via dropdown. Existing text formats using the individual buttons will automatically migrated to using the dropdown.


Viewing all articles
Browse latest Browse all 291583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>