Fixed some bugs in gaia master


(Julien Wajsberg) #1

Hey,

TL;DR: if like me you still use your Firefox OS phone because, well, it
works well, and you’re not interested in Pokemon Go, I went ahead and
fixed some of my most frustrating bugs that were in Gaia master.

You can find my code there:

So I’m still using my Firefox OS phone for several reasons: it works for
me, I could potentially fix bugs on it, it’s nice, it’s not tracking me.
I got bored of telling my friends “I’m using it because I could fix bugs
but I don’t have the time right now” and I decided to actually fix some.

Because my free time is currently very limited I didn’t take the time to
write or update tests for this. Still I wanted to bring these changes to
the list in case other users are interested like me. And maybe the team
working on the transition will want to take them or some of them.

So here are my fixes:

  • build system: a late change made restarting an app after pushing it
    to the device broken. Note: it’s still broken for other reasons that
    I haven’t debugged yet.
  • system (note: l10n change): add a title to the captive portal
    notification. This one was driving me crazy for a very long time
    because it was so disgraceful. But in the latest months there was a
    change that showed “undefined” instead of nothing as a title. This
    was it and I added this.
  • keyboard: for some months we couldn’t revert the suggestion when the
    first word in an input was corrected. I’m still not sure why it’s
    happening in this case only, I think this is a gecko deeper issue
    but I went ahead and implemented what was suggested in the keyboard
    code.
  • intl: before we stopped there was an ongoing effort to port our l10n
    usage to l20n and gecko’s Intl implementation. But latest commit had
    some bugs or behaviors I didn’t want:
    o relative time format used {} as placeholders instead of {{}}. As
    a result they were not replaced.
    o l20n.js is replacing a l10n-id without any translation by the id
    itself. While I understand the rationale this is breaking the
    quck settings extension, so I changed the behavior to the
    previous one: silently ignoring.
  • search engines: I added Qwant

This comes with the only warranty that it works for me.

What will be my next changes ? I honestly don’t know. I’ll see what
frustrates me the most. Also I’m stuck with this version of gecko of
last March for now.

Here are the things from the top of my head, not especially in this order:

  • actually fixing the build system to restart apps after pushing
    (first point above)
  • keyboard: after selecting a correction on the suggestion bar, a
    space is added automatically, which is not right if we want to add a
    point. Instead we should wait and see what’s the next character
    added by the user, and if it’s not a punctuation add a space at
    that time
    .
  • go back to the older homescreen with groups, the new one is useless.
    And in the same time removing the “pin website” feature from
    browser, merely keeping “add to homescreen”.
  • understand why my geolocation doesn’t work at all
  • implement seconds in the clock’s timer
  • allow “(123) 123 123” phone numbers to be recognized in the SMS
    application (very old request by dholbert, very easy, yet nobody
    from the community managed to implement it)

I accept PR on this branch :slight_smile: although I don’t expect to receive any.

What are the next later steps ? I have ideas but I don’t know if I’ll
ever be able to do them.

For things like the SMS app, I think (like others, I know it’s not
something new) that a web server on the phone would be useful, so that
we don’t rely on proprietary APIs. Yet while some favor a nodejs server,
I think a Rust-based server would be better-suited:

  • smaller footprint
  • can link to binary easily
  • memory-safe

Either several microservers on different domains, or one server with
several endpoints. The first solution seems more flexible to me.

I’m not sure how this fits to the whole migration process as I haven’t
followed anything. So feel free to disagree with me, anyway I won’t
argue with you :slight_smile:

I hope this has been useful to some, thanks for reading !

Julien


(Fabrice) #2

Very cool Julien! Can you rebase your changes on the kanikani branch since it hasn’t been merged yet into master?


(Fabrice) #3

Oh, and I forgot to comment on that:

