-
Notifications
You must be signed in to change notification settings - Fork 18
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
Best way/component to display contact status #16
Comments
There are ways to do this with both actions and views. With Views you can just set the UIID in the update method (but do a check to make sure that the UIID requires updating before calling setUIID() on underlying component). With Actions you can either create two actions, and use the UI.condition(...) directive to define when each should be visible. There are also variants of the UI.label(StringProvider) which allow you to provide a custom label depending on the entity context. I'm going to add similar variables to the UI.uiid() and UI.iconUiid() methods to allow for different UIIDs depending on entity context. If you can elaborate on exactly what you are trying to do, or maybe suggest what your ideal API would look like for this, I may be able to provide further suggestions. |
There will be, for sure more than 2 states. As this is for contacts, I would like to show when they are online, offline, busy, away, on call, etc... To be honest I am not 100% sure what would be the best way to show their status. Maybe it depends on where this information is shown. The most typical way is to show an icon (or a dot) in different colors. User offline - grey dot, online and available - green dot, online away - yellow, online busy - red dot. But maybe, instead of just a dot, it would be better to show an icon which may show a bit more, like user is online busy on call - red phone icon. The thing is, there might be more than 2 states and I would like to use an icon to show each state. And maybe in some places where only user name is displayed, I could just show user's name in different colors, depending on his state but I am not sure if this is a good idea. So, it looks to me like some form of Label (which can present either text or icon or both) would be best approach. Then, the label can have multiple UUID, different for each state? And what would be the best way to bind user's state or |
…on values in its model. For shannah/CodeRAD#16
…ending on state of the model. For shannah/CodeRAD#16
I added a couple of samples that show different approaches.
|
Thank you, with the provided examples I was able to implement something which works quite well. |
Hi,
I would like to indicate using colors or different icons contact's online status. That is a different icon or a color to be used when the contact is offline, online, busy, etc....
I could not find anything in the CodeRAD directly suitable for this purpose but maybe I am missing something. The closest thing, which I am going to base on my code would be
TypingAnimation
to have "pure" component or maybe better yet, something likeLabelEntityView
, so the view could react on entity changes.Would you have any suggestions?
The text was updated successfully, but these errors were encountered: