Badges on the same domain doesnt always reflect the right update

VERIFIED FIXED

Status

VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: tchung, Assigned: mfinkle)

Tracking

Details

(Whiteboard: [Fennec2.0bTestday])

Attachments

(4 attachments)

(Reporter)

Description

8 years ago
Created attachment 474092 [details]
Google badges screenshot

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)
(Reporter)

Comment 1

8 years ago
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
Created attachment 482639 [details] [diff] [review]
patch

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
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

8 years ago
Created attachment 483541 [details]
android no badging screenshot

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
(Reporter)

Comment 7

8 years ago
Created attachment 483548 [details]
n900 yes google badging screenshot
(Reporter)

Comment 8

8 years ago
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.