RFE: use both icons in datagrepper history view
Closed this issue · 11 comments
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?
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.
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.
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:
- See if there is a username
- If there is, see if there is a gravatar
- If there is, use it
- If there is, see if there is a gravatar
- Otherwise (no username and/or no gravatar) use the primary icon.
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?
@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.
Looks great!
That was quick work.. thanks @codeblock!
Is this able to be closed then, or do you still think we should look at the double icon idea?
👍 to closing. :)
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.
Sounds rad.
Another idea: it would be sweet if gcm auto populated the top of the list transparently.
Also, if the human readable time deltas automatically updated as you were looking at it... but that might be crazy talk.