Skip to content
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

Display occupants avatar #1354

Closed

Conversation

raphaelSeguin
Copy link
Contributor

Hi,
this is a first contribution. There are some
I copied the AvatarMixin from chatbox-views, would have it been better to import the whole file, or maybe abstract this mixin in separate file ?

Copy link
Member

@jcbrand jcbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @raphaelSeguin

Thanks a lot for contributing. I've left some comments after reviewing your PR.

src/converse-rosterview.js Outdated Show resolved Hide resolved
'image': "data:" + image_type + ";base64," + image,
});
},
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to duplicate the code. Instead, in src/converse-chatboxviews.js, you can set AvatarMixin as an attribute on the _converse object.

Then further down you can do:

_converse.ViewWithAvatar = Backbone.NativeView.extend(_converse.AvatarMixin);

sass/_roster.scss Outdated Show resolved Hide resolved
@@ -119,7 +119,9 @@

.avatar {
float: left;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using flexbox for many things now, so this float: left statement might no longer be necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. In fact, I found it here, and when I tried to remove it, it broke the design. I'll try to remove it again and fix the display with flexbox.

@linkmauve
Copy link
Contributor

This fixes #1322, btw.

@jcbrand
Copy link
Member

jcbrand commented Dec 5, 2019

I've made some updates to this PR and then did a manual merge.

@jcbrand jcbrand closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants