Commit Graph

3786 Commits

Author SHA1 Message Date
Théo Poizat 7b3e3e1b16 Do not focus composer when clicking on tablet bottom bar button 2026-03-25 11:52:35 +07:00
Théo Poizat 0d7813c368 Display AI Scribe toggle in preferences in mobile
It has been forgotten when enabling AI Scribe in mobile.
2026-03-25 11:52:35 +07:00
Théo Poizat 03a03b9088 Fix Scribe on responsive mobile
- Button was not added in MobileResponsiveAppBar
- Mobile behavior related scripts were not correctly added for web composer
- Mobile behavior related scripts return value was not properly handled for web composer
- In responsive web, bottomsheet modal clicks were intercepted by iframe behind
2026-03-25 11:52:35 +07:00
Théo Poizat 46a12745a5 Ensure replace function respect new lines in every editor 2026-03-25 11:52:35 +07:00
Théo Poizat 7a6a49fc7b Display Scribe mobile (bottomsheet) only when responsive mobile
Previosuly, we display Scribe mobile (bottomsheet) if platform was mobile, so also Android or iOS tablet.

Now we choose to display Scribe mobile relatively to display screens instead of platform to display the desktop Scribe (context menu) for tablets.
2026-03-25 11:52:35 +07:00
Théo Poizat 40030fe88e Properly escape HTML in every Scribe actions
In recent commits I separated how we could add text in the editor. So
we need to escape HTML in both method that add text:
insertTextInEditor and setTextInEditor.

