-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] MVP Images #9455
[WIP] MVP Images #9455
Conversation
Pull Request Checklist
|
Jenkins BuildsClick to see older builds (7)
|
👏A👏W👏E👏S👏O👏M👏E👏 I treat this as a proof of concept for the purpose of UI correctness, @flexsurfer please let me know if you'd like me to point out any UI styling issues, there's only a handful. However, one huge UX request : please allow images to be previewed and send with their correct aspect ratio preserved and not cropped in a square. I think this needs to be addressed before I feel comfortable shipping this MVP. this is as good illustration as any of what I mean I guess it can be left outside the scope for now but the first immediate thing to address would be to add full screen image previews once tapped on an image in chat |
[wrapper {:keys [content] :as message}] | ||
[wrapper message | ||
[react/image {:style {:margin-vertical 10 :width 140 :height 140 :border-radius 8} | ||
:source {:uri (str "https://ipfs.infura.io/ipfs/" (:hash content))}}]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not impose IPFS in the URL, we can still validate the link client side if we want to have only IPFS domains, but otherwise changing this would be breaking. Rather I would pass the full url, and then we can only show if starts-with
ipfs or something.
Also markdown supports images, so it's possible to embed images in text content if we'd like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cammellos you mean unfurl a link that leads to an image? or place an inline image next to regular text? I would say it's not something we want, images should always be placed separately as their own message bubble in chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I meant (regarding markdown, not the URL, that's a protocol thing), thanks for the reply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a temporary implementation, there will be a multihash instead ipfs hash, we don't want to send any web2 links or images, multihash might be used for ipfs or swarm or our own storage later
Blocking us from shipping:
|
yes, that's something made possible with the 'Final' (needs better naming) design. I - maybe - could make it work with MVP but it wouldn't be pretty |
@errorists is it better to disable the text field when an image is inserted? User can still 'x' it out. But if they type, they remove their image. It wasn't 100% clear to me that the image weren't still being sent along w/ my text, until I sent it. Just a thought, not a deal breaker for me though. |
Probably not, I mean when you focus the input, you cancel out of the image sending dialog. to bring it back you need to tap the image icon again, so it's either one or the other. It's the MVP flavour of this design for which I apologise but in my excuse there's a better, fully formed one waiting there |
since it doesn't hurt to ask, @Ferossgp would you care to estimate how much longer it would take you to add the UI features in the full design? I mean the image composition menu that has a horizontally scrollable gallery built in and a camera viewfinder? and the image queue above the input that allows for queuing multiple images, pasting images and adding text / composing replies to an image? |
@errorists UI components are not complex, but given the fact that we should interact with some native library like Camera Roll and camera preview, I would expect complexity and possible pitfalls on that. It also depends on how multiple images would be handled. If there will be no limitation on one image in MVP then it should not be hard (Meaning that message with image structure will not limit only one URL). I'm not sure at this time how to better implement paste image cause I've never worked with this in RN. I would allocate 2/3 days without paste image |
@errorists no need to apologize, I think it works just fine for now. 2/3 days ain't bad for the bulk of the remainder, but for the MVP let's just ensure these user requirements are met:
cc @flexsurfer |
@flexsurfer should we reopen this in light of status-im/specs#69 (comment) |
MVP Images [WIP] Take a picture is not implemented yet
Upload an image to infura and send a hash
DEMO https://www.youtube.com/watch?v=6Vhv-j6n8Po