Closed Bug 869255 Opened 12 years ago Closed 12 years ago

[MMS][User Interface] Attach button fire pick Activity and create Attachment

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect, P1)

x86
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:leo+, b2g18 fixed)

RESOLVED FIXED
1.1 CS (11may)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed

People

(Reporter: danheberden, Assigned: jugglinmike)

References

Details

(Keywords: feature)

Attachments

(1 file, 6 obsolete files)

There needs to be UI for the user to attach (pick) a media element. This should fire the pick activity, allowing the user to pick a media element, returning that element to the messaging app and adding to the message. (Something like `Compose.append(new Attachment(blob))`
Assignee: nobody → mike
Depends on: 840069
Priority: -- → P1
Target Milestone: --- → 1.1 CS (11may)
This bug covers not only the pick button but also making sure that the styles (that the attach button will certainly affect) related to composition (the input box, send button, etc) are all up to spec.
I began implementing this interface component in Bug 840044. I've since marked that patch as obsolete, and I will attach a newer version here when it is available.
Revering this being so large of a bug. This is only for the pick icon and related activity. The test of the styling issues are https://bugzilla.mozilla.org/show_bug.cgi?id=870057
I mean the *bug* for the styling issues is https://bugzilla.mozilla.org/show_bug.cgi?id=870057
Blocks: 840044
Whiteboard: [NO_UPLIFT]
The "Search" building block[1] is documented to optionally support the "attachment" icon described by the UI specification. Unfortunately, it doesn't seem to technically implement this. I will reach out to the building block maintainers, but in the mean time, this patch will likely include an SMS-specific UI.
blocking-b2g: --- → leo+
Keywords: feature
Attached file https://github.com/bocoup/gaia/pull/13 (obsolete) —
Attachment #748829 - Flags: review?(felash)
Attached patch Implement Attach button UI (obsolete) — Splinter Review
Corey has merged the "messaging" fork upstream, so I'm re-submitting this as a patch for review (and merge to "master") by Julien.
Attachment #748829 - Attachment is obsolete: true
Attachment #748829 - Flags: review?(felash)
Attachment #748982 - Flags: review?(felash)
I kind of feel like this should be functionality & corresponding tests should baked into the Compose object, anyone else have opinions?
Also, this bug really feels co-dependant on bug 840044 - landing this one without the other is going to be confusing - a button that asks for a pick action, but doesn't actually do anything feels like a bug. Perhaps we can agree on the commit for this one, and just land it at the same time as bug 840044?
Attached patch Implement Attach button UI (obsolete) — Splinter Review
As per Corey's feedback, I've moved the relevant logic into `compose.js`
Attachment #748982 - Attachment is obsolete: true
Attachment #748982 - Flags: review?(felash)
Attachment #748996 - Flags: review?(felash)
Attached patch Implement Attach button UI (obsolete) — Splinter Review
As per This version moves more of the code that actually concerns message composition into 'compose.js'
Attachment #748996 - Attachment is obsolete: true
Attachment #748996 - Flags: review?(felash)
Attachment #749011 - Flags: review?(gnarf37)
Attached patch Implement Attach button UI (obsolete) — Splinter Review
While working on Bug 840044, I realized that the test introduced in the previous patch excercised too many methods to be considered a unit test. This patch re-factors the test to be more focused.
Attachment #749011 - Attachment is obsolete: true
Attachment #749011 - Flags: review?(gnarf37)
Attachment #749036 - Flags: review?(gnarf37)
Comment on attachment 749036 [details] [diff] [review] Implement Attach button UI Review of attachment 749036 [details] [diff] [review]: ----------------------------------------------------------------- LGTM - Just a few comments, but consider it r+ - let me know if you decide to make the follow up change ::: apps/sms/js/compose.js @@ +114,5 @@ > init: function thui_compose_init(formId) { > dom.form = document.getElementById(formId); > dom.message = dom.form.querySelector('[contenteditable]'); > + dom.submitButton = dom.form.querySelector('button[type="submit"]'); > + dom.attachButton = dom.form.querySelector('#messages-attach-button'); Should we use getElementById instead? Also maybe the same for the submit button? @@ +270,5 @@ > + } > + }); > + > + activity.onsuccess = function() { > + // TODO: use `activity.result` to create the attachment. Not Blocking on this, but any TODO should have a bug # when possible
Attachment #749036 - Flags: review?(gnarf37) → review+
Also, the attach button seems incorrectly aligned, i would imagine it should be at the bottom like send is: http://cl.ly/image/3S0F2J190D3S
Attached patch Implement Attach button UI (obsolete) — Splinter Review
Addressing Corey's feedback.
Attachment #749036 - Attachment is obsolete: true
Attachment #749456 - Flags: review?(gnarf37)
Attachment #749456 - Flags: review?(gnarf37) → review+
This version addresses the rendering issue identified in comment 14
Attachment #749456 - Attachment is obsolete: true
Attachment #749510 - Flags: review?(gnarf37)
Attachment #749510 - Flags: review?(gnarf37) → review+
75e153f09e72b692917556e028dacb8436a0d86f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [NO_UPLIFT]
v1-train: 8725473
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: