FEATURE: Show an educational message in the quick access menu for personal messages when there are none (PR #12564)

If the user has not been sent any messages, show a message in the quick access menu with an educational message:

GitHub

The title of this pull request changed from “FEATURE: [Blank Page Improvements] Show an educational message in the quick access menu for personal messages” to "FEATURE: Show an educational message in the quick access menu for personal messages

The title of this pull request changed from “FEATURE: Show an educational message in the quick access menu for personal messages” to "FEATURE: Show an educational message in the quick access menu for personal messages when there are none

I would prefer a proper htm enclosing element than this double br

This + p, feels very hacky :stuck_out_tongue:

do we need get here?

Ah guess not. Is there any situation where get is actually necessary? Is it just for long chained objects like get("something.nested.really.far")?

The other thing I could do is push stuff into an array then join it all at the end!

Yes makes sense will wrap with a

, then I can end the other

properly.

get is only useful if you are certain tou have first object (this for example) and you might not have second one.

at some point we will be able to use optional chaining, which should make things better.

Oh wait still doesn’t help the hack…will do the array thing and also wrap the link with a p, and make the empty-state-body a div.

This doesn’t seem necessary, recipients defaults to an empty array in the action.

Could we use the existing can_send_private_message? method and check against the system user? We do something similar in the user card serializer:

        Please contribute to this community by participating in public topics. Use messaging as a last resort when you want to reach a specific person. Please note: staff can read all messages. See <a href='%{privacyLink}' target='blank'>privacy policy</a>.

Contribute by contributing sounded a bit repetitive. I also made some other tiny tweaks.

I found this was actually a problem in composer-user-selector, it was trying to split the recipients variable loaded in which did not work for the default empty array (everywhere else we use createNewMessageViaParams we specify recipients)

1 Like

For some reason yesterday this was really inconsistently working for me but today it is fine…will just get rid of the new method :S

1 Like