I agree in general that we should just write this backend in Rust, likely with a websocket connection to the web runtime. That should be relatively easy for things like wifi. However for everything RIL-related, porting the current worker is not a small task (see how much is going on in http://searchfox.org/mozilla-central/source/dom/system/gonk/ril_worker.js)


(Julien Wajsberg) #4

I just want to comment quickly on my affirmation that “the new homescreen is useless”. I didn’t mean to offend anyone and it was really “useless for me”.

A few very subjective thoughts on this:

  • I’m still using the homescreen from last march’s build. Chris told me some things were implemented since then, so I’ve yet to try it. So following comments may be untrue with last master.
  • I never liked the second panel with the “pinned sites”. It’s a disturbance on the homescreen itself, it’s an annoyance in the Browser.
  • we can’t put icons like we want. Especially we can’t add space. It means that if we have a lot of icons, this is very painful to find them back.
  • I really liked the previous homescreen’s capability to fold groups. I miss this a lot.


Julien


(Julien Wajsberg) #5

Can you rebase your changes on the kanikani branch since it hasn’t been merged yet into master?

I rebased there:

I left the first commit out because it seems the breaking commit is not in kanikani.


Julien


(Julien Wajsberg) #6

That’s right, the RIL is an enormous beast. It would be a very good idea to rewrite it in Rust though, but I don’t see this happening before a few years :D.

Server-side, a message queue could be a good idea so that we can at least uncouple the RIL from other components.


(Ben Francis) #7

Yes, just to warn you that now pine is merged into mozilla-central, @albertopq is about to replace master with kanikani.

You’ll find that kanikani currently has far fewer features than master because it runs with the new architecture on the latest mozilla-central. That means there’s no app runtime or app permissions model, just system chrome and standard web content (like Firefox).

At the moment many apps like SMS are disabled in kanikani but there’s ongoing work to get them working with the new architecture. Your help with this would be greatly appreciated!

I completely agree about replacing proprietary DOM APIs with local web services, in fact as a first step as part of Project Tablet, Thomas landed a proof of concept Node web service which allows the configuration of WiFi without using Gecko’s WiFi API https://github.com/mozilla-b2g/platform_system_devicesvcd/tree/project-tablet Ask Alex to show you this working on the tablet prototype!

I am still using Firefox OS (2.5) as my everyday phone :slight_smile: I hope that the current master will eventually reach the point where I can replace it.

It’s awesome that you’re hacking on B2G again, but the best chance it has of surviving is if you contribute to kanikani (which will soon be the new master) rather than your own branch.

Thanks

Ben

P.S. You’ll notice that the tablet UI has just pinned sites on the homescreen and bookmarks in the awesomescreen. I agree the 2.5 homescreen had too many compromises.


(Julien Wajsberg) #8

Hey,

Just want to make myself clear: the work I’m doing is in the pure open source style. I’m doing it because it’s useful for me, and I share it to the world because others might be interested. That’s all the time I got at the moment, sorry. (Organizing the Paris-Web conference takes up all my time).

I’m more than happy if somebody can take this work and apply it on kanikani. I did the rebase already but I’m sure this doesn’t fit all the quality requirement. And I won’t have the time to work to fit them.

I still hope you’ll use my branch (or part of my branch) on your 2.5 phone, waiting for the next phase :slight_smile:


Julien


(Gabriele Svelto) #9

TL;DR: if like me you still use your Firefox OS phone because, well, it
works well, and you’re not interested in Pokemon Go, I went ahead and
fixed some of my most frustrating bugs that were in Gaia master.

You can find my code there:
https://github.com/mozilla-b2g/gaia/compare/master...julienw:julien-fixes

why don’t you shoot some PRs master’s way, I’m ready to review them ASAP :slight_smile:

  • keyboard: after selecting a correction on the suggestion bar, a
    space is added automatically, which is not right if we want to add a
    point. Instead we should wait and see what’s the next character
    added by the user, and if it’s not a punctuation add a space at
    that time
    .

or remove the space if the user types a punctuation character, I’ve seen
it done on Android keyboards for example.

For things like the SMS app, I think (like others, I know it’s not
something new) that a web server on the phone would be useful, so that
we don’t rely on proprietary APIs. Yet while some favor a nodejs server,
I think a Rust-based server would be better-suited:

  • smaller footprint
  • can link to binary easily
  • memory-safe

Either several microservers on different domains, or one server with
several endpoints. The first solution seems more flexible to me.

That’s definitely something we want to do and I’m starting to feel that
we don’t want to go the nodejs but we can still use JavaScript via a
stand-alone SpiderMonkey instance if need be.

Gabriele


(Julien Wajsberg) #10

[gsvelto] gsvelto
https://discourse.mozilla-community.org/users/gsvelto Gabriele
Svelto https://discourse.mozilla-community.org/users/gsvelto
July 28

TL;DR: if like me you still use your Firefox OS phone because,
well, it
works well, and you're not interested in Pokemon Go, I went ahead and
fixed some of my most frustrating bugs that were in Gaia master.

You can find my code there:

github.com
<https://github.com/mozilla-b2g/gaia/compare/master...julienw:julien-fixes>



      mozilla-b2g/gaia
      <https://github.com/mozilla-b2g/gaia/compare/master...julienw:julien-fixes>

gaia - Gaia is a HTML5-based Phone UI for the Boot 2 Gecko
Project. NOTE: For details of what branches are used for what
releases, see

why don’t you shoot some PRs master’s way, I’m ready to review them
ASAP :slight_smile:

because no test change; moreover I thought master is going to die ?

  * keyboard: after selecting a correction on the suggestion bar, a
    space is added automatically, which is not right if we want to
    add a
    point. Instead we should wait and see what's the next character
    added by the user, and if it's not a punctuation add a space _at
    that time_.

or remove the space if the user types a punctuation character, I’ve seen
it done on Android keyboards for example.

That was my first idea, but when I started to wrote it here, I thought
it was better and easier that way :slight_smile:


#11

Great news! :smiley:

These are actually interesting observations about the homescreen! If I may add my two cents:

  • Folding groups was great and I’d love to have it back, but I would keep the current behaviour automatically closing groups, or something analogous: manually closing groups is boring and as a matter of fact I used to leave most groups open. This would also spare us the open/close button (which I always found a bit akward because, being quite small, it’s cause of frequent mistakes). Maybe there could also be an always open (ie unfoldable) special group at the beginning for the most used apps.
  • I think folding groups are enough to organise the homescreen, so inside groups I would retain the no-blank-space behaviour which helps the user keeping things tidy.
  • I don’t like the “pinned sites” panel too. I’d rather not compromise on the single-column design of the homescreen. We also have to account for other different kinds of pinning, in the long run: images, videos, articles, contacts, messages… What about thematic foldable groups? Like, a group with all the pinned articles and so on?
  • I know it’s not easy, but I never liked any kind of “edit mode” in the homescreen. The one in 2.6 is much better than the first version, but eliminating it altoghether would be even better I think… Deleting apps could be done with a special trash group where to drag unwanted icons. It would also let the user recover apps deleted by mistake, just like on desktop.

What do you think?


(Julien Wajsberg) #12

[enrico_ghiorzi] enrico_ghiorzi
https://discourse.mozilla-community.org/users/enrico_ghiorzi Enrico
https://discourse.mozilla-community.org/users/enrico_ghiorzi
July 28

Great news! :smiley:

These are actually interesting observations about the homescreen! If I
may add my two cents:

  • Folding groups was great and I’d love to have it back, but I would
    keep the current behaviour automatically closing groups, or
    something analogous: manually closing groups is boring and as a
    matter of fact I used to leave most groups open. This would also
    spare us the open/close button (which I always found a bit akward
    because, being quite small, it’s cause of frequent mistakes).
    Maybe there could also be an always open (ie unfoldable) special
    group at the beginning for the most used apps.

So what you want is groups with small icons and no text, if I understand
properly ?
While it would work well for known applications, it would be barely
usable for new applications which the user doesn’t know the icon for
yet, or even for bookmarks with the default icon.
So I’d keep the previous behavior.
(this is also my “I have no time so I’m happy to use something that is
already done” rationale :slight_smile: ).

  • I think folding groups are enough to organise the homescreen, so
    inside groups I would retain the no-blank-space behaviour which
    helps the user keeping things tidy.

I agree.

  • I don’t like the “pinned sites” panel too. I’d rather not
    compromise on the single-column design of the homescreen. We also
    have to account for other different kinds of pinning, in the long
    run: images, videos, articles, contacts, messages… What about
    /thematic/ foldable groups? Like, a group with all the pinned
    articles and so on?

As a default, why not; but you’ll also want to let the user move around
icons.

  • I know it’s not easy, but I never liked any kind of “edit mode” in
    the homescreen. The one in 2.6 is much better than the first
    version, but eliminating it altoghether would be even better I
    think… Deleting apps could be done with a special /trash group/
    where to drag unwanted icons. It would also let the user recover
    apps deleted by mistake, just like on desktop.

The edit mode is much better in the new homescreen because, as you say,
we barely see it’s an edit mode. But because we rarely use it in the
daytoday usage I don’t really care (for my own usage, I mean).

The “undo” mechanism for uninstall could work if the apps are still
uninstalled after a timer (eg 1 or 2 minutes) (we can’t recover after
this timer).

Julien


(Dietrich Ayala) #13
space is added automatically, which is not right if we want to add a
point. Instead we should wait and see what's the next character
added by the user, and if it's not a punctuation add a space _at>

that time_.

or remove the space if the user types a punctuation character, I’ve seen
it done on Android keyboards for example.

Legends will be told, songs of victory sung and golden statues of you both
will be built, if you fix this.


#14

That’s not what I meant, actually. I was talking about foldable groups, of which there have been two kinds so far: collapsible sections in 2.2–2.5 and “folder-like” grouping in 2.6. In general I like the 2.2–2.5 solution best. What I dislike about it, though, was the small expand/collapse button on the side. My suggestion is to have 2.2–2.5 collapsible sections, but with automatic expand/collapse system. Something like: the section is collapsed, tap (anywhere) on it: it expands. Tap an app in the expanded section, or expand another section: the first section automatically collapse, keeping the homescreen compact without user’s intervention.


(Julien Wajsberg) #15

[enrico_ghiorzi] enrico_ghiorzi
https://discourse.mozilla-community.org/users/enrico_ghiorzi Enrico
https://discourse.mozilla-community.org/users/enrico_ghiorzi
July 29

julienw:

So what you want is groups with small icons and no text, if I
understandproperly ?While it would work well for known
applications, it would be barelyusable for new applications which
the user doesn't know the icon foryet, or even for bookmarks with
the default icon.So I'd keep the previous behavior.(this is also
my "I have no time so I'm happy to use something that isalready
done" rationale :slight_smile: ).

That’s not what I meant, actually. I was talking about foldable
groups, of which there have been two kinds so far: collapsible
sections in 2.2–2.5 and “folder-like” grouping in 2.6. In general I
like the 2.2–2.5 solution best. What I dislike about it, though, was
the small expand/collapse button on the side. My suggestion is to have
2.2–2.5 collapsible sections, but with automatic expand/collapse
system. Something like: the section is collapsed, tap (anywhere) on
it: it expands. Tap an app in the expanded section, or expand another
section: the first section automatically collapse, keeping the
homescreen compact without user’s intervention.

My problem with this is that in the 2.2-2.5 version, tapping on an icon
in the collapsed group actually launched the app. Which I consider a
very nice feature :slight_smile:
So we can’t make it so that it expands the folder.


#16

I see your point… maybe the “expand group” button could be bigger, taking the place of the sixth app (I think I remember it was cramped on the side, in 2.2–2.5). Then, when the group is expanded, there would be no “collapse” button because the group will close automatically.

We may need a UI/UX design working group, but maybe it’s too early.


(Julien Wajsberg) #17

Hi,

here is an update about the latest changes I made to my working branch:

  • Search: do not add the search term in the suggestion if it’s already in the suggestions returned by the search engine.
  • Messages: accept phone numbers starting with a parenthesis.
  • Clock: make it possible to load it in the browser (with the httpd.js extension). It’s still not perfect but at least it made it possible to wrk on the next patch.
  • Clock: implement the seconds in the Timer. Also adds +5s and +15s buttons in the timer panel (in addition to the existing +1m button). I also took the opportunity to use flex box a little more.
  • Another fix for l20n where it was trying to apply translations even with there was no l10n-id attribute.
  • Callscreen: was missing the translation for “voice mail”, just because a localization property file was missing.
  • reverted a change in master that broke restarting apps after pushing them – likely not needed in master because packaged apps are not supported, so it’s not in the kanikani branch.
  • Settings: the “relativetimeformat” localization file was missing, unfortunately it’s needed for the Downloads panel. So I added it.
  • Messages: various fixes about the unread indicator. Especially we were marking messages as read in situations where we received messages for several conversations and the user taps one of the notifications while the app was left in another conversation. The fixes are not really elegant but doing better would have needed a heavier refactoring I don’t want to do.
    With these changes, sometimes the “unread” indicator will still be displayed for some time after reading a conversation, if the app is still loading, especially with bigger workloads.

Please remember that there are 2 branches I keep synchronized:

Have fun !

Julien