Closed
Bug 1250946
Opened 8 years ago
Closed 8 years ago
Today Widget – New Tab & New Private Tab
Categories
(Firefox for iOS :: Browser, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fxios | 4.0+ | --- |
People
(Reporter: jhugman, Assigned: jhugman)
References
Details
Attachments
(3 files)
Add a today widget, with new tab and new private tab buttons.
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•8 years ago
|
||
I need to update the firefox:// URL scheme (because opening the containing app can only be done via a call to openURL). Right now, we can only open URLs in a non-private tab, by passing a url query parameter. I propose a second query parameter, so a new private tab is: firefox://?private=true firefox://?private=true&url=http://mozilla.com (modulo appropriately URL encoding) Second: I propose we change the default behaviour when no url is present to be changed from opening the app to the current tab to opening a new tab. Both open a new tab: firefox:// firefox://? :sleroux, :st3fan, what say you?
Flags: needinfo?(sleroux)
Comment 2•8 years ago
|
||
> I propose a second query parameter, so a new private tab is: > firefox://?private=true > firefox://?private=true&url=http://mozilla.com (modulo appropriately URL encoding) Make sense. I think the only thing we'd want to do is formally document that it means for the parameter to be absent (private=false) somewhere. Not sure if we have documentation about this anywhere. > Second: I propose we change the default behaviour when no url is present to be changed from opening the app to the current tab to opening a new tab. Do we know if anyone is using this API already? With apps like Outlook/Airmail supporting Firefox I wonder if there is already an assumption around how this API works. I'd just be worried about breaking API changes. Also, if we wanted to expose an API for just opening the app I feel like we hamstring ourselves here unless we add a new parameter like 'justopen' which seems a bit jank. An alternative could be passing in about:blank into the URL parameter to open a blank new tab since that would align with the existing usage of opening a tab..
Flags: needinfo?(sleroux)
Assignee | ||
Comment 3•8 years ago
|
||
> Do we know if anyone is using this API already? With apps like Outlook/Airmail supporting Firefox I wonder if there is already an assumption around how this API works. The only thing I could find was :bkmunar's docs from Open In Firefox. Otherwise, the only documentation is the code itself. https://github.com/mozilla/firefox-ios-open-in-client#the-custom-firefox-url > Also, if we wanted to expose an API for just opening the app I feel like we hamstring ourselves here unless we add a new parameter like 'justopen' which seems a bit jank. In the absence of error handling, 'just open' the app is the default error behaviour. I don't think we should be advertising this as part of the API. Digging further in (lots of duplicated code due to #available(iOS 9, *)) checks, it seems that the default behaviour is to open a new tab in whatever mode (private or not) the tab tray is currently in. > An alternative could be passing in about:blank into the URL parameter to open a blank new tab since that would align with the existing usage of opening a tab.. I considered this, though that does prevent us adding 'new tab' behaviour, such as opening a default new tab page, or going straight to the tab tray.
Flags: needinfo?(sleroux)
Assignee | ||
Comment 4•8 years ago
|
||
Please may I have some assets for this? I'm happy to use recycled assets, though you may not be :) – New Tab, .Normal & .Highlighted states - New Private Tab, .Normal and .Hightlighted states. Thank you muchly.
Flags: needinfo?(randersen)
Comment 5•8 years ago
|
||
> In the absence of error handling, 'just open' the app is the default error behaviour. I don't think we should be advertising this as part of the API. True. The more I think about it, the more I realize that we probably don't ever want to 'just open' the tab since the schemes are really meant for invoking an action in the other app. I don't see why another app would want to open FF and do nothing. > Second: I propose we change the default behaviour when no url is present to be changed from opening the app to the current tab to opening a new tab. By using train of thought in the previous example this makes more sense. Other applications probably don't want to do nothing. They most likely will want to open a new tab for themselves and perform some kind of action on it.
Flags: needinfo?(sleroux)
Comment 6•8 years ago
|
||
Flags: needinfo?(randersen)
Assignee | ||
Comment 7•8 years ago
|
||
I've got everything working, though would like some feedback on the rebase which caused me some issues, and some SnapKit layout problems I'm having (Private Tab button).
Attachment #8729641 -
Flags: feedback?(sleroux)
Comment 8•8 years ago
|
||
Comment on attachment 8729641 [details] [review] Pull request Left feedback on the PR.
Attachment #8729641 -
Flags: feedback?(sleroux) → feedback+
Assignee | ||
Updated•8 years ago
|
tracking-fxios:
--- → 4.0+
Assignee | ||
Comment 9•8 years ago
|
||
Attachment #8736845 -
Flags: ui-review?(randersen)
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8729641 [details] [review] Pull request I added the height using 2x the button size.
Attachment #8729641 -
Flags: review?(sleroux)
Comment 11•8 years ago
|
||
Comment on attachment 8736845 [details]
iPhone screenshot
Looks good! Can we reduce the label size to 14pt and give it a bit of space from the icon? Say, 10px?
Assignee | ||
Updated•8 years ago
|
Attachment #8729641 -
Flags: review?(etoop)
Comment 12•8 years ago
|
||
Comment on attachment 8729641 [details] [review] Pull request Looks good. Left a couple of minor suggestions in the PR. I wasn't able to test this as I couldn't build it in Xcode 7.3 (compiler issues)
Attachment #8729641 -
Flags: review?(etoop) → review+
Updated•8 years ago
|
Attachment #8736845 -
Flags: ui-review?(randersen) → ui-review+
Assignee | ||
Comment 13•8 years ago
|
||
Nits addressed. Merged.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Attachment #8729641 -
Flags: review?(sleroux)
Comment 14•8 years ago
|
||
Design at https://mozilla.invisionapp.com/share/9J5Z5F2WS#/screens
You need to log in
before you can comment on or make changes to this bug.
Description
•