Closed Bug 1084173 Opened 10 years ago Closed 9 years ago

[Midori 2.0][SMS]The title of Messages appears to move quickly.

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1089920

People

(Reporter: sync-1, Unassigned)

References

Details

Attachments

(3 files)

70.35 KB, image/png
Details
59.50 KB, image/png
Details
23.45 KB, application/octet-stream
Details
Mozilla Build ID: 20140916000205
 Created an attachment (id=971716)
 issue_pic
 
 DEFECT DESCRIPTION:
 The title of Messages appears to move quickly.
 
  REPRODUCING PROCEDURES:
 1.Launch messages app for the first time;
 2.The title of Messages appears to move quickly.-->KO
 
  EXPECTED BEHAVIOUR:
 The title of Messages remain unchanged.
 
  ASSOCIATE SPECIFICATION:
 
  TEST PLAN REFERENCE:
 
  TOOLS AND PLATFORMS USED:
 
  USER IMPACT:Medium
 
  REPRODUCING RATE:5/5
 
  For FT PR, Please list reference mobile's behavior:
Attached image issue_pic1
Attached image issue_pic
Attached file PR808090_jrdlog
NI Wilson.

Do you think this happens because of the synchronous reflow triggered by the gaia-header component?

I really don't think we want to change this in 2.0 though :/
Flags: needinfo?(wilsonpage)
(In reply to Julien Wajsberg [:julienw] from comment #4)
> NI Wilson.
> 
> Do you think this happens because of the synchronous reflow triggered by the
> gaia-header component?
> 
> I really don't think we want to change this in 2.0 though :/

The gaia-header component didn't actually make it into v2.0, so this logic is taken care of by the earlier headers.css and shared/js/font_size_utils.js.

We are seeing the header painted before the font-fit logic has calculated and set the size/position of the title text. I haven't seen this before, is it running on a particularly low-end device?

One solution would be to hide the text (via visibility/opacity), until positioning is complete.
Flags: needinfo?(wilsonpage)
We can add the computed result in to html to fix this problem.
diff --git a/apps/sms/index.html b/apps/sms/index.html
index 7319a44..0b7ad1f 100644
--- a/apps/sms/index.html
+++ b/apps/sms/index.html
@@ -102,7 +102,7 @@
               <span class="icon icon-options"></span>
             </a>
           </menu>
-          <h1 data-l10n-id="messages">Messages</h1>
+          <h1 data-l10n-id="messages" style="margin-left: 100px">Messages</h1>
         </header>
         <article id="threads-container" class="view-body edit-container" data-type="list">
         </article>
--
The main issue is that this margin is likely dependent on the locale :/
(In reply to Wilson Page [:wilsonpage] from comment #5)
> (In reply to Julien Wajsberg [:julienw] from comment #4)
> > NI Wilson.
 
> We are seeing the header painted before the font-fit logic has calculated
> and set the size/position of the title text. I haven't seen this before, is
> it running on a particularly low-end device?

I vaguely remember that I even saw this on relatively low-end device buri(haven't used it for long time, and I don't have a usable one right now :/), but I can't reproduce on flame, so probably just like wilson said in comment 5. Just curious that it seems a general issue for all the header, does it reproducible in other apps like contacts? Ni? partner about the target device spec and behavior in other apps.
Flags: needinfo?(sync-1)
(In reply to Steve Chung [:steveck] from comment #8)
> (In reply to Wilson Page [:wilsonpage] from comment #5)
> > (In reply to Julien Wajsberg [:julienw] from comment #4)
> > > NI Wilson.
>  
> > We are seeing the header painted before the font-fit logic has calculated
> > and set the size/position of the title text. I haven't seen this before, is
> > it running on a particularly low-end device?
> 
> I vaguely remember that I even saw this on relatively low-end device
> buri(haven't used it for long time, and I don't have a usable one right now
> :/), but I can't reproduce on flame, so probably just like wilson said in
> comment 5. Just curious that it seems a general issue for all the header,
> does it reproducible in other apps like contacts? Ni? partner about the
> target device spec and behavior in other apps.

No, it just can be reproduced in sms app.
I think this happens especially in the SMS app because we add more data to the DOM before gaia-header tries to measure things. As a result, a reflow happens.

I'll ask some layout guys, maybe our CSS can be improved to prevent this, or maybe we need platform support.
(In reply to Julien Wajsberg [:julienw] from comment #10)
> I think this happens especially in the SMS app because we add more data to
> the DOM before gaia-header tries to measure things. As a result, a reflow
> happens.
> 
> I'll ask some layout guys, maybe our CSS can be improved to prevent this, or
> maybe we need platform support.

I think deferring the large job of populating the message list for just a few milliseconds will give the font-fit logic an earlier turn in the event loop. I played around with this briefly and found populating the messages list after `window` 'load' fixed a similar issue.
We have fixed this bug, it's not a bug for us any more.
Tianm, can you please explain how you fixed this bug?
Flags: needinfo?(tianm)
--- a/apps/sms/index.html
+++ b/apps/sms/index.html
@@ -102,7 +102,7 @@
               <span class="icon icon-options"></span>
             </a>
           </menu>
-          <h1 data-l10n-id="messages">Messages</h1>
+          <h1 data-l10n-id="messages" style="margin-left: 100px">Messages</h1>
         </header>
         <article id="threads-container" class="view-body edit-container" data-type="list">
         </article>
--
Flags: needinfo?(tianm)
(In reply to Julien Wajsberg [:julienw] from comment #13)
> Tianm, can you please explain how you fixed this bug?

Add the moving distance in the html could avoid the computing delay.
Flags: needinfo?(sync-1)
Tianm, did you try in other languages that don't use "Messages" as title?
(In reply to Julien Wajsberg [:julienw] from comment #16)
> Tianm, did you try in other languages that don't use "Messages" as title?
Yes, I think you're right, it behaves well mostly,but in some special langage,such as Arabic, it can't work.
See Also: → 1089920
I think it's now fixed by bug 1089920.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: