rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Doubt placeholder #34

Closed o3dsn closed 6 years ago

o3dsn commented 6 years ago

Hi Rafael,

I'm a Brazilian developer. I have a doubt, would have some way to change the placeholder "translate to Portuguese" and stylize all component ?

capturar

rpaschoal commented 6 years ago

Hi @todd7,

You're right, I've put a placeholder for the message input but I didn't put one for the search. Would you be able to send a pull request with an input property named as searchPlaceholder and an unit test for that? Tons of example in the source code, you can check out what I've done for the messagePlaceholder.

Regarding the style of the component, I haven't come up with a solution for that yet, someone else has opened a related issue but didn't come back with any requirements, so I am hoping you could give me some feedback towards what precisely you would like to style in the component?

Let me know if you gonna get a pull request up for that change. If not, I am planning to release 1.0.6 soon with tabbing support between windows and I could potentially do that.

Cheers from another Brazilian!

o3dsn commented 6 years ago

Hello, the test would be [searchPlaceholder]="searchPlaceholder" and change property in .ts ? I did this test and it did not work ;/ It would be cool if you could manipulate the size and color of the component and.

I'm sorry for the bad english, google translate...

rpaschoal commented 6 years ago

Hi @todd7,

Yes, pretty much it, the test would be different though. I will branch a 1.0.6 version tonight and publish it with just this change so it gets available to you as soon as possible. I will put the pull request here as reference so you can see what was done for that code-wise.

Changing the size of the windows is kind of not easy to customize right now because I use the sizes and the viewport size to calculate how many chat windows can be displayed per viewport. Surely we can improve this but it will take longer than the placeholder change and I still haven't come with a new strategy for this.

No worries about your English, I understood it just fine.

Cheers.

rpaschoal commented 6 years ago

Hi @todd7,

I've just published 1.0.6 to NPM. You should be able to customize the search placeholder with the new setting. Here is an example:

<ng-chat [searchPlaceholder]="'Buscar'"></ng-chat>

If you want to have a look on how I've implemented these changes, just have a look on this pull request #35

This repository welcomes contributions from the community, but if you are planning on adding new features, just make sure you open a new issue so we can discuss about it before the implementation.

I will be opening a new issue to discuss about styling the component and what strategy to use to do so. I will link it here soon.

Cheers!

rpaschoal commented 6 years ago

@todd7 I've opened #37 to discuss about how to add custom styles. If you're happy with the placeholder changes on 1.0.6 I'll be closing this issue.

rpaschoal commented 6 years ago

Closing this as the main issue was resolved on #35 and there is a new issue to discuss about custom styles.