Closed
Bug 1048927
Opened 11 years ago
Closed 11 years ago
Enable 'add to home' for all web content
Categories
(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)
Firefox OS Graveyard
Gaia::System::Browser Chrome
All
Gonk (Firefox OS)
Tracking
(feature-b2g:2.1)
People
(Reporter: cwiiis, Assigned: cwiiis)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file)
Bug 1045828 added 'add to home' for searches only. We want to be able to add any web content to the home-screen.
Updated•11 years ago
|
feature-b2g: --- → 2.1
Updated•11 years ago
|
Whiteboard: [systemsfe]
| Assignee | ||
Updated•11 years ago
|
Component: Gaia::System → Gaia::System::Browser Chrome
Updated•11 years ago
|
Target Milestone: --- → 2.1 S2 (15aug)
| Assignee | ||
Comment 1•11 years ago
|
||
I didn't quite get this done today, here's my WIP branch: https://github.com/Cwiiis/gaia/tree/browser-overflow-menu
It works, except e.me results aren't sanitized, so quite often the search URL doesn't match the actual URL when you visit the page and so you end up being able to add something already added. I'm not sure of the best way to fix this.
We'll need to either sanitize e.me url results, or do some kind of fuzzy matching if we want this to be reliable. Preferably the former (this is easily enough fixed on browser, but the search app would need to visit the url to find out where it ends up redirecting to for this to work as intended...) Alternatively, we can find some hacky ways around this that work for the common-ish case.
cc'ing kgrandon for comment on whether we want to fix this properly or if hacks are ok.
Flags: needinfo?(kgrandon)
Comment 2•11 years ago
|
||
I feel like the right way of doing this is to just abandon the search URL concept, and just use the current value of the browser iframe. I'm not entirely sure why we don't have this concept, so I think we should revisit it. In the meantime if a hack gets you unblocked, I'm fine with that also.
Flags: needinfo?(kgrandon)
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Kevin Grandon :kgrandon from comment #2)
> I feel like the right way of doing this is to just abandon the search URL
> concept, and just use the current value of the browser iframe. I'm not
> entirely sure why we don't have this concept, so I think we should revisit
> it. In the meantime if a hack gets you unblocked, I'm fine with that also.
I think we should do this too, but where this becomes a problem is if you add to the home-screen via the search results and long-pressing on an icon. If you do it this way, we'd have to resolve the URL to add the bookmark... I don't necessarily think that's a bad thing though and would lean towards doing that than trying to hack something up (I can't think of any hacks that I can't also think of trivial ways to break)
| Assignee | ||
Comment 4•11 years ago
|
||
So, this has the drawback now that if you add a search result from e.me or a collection, its URL likely won't match if you bookmark the same thing from the browser.
I think we need to land this and deal with that in a separate bug.
Attachment #8468457 -
Flags: review?(21)
Comment 5•11 years ago
|
||
Comment on attachment 8468457 [details] [review]
Enable add-to-home for web content
Just want to get some answers before r+'ing. Feel free to ask r?.
Attachment #8468457 -
Flags: review?(21)
| Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) from comment #5)
> Comment on attachment 8468457 [details] [review]
> Enable add-to-home for web content
>
> Just want to get some answers before r+'ing. Feel free to ask r?.
All reasonable concerns, I think this patch could go another round.
Comment 7•11 years ago
|
||
(In reply to Chris Lord [:cwiiis] from comment #6)
> (In reply to Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails,
> needinfo? please) from comment #5)
> > Comment on attachment 8468457 [details] [review]
> > Enable add-to-home for web content
> >
> > Just want to get some answers before r+'ing. Feel free to ask r?.
>
> All reasonable concerns, I think this patch could go another round.
Chris... sorry for bug 1049831 that will ask you to rebase your work...
The main idea behing it is that I realized that I need to review some dead code and you need to move it around and ensure it works while nobody is going to use it anyway. It's too late to go back to the old wrapper stuff.
Sorry for any inconvenience.
| Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8468457 [details] [review]
Enable add-to-home for web content
All review comments addressed, I believe. (not to say there won't be new ones :))
Note with the new isSearch function, this will often return false erroneously until bug 1049569 lands. I think this is ok though, as the consequences aren't a big deal.
Attachment #8468457 -
Flags: review?(21)
Comment 9•11 years ago
|
||
Comment on attachment 8468457 [details] [review]
Enable add-to-home for web content
r+ with nits (in the PR) and it would be nice to a few new tests.
Attachment #8468457 -
Flags: review?(21) → review+
| Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8468457 [details] [review]
Enable add-to-home for web content
Sorry for the churn, but I hadn't noticed the test failures before and I want to get your ok on the changes to app_chrome_test.js. I've addressed your nits too.
wrt to tests, kgrandon has said that he's going to kick off writing a marionette test for this, after which I can write tests for all the options in the overflow menu.
Attachment #8468457 -
Flags: review+ → review?(21)
Attachment #8468457 -
Flags: review?(21) → review+
| Assignee | ||
Comment 11•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•