Closed Bug 595218 Opened 14 years ago Closed 14 years ago

Badges on the same domain doesnt always reflect the right update

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(fennec2.0b2+)

VERIFIED FIXED
Tracking Status
fennec 2.0b2+ ---

People

(Reporter: tchung, Assigned: mfinkle)

Details

(Whiteboard: [Fennec2.0bTestday])

Attachments

(4 files)

For example, mail.google.com is different than reader.google.com.   As a user, i'd expect a badge telling me i have a new email on Gmail, but i would expect a different badge if there was an rss update on Reader.    

Currently, the badges for google.com are for Gmail notifications, and it doesnt make sense when it shows up for Reader.

See screenshot

Repro:
1) install 20100910 fennec nightly
2) log into gmail and google reader, and send yourself a new email
3) goto awesomescreen, and search "google"
4) Verify badging displays the new email notification for gmail, but also for Reader.google.com (which i would have expected to notify me with new RSS feeds, not emails)

Actual:
- sites with the same domain all share the same badging.   But it doesnt always make sense to do that.

Expected:
- reader.google.com should badge new RSS feeds, not email (that's what gmail is for)
as expected, the same badging also showed up for my other google sites (spreadsheets.google.com, docs.google.com, groups.google.com)
I was thinking about this problem. I think we need to add an extra level of URL filtering. We might need some regex test to help narrow down the "hits". Hopefully we can keep the domain filter as a quick way to avoid regex tests on every URL (those might be slow).

However, we do need a test that could tell the difference between google mail and google reader (and google docs ....)

Another feature we might want to add is only badging the first URL match. Applying the same badge to 20 URLs in the results list doesn't look nice.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0b2+
Assignee: nobody → mark.finkle
Attached patch patchSplinter Review
This patch does a few things:
* Stop using effective TLD because it was not specific enough. Too many URLs were matching.
* Use partial URL match that has to match from the beginning of the URL and the match must be exact. I could have used a regex to skip "http" vs "https", but that could have caused other mis-matches, so I left it as an exact partial match, from start of the URL.
* Did some rename of the currentURL -> itemURL and itemHost -> itemURI and remoteHost -> remoteURI, since we were not using host anymore. Also moving itemURI out of inner for-loop might increase speed too.

The result is much better - only the right gmail matches for me. I wonder if this is broken for foreign locales?

We could also add a feature to only match the first hit in the results list.
Attachment #482639 - Flags: review?(21)
Comment on attachment 482639 [details] [diff] [review]
patch

Code looks good, mail.google.com/mail works for me since mail.google.fr does not exist.
Attachment #482639 - Flags: review?(21) → review+
pushed:
http://hg.mozilla.org/mobile-browser/rev/dfc36e439cef
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
The badging isnt working on android nexus one: Mozilla/5.0 (Android; Linux armv71; rv:2.0b8pre) Gecko/20101015 Firefox/4.0b8pre Fennec/4.0b2pre    

See screenshots for maemo vs android.

I'll await your comments for android before reopening the bug
User error.  i wasnt signed into gmail on android.  

Verified fix on Mozilla/5.0 (Android; Linux
armv71; rv:2.0b8pre) Gecko/20101015 Firefox/4.0b8pre Fennec/4.0b2pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: