Closed Bug 894517 Opened 11 years ago Closed 11 years ago

If gallery is empty, no button to switch to camera

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hub, Assigned: arasbm)

Details

Attachments

(2 files)

If gallery is empty, no button to switch to camera

STR:

1. get a new phone or one with no pictures on it
2. start the gallery app

Observed:
A message tells you it is empty and that you should take picture using the camera

Expected:
I should have a button to start the camera in addition to that. Said button already exist when you do have pictures in the gallery.
Asking for UX evaluation regarding this matter.  Having that button makes the transition into camera a one step process vs two (home -> camera)
Flags: needinfo?(firefoxos-ux-bugzilla)
Flagging Rob since Media is his domain though this is not a blocker. 

Rob, I don't see this in the 1.2 backlog either so, depending on your verdict here, we may want to explicitly add this to the backlog for future koi?. Thank you!
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(rmacdonald)
Switching this to Jacqueline, in case we should include this in Gallery. I did ask Zurb to address this as part of their specs but am not sure it was.
Flags: needinfo?(rmacdonald) → needinfo?(jsavory)
Users should have direct access from the gallery to the camera, especially when there are no photos. 
To solve this, a single button (with the text "Go to Camera") at the bottom of the dialogue box should be added. This button will directly bring the user to the camera application and is clear in its purpose.
Flags: needinfo?(jsavory)
Hi, if you dont mind i'll try to add the "Go to Camera" button and submit a PR soon (latest tomorrow. Cheers.
After further investigating it looks like a common overlay is used to display this message:

https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/gallery.js#L1139

This overlay currently does not allow for any interaction. I am thinking of adding a button to the overlay definition that is turned off by default but can be turned on in special cases such as this.

Could I please get a comment from someone familiar with this code if the approach I am thinking of sounds reasonable, or if we should go for a different solution.

Thanks!
arashbm, 

Yes, it shows the overlay on it. You may add another button in the index.html, like[1], and use the way similar to nocard to show the button, but not exactly the same. You may also need to add the "hidden" class to the button level to have two buttons inside the same overlay_menu.

After you doing that, please upload a html file auto redirecting to your PR and set a review flag to david or dale. Thanks.

https://github.com/mozilla-b2g/gaia/blob/bdca13763b9bf9108c84618f89a2e026c8fec0eb/apps/gallery/index.html#L177
Attached file goto-camera-pr.html
Based on our previous discussion I am sending a patch that adds a button to the overlay when there are no pictures in the gallery.
Attachment #796452 - Flags: review?(dflanagan)
Attachment #796452 - Attachment mime type: text/plain → text/html
Comment on attachment 796452 [details]
goto-camera-pr.html

Reassigning the review to John, since he's already looked at this issue.
Attachment #796452 - Flags: review?(dflanagan) → review?(johu)
Arasbm, 

Thanks for your patch, I will start to review it. And I changed the assignee to you.
Assignee: nobody → arasbm
Attached image screenshot
This screenshot is attached at PR. I copied one to here.
Comment on attachment 796452 [details]
goto-camera-pr.html

Arasbm,

This is a solid patch. I think it is ready to land. I found there is a naming inconsistency on the button id. Please change it and notify my so that I can help you to merge the code and close this bug. Finally, thank you for this patch.
Attachment #796452 - Flags: review?(johu) → review+
Hi John Hu,
I rebased with master and have fixed the naming inconsistency and updated the path. Please let me know what I would need to do next to merge the code.
Thank you for the review.
Hi Arashm,

Thanks for your patch. I merged the code to our master branch and closed this bug. It looks good.


merged to master: https://github.com/mozilla-b2g/gaia/commit/0e7b01e302ac4dc62b8834f80dcf005c7d5a0c88
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: