vue-beautiful-chat
vue-beautiful-chat copied to clipboard
Added ability to have multiple chats
@mattmezza Please let me know if you have any questions or want to discuss. I updated the the chat and the demo, but not your doc. I can do it if necessary. The old demo works with the new chat, so the changes are backward compatible.
@mattmezza Hi Matteo! It looks like mine and several other pull requests failing checks with error "Error: Resource not accessible by integration". It seems to be only happening right after message "Adding message: Thanks for sending out your first PR! to pull request". Could you take a look? https://github.com/mattmezza/vue-beautiful-chat/pull/194/checks?check_run_id=1239683641 The issue is discussed here https://github.com/actions/first-interaction/issues/10 Could you remove this action?
@mattmezza I'm done with my fixes. Please take a look again. As for @a-kriya 's idea, why don't you merge it? It would be easier for contributors to see it and do the same. Right now I don't feel like converting my code to this style within this already large pull request.
@eduardsmetanin It's been merged. Since there are now conflicts with master, you'll have to rebase and resolve them. And using the store to access the necessary props will reduce the size of the diff.
@mattmezza @a-kriya This pull request is rebased and ready to be merged. I tried to use store to pass props, but I ran into 2 issues and rolled back store.state my changes:
- A prop is undefined when accessed from a method called from data() and this prop is populated via ...mapState(). Perhaps initial value can be set like this:
const store = { state: Vue.observable({ editMessage: null }),
, but I ran into a case when I needed my data (initialized in data()) to depend on a prop, which didn't work because of undefined value in the prop. As a workaround this prop can be accessed via store.state['my_prop_name']. This caused me a lot of time and frustration. Vue props work well in this case and I think we need a state management system that works just like standard props. - We currently update entire state map on every prop change:
handler(props) { // TODO: optimize for (const prop in props) { store.setState(prop, props[prop]) } }
. The TODO says it needs to be optimized. I don't know how it can be optimized.
Does Vue 3 provide an easier way to manage state? Perhaps we should wait for Vue 3 conversion and then change how we manage state?
A prop is undefined when accessed from a method called from data() and this prop is populated via ...mapState()
Expected behavior: https://jsfiddle.net/os3rxwyd/
data
is evaluated before computed
: https://forum.vuejs.org/t/computed-properties-in-data/11231/3
but I ran into a case when I needed my data (initialized in data()) to depend on a prop
Just rely on a prop in that case. The store is not meant to replace every single root prop.
We currently update entire state map on every prop change: The TODO says it needs to be optimized. I don't know how it can be optimized.
Insignificant; I'd intended to remove that comment but missed. The single statement in the loop just updates the references in the state object internally. It does not make any copies, and is fairly equivalent to running a few assignment statements.
Does Vue 3 provide an easier way to manage state? Perhaps we should wait for Vue 3 conversion and then change how we manage state?
There's not much Vue 3 will help us with here. The props are essentially put into a reactive object that is accessed from the components. That's all.
@mattmezza @a-kriya I pushed fixes for @a-kriya suggestions.
@eduardsmetanin Thank you. There's still a lot going on here, and I will need a bit to go through it and test the updates. In the meantime, if you think there are any parts to this diff that will be easier to review with some annotations, please go ahead and leave some comments at those lines.
@mattmezza Could you merge this PR? Are you waiting for something?
Hi guys,
Any news about this PR? I'm finding this feature. @eduardsmetanin if I clone your repo, this is 100% ok? Doc in your repo is outdated!
Hi guys,
Any news about this PR? I'm finding this feature. @eduardsmetanin if I clone your repo, this is 100% ok? Doc in your repo is outdated!
@silasrm You can use my clone if you want. I do NOT promise to maintain it though. I haven't updated any docs yet. It would be good to see a will to merge my changes from maintainer @mattmezza before I spend any more time on it.
Hi guys, Any news about this PR? I'm finding this feature. @eduardsmetanin if I clone your repo, this is 100% ok? Doc in your repo is outdated!
@silasrm You can use my clone if you want. I do NOT promise to maintain it though. I haven't updated any docs yet. It would be good to see a will to merge my changes from maintainer @mattmezza before I spend any more time on it.
I'm using after clone and build. Now, I'm trying to integrate to https://github.com/musonza/chat :D
@eduardsmetanin I add support to toolbox on emoji and file message types. https://github.com/beefreelancer/vue-beautiful-chat/pull/1
@mattmezza Could you please merge this pull request?
@eduardsmetanin Could you maybe solve the conflict so that your pull request can be merged in? :)
@a-kriya Will you merge this pull request if I resolve conflicts? People ask for my changes once in a while, so I think it would be beneficial for the project. I can walk you through my changes via a conference call if you wish.
Attn: @miloandco @oldner
@eduardsmetanin Could you maybe solve the conflict so that your pull request can be merged in? :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.