Page MenuHomePhabricator

[S] Insert images with default alignment
Open, MediumPublic

Description

Background

When inserting an image from the app, users can choose the "image" option from the editor toolbar to select an image, add a caption and alt text, and then insert the preformatted wikitext. We have a set of default parameters that are applied across wikis, and they can be changed by the user by opening "Advanced Settings"

image.png (2×1 px, 108 KB)

We insert the right parameter as the default, regardless of if the language is Left-to-right or Right-to-left (RTL).
image.png (2×1 px, 410 KB)

According to https://www.mediawiki.org/wiki/Help:Images#Horizontal_alignment, the default horizontal alignment should be right for left-to-right languages, and left for right-to-left languages.

User stories

As a new editor on Arabic Wikipedia, I want to add images to articles in the correct way.
As an experienced editor on Hebrew Wikipedia using Add an Image, I want the default to be correct so I don't have to return to the article to correct the Wikitext each time after inserting an image.

Requirements
  • Ensure default alignment for images added through the apps is right for left-to-right languages, and left for right-to-left languages, unless the user selects a different alignment explicitly
References