Closed Bug 1646010 Opened 5 years ago Closed 5 years ago

[Translate] Refactor Editor code to use React hooks

Categories

(Webtools Graveyard :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adrian, Assigned: adrian)

References

Details

Attachments

(3 files)

In order to simplify adding new editor implementations to Pontoon — for example to run experimentation around Fluent support — we want to refactor the editor code to:

  • make it simpler to maintain
  • make it easier to implement a new editor
  • make it easier to integrate a new editor implementation

This involves rewriting most components in the Editor hierarchy to use hooks, as well as their associated unit tests. All features should work exactly the same as before.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

I've deployed the editor to prod and found a bug while doing my regular translate and review session.

A blank editor appeared. I found two ways to reproduce it.

In the meantime, I've reverted the patch from prod, but it remains deployed to stage.

Steps to reproduce 1/:

  1. Open any string.
  2. Click on the same string in the string list again.
  3. Expected result: String in the editor remains unchanged.
  4. Actual result: Editor becomes empty (textarea gets empty in case of generic editor, dark background appears in case of rich editor).

Steps to reproduce 2/:

  1. Open an unreviewed string in the rich editor, that is followed by a simple string.
  2. Approve it.
  3. Expected result: next string opens in the generic editor.
  4. Actual result: dark background appears.
Blocks: 1644202
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Found another bug:

In generic editor, COPY button copies FTL strings as source ("key = value" instead of just "value").

The button behaves as expected in the Rich and Source editors.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: