[Translate] Refactor Editor code to use React hooks
Categories
(Webtools Graveyard :: Pontoon, enhancement, P3)
Tracking
(Not tracked)
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.
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
•
|
||
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/:
- Open any string.
- Click on the same string in the string list again.
- Expected result: String in the editor remains unchanged.
- 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/:
- Open an unreviewed string in the rich editor, that is followed by a simple string.
- Approve it.
- Expected result: next string opens in the generic editor.
- Actual result: dark background appears.
Comment 4•5 years ago
|
||
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.
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Updated•4 years ago
|
Description
•