I had to extract the HTML escape part of
convertTextContentToHtmlContent because when using setTextInEditor we
do not need to convert \n to <br>.
2026-03-25 11:52:35 +07:00
Théo Poizat cf8ed16ed0 Use warning logs instead of error logs for Scribe 2026-03-25 11:52:35 +07:00
Théo Poizat c05a01d92a Move Scribe icon in tablet at left of icons 2026-03-25 11:52:35 +07:00
Théo Poizat b5606626f4 Fix more Scribe mobile issues
- Add getSavedSelection to check saved selection without consuming it
- Distinguish between setText (replace all) and insertText (at cursor) operations
- Fix replace callback to use setText when no selection exists
- Clean up saved selection state after restoration in HTML utils
- Move mobile editor focus and selection restore to appropriate callbacks
2026-03-25 11:52:35 +07:00
Théo Poizat be7f28f270 Fix Scribe mobile issues
- Fix Scribe replace on mobile when opened from menu bar (to be complete
this fix needs this PR https://github.com/Enough-Software/enough_html_editor/pull/37)
- Ensure all mobile editor call are awaited
- Do not clear text if a selection has been restored (which mean we replace a selection)
- Avoid collapseToEnd crash
2026-03-25 11:52:35 +07:00
Théo Poizat 752f42dc7d Ensure editor is focused before calling insert HTML
enough_html_editor uses execCommand to insert HTML. However
execCommand only works if the contenteditable element is focused. So
inserting or replacing Scribe result do not work if the user did not
click before in the composer.

Here we manually focus the contenteditable element to fix this before
inserting content.
2026-03-25 11:52:35 +07:00
Théo Poizat 84176cb113 Hide keyboard and selection icons when Scribe mobile modal opened
When opening Scribe mobile modal, we now unfocus the composer to hide the keyboard and the selection start and end icons from the OS.

Add new methods to save, restore, and clear text selection in HTML editor. These methods allow preserving and restoring user selection state when opening the Scribe mobile modal so that the "replace" action still works.
2026-03-25 11:52:35 +07:00
Théo Poizat 245dfc714d Display sparkle button in mobile app bar to launch AI Scribe
- Same icon than for desktop
- Displayed only if AI Scribe is enabled
2026-03-25 11:52:35 +07:00
Théo Poizat b28dea732a Fix AI Scribe overlay button display in iOS
The button was never displayed because the selectionchange event listener was loaded when the WebView was not entirely loaded so selectionchange event were never fired.

Now we setup selection listener when the WebView is loaded instead of created.
2026-03-25 11:52:35 +07:00
Théo Poizat 03c70922a0 Fix selection coordinates in mobile
Because the HTML editor is different, we need a different selector to get the editable element.

We also need to add a small offset to the coordinates to avoid positionning the overlay icon above native selection UI in mobile. For example, Android adds a marker at the beginning and the end of the selection and we do not want to display the Scribe overlay icon above this marker.
2026-03-25 11:52:35 +07:00
Théo Poizat 9e601caa86 Enable AI scribe in mobile 2026-03-25 11:52:35 +07:00
Dat Vu 8fff83a735 [HOT-FIX] Download attachment is failed on iOS (#4405) 2026-03-24 22:16:43 +07:00
Dat Vu 8a9901a0a4 TF-4384 Fix page not found 404 error when refreshing label views (#4390) 2026-03-21 17:23:18 +07:00
dab246 651115c304 TF-4368 Auto trigger load more when get all email return < 20 emails 2026-03-20 10:15:13 +07:00
dab246 2d19bc908d TF-4368 Add more log trace for getAllEmail & forceQueryAllEmailsForWeb 2026-03-20 10:15:13 +07:00
dab246 9854592a4c TF-4368 Add more log trace for load more email 2026-03-20 10:15:13 +07:00
dab246 cdc7d711f5 TF-4368 Add log to tracing refresh change emails on Sentry 2026-03-20 10:15:13 +07:00
dab246 a28d5b3527 TF-4368 Fix cannot scroll in email list 2026-03-20 10:15:13 +07:00
dab246 e2c158d633 TF-4373 Add E2E test for test case delete thread to trash on mobile 2026-03-12 15:15:03 +07:00
dab246 bb9dca10de TF-4373 Fix deletion is not working when thread is enabled 2026-03-12 15:15:03 +07:00
dab246 d256b5ca52 TF-4367 Update logic apply Reply/Forward prefix for subject when compose email 2026-03-11 13:33:28 +07:00
dab246 4a94f088d5 TF-4367 Fix duplicated Re: prefix when reply email with French locale 2026-03-11 13:33:28 +07:00
dab246 b7594a4adb fix: The message field in UnknownRemoteException is typed as String? and the condition will always be false. 2026-03-10 11:06:16 +07:00
dab246 572bf6ba81 fix: The code parameter must be propagated through the inheritance chain. 2026-03-10 11:06:16 +07:00
dab246 8a21e35d1e fix: Prefer reusing AppBaseException instead of redefining the exception contract CacheException and RemoteException 2026-03-10 11:06:16 +07:00
Dat H. Pham 236ad5f075 Override props method for CacheException 2026-03-10 11:06:16 +07:00
Dat H. Pham 3e39f59f20 Fixup Constant some token exception 2026-03-10 11:06:16 +07:00
dab246 437c46f5ff fix(sentry): resolve minified exception types on web release 2026-03-10 11:06:16 +07:00
dab246 2e8a11e7eb refactor(sentry): standardize exceptions to prevent Sentry minification 2026-03-10 11:06:16 +07:00
dab246 777b47159d TF-4354 Remove all logic related to Label Visibility in Settings 2026-03-05 10:32:56 +07:00
dab246 de083b3aff TF-4354 Hide Label in Preference View when label capability is not supported 2026-03-05 10:32:56 +07:00
dab246 3cdf65866a TF-4354 Activate Label by default for all users 2026-03-05 10:32:56 +07:00
dab246 8187040b10 feat(Label): fix miss inject websocket when label setting not change 2026-03-05 10:32:56 +07:00
dab246 b2338a1160 feat(Label): Use capability-aware label availability in websocket injection. 2026-03-05 10:32:56 +07:00
dab246 2e6e1fcdc8 feat(Label): Add depend on settings to register websocket for label 2026-03-05 10:32:56 +07:00
dab246 a70a338608 feat: Use execute in parallel for faster request time 2026-03-05 10:32:56 +07:00
dab246 add55a9d55 feat: Use min for easier to read 2026-03-05 10:32:56 +07:00
dab246 41817091c1 feat: Fix loop uses sinceState instead of newSinceState, causing infinite loops. 2026-03-05 10:32:56 +07:00
dab246 4fea45d062 feat: Persist label state after get all labels 2026-03-05 10:32:56 +07:00
dab246 9c211c05ef feat: Auto sync label from web socket 2026-03-05 10:32:56 +07:00
dab246 c49e48ae1b feat: Add repository/interactor for get label changes 2026-03-05 10:32:56 +07:00
dab246 987ea410c5 feat: Implement get label changes 2026-03-05 10:32:56 +07:00
dab246 73134d2833 TF-4303 Change order for label action 2026-03-05 10:32:56 +07:00
Dat Vu 084c98865b fix(web): Cannot typing text when create new rule filter on Safari (#4350) 2026-02-27 14:52:33 +07:00
Dat Vu d785e6a879 fix(web): Cannot typing text when create new folder on Safari for the first time (#4349) 2026-02-27 14:07:51 +07:00