Page MenuHomePhabricator

Edit a sentence: Support saving changes
Closed, ResolvedPublic

Description

As part of the "Edit a sentence" step (T251928) of the Section Translation mobile editor, users will be able to modify the translation with Mobile Visual Editor and persist the changes when taping "next".

Edit a sentence - Editor.png (768×1 px, 111 KB)

A separate task will support providing feedback for the user about the saving process (T259511).

More details in the parent task: T251928: Section Translation Editor: Edit a sentence

Event Timeline

Change 627944 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXEditor: Set edited translation state variable on edit completed

https://gerrit.wikimedia.org/r/627944

Change 627944 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXEditor: Set edited translation state variable on edit completed

https://gerrit.wikimedia.org/r/627944

Jpita added a subscriber: Jpita.

there's a white space after the "next" button that is not in the designs.

image.png (244×676 px, 24 KB)

Fixed here or different task @Pginer-WMF ?

Fixed here or different task @Pginer-WMF ?

Good catch. Mobile VE seems to adjust the toolbar to the viewport width, but our integration does not.
I'm inclined to create a separate task since getting into the VE internals may come with unexpected complications. I created the following one: T264015: The editing toolbar should adjust better to the screen width

I've reused your image, but feel free to add more details if needed.

moving back to QA for testing since before wasn't correctly deployed

saving process adds blank paragraphs.
(had to upload to google drive because the file was too big for phab)
https://drive.google.com/file/d/1vxGBTYlKPOK9STVbAO4e2AajPT6dSinS/view?usp=sharing
is this something to:

  • fix on our side on this task
  • other task
  • VE team

saving process adds blank paragraphs.

Good catch. @ngkountas, is this something that requires changes on VE or can be solved on our side? If it requires a more complex fix we can create a separate task.

There is also another aspect that we may want to adjust: taping "next" should add the changes to the translation directly.

  • Currently, after taping the "next" button, the user navigates to the previous screen and the changes are reflected in the card. At that point the user has to click "Apply" to add the changes to the translation and move to the next sentence.
  • However, the intended behavior is for the changes to be added to the translation automatically (i.e., no need for the user to "apply") to make the workflow more fluent.

I think the empty paragraphs may be caused by a Visua l Editor mechanism where paragraph placeholders (they call them "slugs") are shown for users to click and add content. This is a related ticket about how this was dealt with in Content Translation in case it is useful: T209479: "Insert paragraph" slug receives input focus

Change 640677 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SX Editor: Change editing result handling

https://gerrit.wikimedia.org/r/640677

This comment was removed by ngkountas.

Change 640677 merged by Nik Gkountas:
[mediawiki/extensions/ContentTranslation@master] SX Editor: Apply translation on VE next button click

https://gerrit.wikimedia.org/r/640677

found a different issue:
1-start a translation of the vlasovite article
2-select the section "structure"
3-edit the translation of the title
4-delete the whole word and save the translation
5-click "Done"
6-click the confirm button

  • Actual result

we get this error

image.png (386×458 px, 27 KB)

@ngkountas is this going to be fixed here or should I create a new ticket?

I think a separate ticket would be better as it doesn't seem to me like it falls in the same scope as this ticket. Apart from that, and given that current behaviour is not the desired one, I'm not sure which is the expected behaviour for this edge case. @Pginer-WMF could you clarify what should happen when user translates the section title but leave it blank after edit? Should we fallback to the original title? Should we block the user from going to the next step until they fix the section title?

I think a separate ticket would be better as it doesn't seem to me like it falls in the same scope as this ticket. Apart from that, and given that current behaviour is not the desired one, I'm not sure which is the expected behaviour for this edge case. @Pginer-WMF could you clarify what should happen when user translates the section title but leave it blank after edit? Should we fallback to the original title? Should we block the user from going to the next step until they fix the section title?

created T269398