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

Create Inbox in User Account tab #22

Closed
NewZeal opened this issue Jun 5, 2017 · 3 comments
Closed

Create Inbox in User Account tab #22

NewZeal opened this issue Jun 5, 2017 · 3 comments

Comments

@NewZeal
Copy link
Collaborator

NewZeal commented Jun 5, 2017

There should be a tab in the User Account called 'messages' or 'private messages'.
Clicking on that should display the Inbox.
Inbox could have one of two formats:

  1. Display of all incoming private messages in date order
  2. Display of all private message threads in date order. A thread is defined as a message between two people. Each thread would require a separate url, something like user/%/private-messages/% .

#1 above is easier to implement but is potentially shambolic
#2 conforms with people's tendency to have 'conversations' and to be able to see the conversation as a thread as on other platforms such as Facebook. However there would be complications where more than one person is on the receiving end of a message.

Threads
A message thread should be a new entity.
A message thread is started when a conversation starts
A new message thread is started when the participants change

Inbox can be implemented using Views.

@mccrodp
Copy link
Owner

mccrodp commented Jun 6, 2017

Thanks for this and taking a closer look. I believe this is already created in views, if it's not showing, then it's just something a little off.

Please see the below routes in https://github.com/mccrodp/message_private/blob/8.x-1.x/message_private.routing.yml:

message_private.messages:
  path: '/user/{user}/messages'
  defaults:
    _title: 'Inbox'
  description: 'Message Private Inbox'
  requirements:
    _permission: 'overview messages'

message_private.messages.inbox:
  path: '/user/{user}/messages'
  defaults:
    _title: 'Inbox'
  description: 'Message Private Inbox'
  requirements:
    _permission: 'overview messages'

message_private.messages.sent:
  path: '/user/{user}/messages/sent'
  defaults:
    _title: 'Sent'
  description: 'Message Private Sent'
  requirements:
    _permission: 'overview messages'

There is a view for this in config: https://github.com/mccrodp/message_private/blob/8.x-1.x/config/optional/views.view.message_private.yml

There was even a local tasks for "Create New Message for X user": https://github.com/mccrodp/message_private/blob/8.x-1.x/src/Plugin/Derivative/DynamicLocalTasks.php

Rather than message thread, I was thinking more along the lines of "Conversations" like facebook, in particular integration with FOS Message library to invlove the wider PHP community, but alas I had no time. Please see the following and see what you think:

#6
FriendsOfSymfony/FOSMessage#19

From what you're saying it seems a lot of the functionality that was working before is now broken due to either a Message or Drupal core upgrade. Best to get that working first to see what is missing then and ideally get some tests in place. Again I had made a start but ran out of time on this #5

Feel free to ask any other questions. Cheers

@NewZeal
Copy link
Collaborator Author

NewZeal commented Jun 6, 2017

Ha! My bad. I see the Views now. They weren't working for me. Anyway in the new iteration of the project the inbox needs to be grouped into conversations. I've downloaded your FOS module and will look at that and compare with using a Drupal entity for thread.

@mccrodp
Copy link
Owner

mccrodp commented Jun 6, 2017

No worries, glad you got it working. I recommend to install the FOS Message demo to see what you think: https://github.com/tgalopin/FOSMessage-demo

I thought it worked really well and would be great to involve the Symfony community and not reinvent the wheel. Thing is my solution was just a start, it is way off at the moment, so you'd have to weigh up pros / cons.

I believe getting solid 1 - 1 messages not threaded first and then long term integration with the FOS Message library if possible is the way to go, but see what you think. Thanks again.

Let me know if you want Contributor access to the Message FOS module.

@mccrodp mccrodp closed this as completed Jun 14, 2017
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

No branches or pull requests

2 participants