-
Notifications
You must be signed in to change notification settings - Fork 14
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
Render organizer message in CallListItem #1037
base: master
Are you sure you want to change the base?
Conversation
Would it be possible to include a screenshot? I can't test it myself on my local machine atm. |
@jensborje Sure! I updated the PR with added screenshots. |
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.
Very good! Well done!
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.
Looks good to me, but I left a comment where you missed a semicolon.
); | ||
} | ||
else if (call.message_to_organizer && call.message_to_organizer.length > 180) { | ||
messageContent = call.message_to_organizer.substr(0, 180) + '...'; |
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.
How about something like this?
let len = 0;
messageContent = call.message_to_organizer.split(' ').filter(s => (len += s.length + 1) && len < 40).join(' ') + '...';
0% { content: '.'; } | ||
33% { content: '..'; } | ||
66% { content: '...'; } | ||
99% { 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.
Is this line needed?
This PR adds functionality for displaying the message to organizer in
CallListItem
.Since
message_to_organizer
only is included in the data when retrieving a single call,CallListItem
dispatches an action for retrieving additional data once the item is in view, displaying a loading (dots) animation while the request is pending.In cases where there is no
message_to_organizer
data, a fallback message is rendered.Examples of truncated message, full message and message placeholder:
Loading animation:
Closes #933