pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

Feature: WarningFailedChecksComponent && update EditorMenu

Open RafaelJohn9 opened this issue 7 months ago • 2 comments

Fix #3625 ,

Still not complete due to the inability to reflect the changes locally in a browser.

I did try to restart the docker container, the dist/translate.js updated appropriately though on reloading the browser window, no changes reflected.

taking a look into it.

RafaelJohn9 avatar May 02 '25 12:05 RafaelJohn9

Addresses #3625 ,

Please use Fix #3625 instead.

mathjazz avatar May 07 '25 21:05 mathjazz

Current Solution

https://github.com/user-attachments/assets/e93b8d0c-1588-4e1d-bf7b-7e0a42421b23

RafaelJohn9 avatar May 15 '25 08:05 RafaelJohn9

Sorry this took too long 🤝

RafaelJohn9 avatar Aug 11 '25 12:08 RafaelJohn9

Hey @mathjazz ,

yeah it works !

Adding the FailedChecks there triggers the component, immediately the Editor is opened

https://github.com/user-attachments/assets/ee736286-f840-4fed-892c-d774b29dd8fd

--EDIT--

I'm open to ideas, if there is an alternative approach that I missed.

RafaelJohn9 avatar Aug 22 '25 16:08 RafaelJohn9

OK, that's great news! Please make sure however that there's only once that we reference the FailedChecks component in the editor - right now it's where you added it, and also in the EditorMenu component. We should be able to remove one of these.

mathjazz avatar Aug 22 '25 16:08 mathjazz

Hey @mathjazz ,

That's true, we can remove one of the FailedChecks, though I have encountered some issues if we introduce this feature (not sure if they are bugs.)

This feature merely shows the previous Failed Checks on the previous submission. Though

What if a user chooses to submit another translation before removing the popup ?

1) Having the two FailedChecks

With the two FailedChecks we have the following output for the issue above:

https://github.com/user-attachments/assets/cfa6d48a-6b97-40ab-a619-42f6fc5c3956

it might not be visible though I'm pressing Enter to submit a translation.

2) Having one FailedChecks

https://github.com/user-attachments/assets/25a2dd99-439f-4a6c-841b-781122259402

it might not be visible though I'm pressing Enter to submit a translation.

  • You can notice on # 2 we do not get the Warning before submission,

What do you suggest to be the best course of action ?

RafaelJohn9 avatar Aug 24 '25 19:08 RafaelJohn9

We could temp disable the shortcut when, FailedChecks component is on display

RafaelJohn9 avatar Aug 28 '25 05:08 RafaelJohn9

As soon as you start typing, the failed checks popup should disappear (same as with the unsaved changes popup).

In any case, there's no reason for two FailedChecks component. There should only be one and it should be fixed to show up always when needed and only when needed.

mathjazz avatar Aug 31 '25 21:08 mathjazz

awesome, lemme do that :handshake:

RafaelJohn9 avatar Sep 01 '25 06:09 RafaelJohn9

Hi @RafaelJohn9, thanks again for your work on this! Are you still planning to finish the PR? If you’ve run into any issues or need guidance, we’d be happy to help you wrap it up.

mathjazz avatar Oct 06 '25 10:10 mathjazz

hey @mathjazz ,

I apologize for holding up this PR for so long. I’ve been quite busy lately and may not be able to complete it soon, so I’ll close it to give someone else the chance to continue the work.

RafaelJohn9 avatar Oct 06 '25 18:10 RafaelJohn9