chamilo-lms
chamilo-lms copied to clipboard
C2 : user image appears in big in the Chamilo messaging system
Add a picture to your profile, then send a message to someone in Chamilo.
Go to the sent message page and open the message.
You will see that the user picture image is not resized and appears in big :
If yyou connect as the receiver, and open the received message you will also see the user picture in big. It should always be resized to appear in standard small size the same as the default user picture image.
There is no design for this in figma file https://www.figma.com/file/xVjyMvmrZdlr8ZyKeoQ5n5/Dashboard?node-id=99-16149&t=kofcZkADJlifIV9C-0, at least I couldn't find it. So I decided to use 40x40 image which is used in other designs.
This is the idea
Should we show name and surname in addition to the profile picture?
Yes it would be good to have the name and surname to identify the user
In vue the things available for every person involved in messages is the username but not first and last name
@AngelFQC Do I need to fetch this information for every user, or is there another way to retrieve this information?
I modify the course list as well according to figma, because was related to this issue. Changes are in the same pull request. Going from this
to this
In vue the things available for every person involved in messages is the username but not first and last name
@AngelFQC Do I need to fetch this information for every user, or is there another way to retrieve this information?
@daniboygg You can now get the user's full name for sender and receivers with the Messages API
"receiversTo": [
{
"@id": "/api/message_rel_users/10",
"@type": "MessageRelUser",
"receiver": {
"@id": "/api/users/1",
"@type": "http://schema.org/Person",
"illustrationUrl": "/img/icons/32/unknown.png",
"id": 1,
"username": "admin",
"fullName": "Pérez, Juan"
I haven't looked into the details of how to get a better image, but when you have not uploaded a picture yet, your social network profile looks like this:
Obviously, in this case we should get a higher-quality image, or use (temparily) the mdi icon "account" (https://pictogrammers.com/library/mdi/icon/account/).
In the last pull request I made, the profile image expands to full size (the whole size of the gray circle shown by @ywarnier). Right now the image has low quality, but expands ok. If someone can change backend to send an image with more resolution, the problem will be fixed.
Ok, will do
The image stills appears in big when answering a message :
@NicoDucou you are right! My bad, I didn't update the reply view with the new component. Thanks to notice. I submitted a PR with the changes need to fix this.
This is how supposed to look now
There is a component that uses the old component, but I don't know how to show this to see if I need to modify it. How these tags in myReceiver are created from interface?
<div class="flex justify-end gap-2">
<div v-if="myReceiver">
<BaseChip
v-for="tag in myReceiver.tags"
:key="tag['@id']"
:value="tag"
is-removable
label-field="tag"
@remove="onRemoveTagFromMessage(tag)"
/>
</div>
<BaseAutocomplete
v-if="item.sender && item.sender['@id'] !== securityStore.user['@id']"
id="search-tags"
v-model="foundTag"
:label="t('Tags')"
:search="onSearchTags"
option-label="tag"
@item-select="onItemSelect"
/>
</div>
Hi @daniboygg
For the tags, you need to open a message that you received and on the right hand side you will see a box titled "tags" that enables you to create or assign existing tags.
But I see that there is a problem because if the word does not exist as a tag it should offer you to create it and it does not do it at the moment. That's why you can not create tags from the interface.
@AngelFQC implemented those tags so he should know why it does not enable the creation now.