Closed Bug 1019076 Opened 10 years ago Closed 10 years ago

Flash of Cancel button when opening Dialer

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

defect
Not set
normal

Tracking

(b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S3 (6june)
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: rik, Assigned: rik)

References

Details

Attachments

(1 file)

This was previously not showing up because the form was using a hidden attribute. But in bug 1013330, we switched to aria-hidden so it is showing up. I think we should switch to using an imported element (because it is not useful during app startup).
Assignee: nobody → anthony
Status: NEW → ASSIGNED
Attachment #8433946 - Flags: review?(drs+bugzilla)
Target Milestone: --- → 2.0 S3 (6june)
I'm not sure that this is really necessary. What do you think of just applying both the |hidden| and |aria-hidden="true"| attrs together? We can unapply the |hidden| attr on a |setTimeout(0)|, or on the first |LazyLoader.load()| call.
That would also work but it is still more tasks for Gecko On startup than not loading more DOM.
(In reply to Anthony Ricaud (:rik) from comment #3)
> That would also work but it is still more tasks for Gecko On startup than
> not loading more DOM.

I'm not sure I follow since either way requires one task, and I'm sure that lazyloading fragments is way more expensive than queuing up and running a setTimeout(). But there's also the issue code complexity. Loading a fragment for what is effectively 3 lines of HTML seems like overkill to me, especially for something that we never expect to be duplicating. If we use a setTimeout() or LazyLoader.call(), we can comment directly above it and that will tell us in the future exactly what's going on, even if it's a little bit dirty.
I want to move into a direction where we "componentize" our code base. This makes unit testing more accurate since it is testing the real HTML that we ship instead of a copy that can be out of date.
(In reply to Anthony Ricaud (:rik) from comment #5)
> I want to move into a direction where we "componentize" our code base. This
> makes unit testing more accurate since it is testing the real HTML that we
> ship instead of a copy that can be out of date.

Making major and dubious design and perf decisions to make testing slightly cleaner is a good sign that we're doing something wrong. In this patch, we're actually adding ~3x more code than we're removing from the test files, despite factoring out the actual HTML itself.
Clean code is not less lines of code. Also, I said that it makes testing more accurate, not cleaner.

An evolution to have less lines of code would be enabling nested "elements".
Comment on attachment 8433946 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/19985

Okay, I still don't really like this, but I don't think it's worth arguing more about. The work is already done too.

I wish we didn't have to set all of the props in the test, but I can't see a way around that.
Attachment #8433946 - Flags: review?(drs+bugzilla) → review+
https://github.com/mozilla-b2g/gaia/commit/d5f13789f92116ea56c6bd1aed385be38bc1177a

I don't like setting all those attributes either. I should look at web components to see if they can help with that.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: