fedora-infra / mobile

An Android app that allows the Fedora community to interact with Fedora's web apps on the go.
https://fedoraproject.org/mobile
Other
27 stars 10 forks source link

RFE: use both icons in datagrepper history view #21

Closed ralphbean closed 10 years ago

ralphbean commented 10 years ago

Right now I think we're just using the secondary icon, but the primary icon helps distinguish between message types.

would it be possible to include both icons in the datagrepper history view?

relrod commented 10 years ago

This is strange, it should be using the primary icon, in the case where it actually gets to using the message's icon (as opposed to gravatar/libravatar).

The algorithm (warning, that code is ugly, Cache needs to be reworked, purely functionally - it's side-effect hell right now) is something like: "If a username is given, use their libravatar, otherwise use the primary icon."

The code that interacts with HRF knows to separate/parse icon vs secondary_icon from the JSON.

HRF knows to separate them as well, so I don't think this is an HRF bug.

Do you have a specific message topic that is using the secondary instead of the primary?

Re: using both, it might be possible although I am uncreative and can't, off the top of my head, think of a way to make that look pretty. We could make do some weird position stuff and physically position the icons over each other or something. I'm not sure. Open to thoughts on this.

ralphbean commented 10 years ago

Do you have a specific message topic that is using the secondary instead of the primary?

No. The feed just looks like a lot of Fedora logos. I just assumed it was always using secondary icon (which I think is almost always gravatar/libravatar).

We could make do some weird position stuff and physically position the icons over each other or something. I'm not sure. Open to thoughts on this.

Positioning them slightly over each other would be super cool. I dunno if that's possible or not with the android drawing resources.

I guess I was originally thinking of making the left-most third of each row being dedicated to the two icons, side by side. And the right-most two-thirds being dedicated to text. Not sure how that would play out in reality, though.

relrod commented 10 years ago

No. The feed just looks like a lot of Fedora logos. I just assumed it was always using secondary icon (which I think is almost always gravatar/libravatar).

Ideally there would be a way to know if there was a gravatar returned for the user, so the workflow would look something like this:

Would sending the primary icon as the default to gravatar/libravatar fix this? Instead of sending https://fedoraproject.org/static/images/fedora_infinity_64x64.png?

Positioning them slightly over each other would be super cool. I dunno if that's possible or not with the android drawing resources.

I think it is possible, but I'm not sure how good it would look for some icons. Particularly PNGs without borders might look bad because you might not be able to tell which image is which.

Or what if we did a small app-specific icon next to the bolded topic in each newsfeed story?

relrod commented 10 years ago

@ralphbean see if that is more like you'd expect (I haven't tested it yet, to be honest). We can still do the double icon if you'd prefer, but this might fix your main concern of falling back to the infinity logo more often than we should.

ralphbean commented 10 years ago

Looks great!

ralphbean commented 10 years ago

That was quick work.. thanks @codeblock!

relrod commented 10 years ago

Is this able to be closed then, or do you still think we should look at the double icon idea?

ralphbean commented 10 years ago

:+1: to closing. :)

relrod commented 10 years ago

Cool. I have some other ideas planned for the newsfeed as well. I need to add endless-scrolling back in (I commented it out because it didn't work and ended up spawning tons of requests). I'd also like to make tapping on a story do something other than immediately go to the URL associated with it, but I'm not sure what yet. That workflow seems icky to me.

ralphbean commented 10 years ago

Sounds rad.

Another idea: it would be sweet if gcm auto populated the top of the list transparently.

ralphbean commented 10 years ago

Also, if the human readable time deltas automatically updated as you were looking at it... but that might be crazy talk.