Closed Bug 1122512 Opened 6 years ago Closed 6 years ago
[Messages][Drafts] Unsaved draft is silently discarded when user goes to report or participants panel
It's a regression from bug 1091486. STR: * Open Messages app and navigate to any active thread; * Enter some text into message input; * Long tap on any existing message in the thread and choose "View message report"; * or if it's group MMS tap on header to enter participants view; * Exit from report or participants panel; Expected result: user should see his message draft created on step #2 above; Actual result: unsaved draft is silently discarded when user navigates to report or participants panel; The patch for this bug should definitely include integration tests.
Hey Salva, could you please look into that? If you don't have time, please let us know and we try to fix it by ourselves in the next sprint. Thanks!
I'll take a look next Monday. Assigning to me. If you thinks this is too late, steal it! Have a good weekend.
Assignee: nobody → salva
(In reply to Salvador de la Puente González [:salva] from comment #2) > I'll take a look next Monday. Assigning to me. If you thinks this is too > late, steal it! Have a good weekend. That's perfectly fine. Thanks, Salva!
Oleg, I wonder if the draft saving mechanism should be in onBeforeLeave, so that it could be shared between all cases?
Actually, this is not related with drafts but with clearing the input, precisely becaus I moved that code to the before-leave hook. I'm going to try to restore the former behaviour but it does not involve drafts.
Hi Oleg Here you have the patch restoring the functionality. Woould you mind to review it?
Attachment #8551303 - Flags: review?(azasypkin)
Comment on attachment 8551303 [details] [review] Preservint message input text when navigating to report or group details (In reply to Julien Wajsberg [:julienw] from comment #4) > Oleg, I wonder if the draft saving mechanism should be in onBeforeLeave, so > that it could be shared between all cases? I'm afraid that it won't be called for activity case then. But agree, ideally I would like to call navigation lifecycle methods for activity case too (before-/afterLeave) so that we can proper save and clean-up things in single place. (In reply to Salvador de la Puente González [:salva] from comment #5) > Actually, this is not related with drafts but with clearing the input. Well, clearing the input actually silently and permanently discards draft if thread has it :) Regarding the patch - I think it's good! Just left few nits in tests at GitHub before we can land. Also note that composer tests are currently disabled on Treeherder so that we can rely only on local run for now, see bug 1121766 for details. Thanks!
Attachment #8551303 - Flags: review?(azasypkin) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment on attachment 8551303 [details] [review] Preservint message input text when navigating to report or group details [Approval Request Comment] [Bug caused by] (feature/regressing bug #): bug 1091486 [User impact] if declined: high, some messages will be discarded upon certain user actions. [Testing completed]: yes, with integration and unit tests [Risk to taking this patch] (and alternatives if risky): low [String changes made]: none
Attachment #8551303 - Flags: approval-gaia-v2.2?
Attachment #8551303 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
This issue is verified fixed on Flame 2.2 and Master. Result: The draft is saved properly when the user returns form the message report. Device: Flame 2.2 (319mb, full flash) Build ID: 20150130002501 Gaia: d6141fa3208f224393269e17c39d1fe53b7e6a05 Gecko: 63b63054948d Gonk: e7c90613521145db090dd24147afd5ceb5703190 Version: 37.0a2 (2.2) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0 Device: Flame Master (319mb, full flash) Build ID: 20150130010210 Gaia: 8238eeacc7030b2cdbf7ab4eba2f36779b702599 Gecko: 29b05d283b00 Gonk: e7c90613521145db090dd24147afd5ceb5703190 Version: 38.0a1 (3.0) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.0
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
You need to log in before you can comment on or make changes to this bug.