We can un-clutter our message context menu, which we had to share
with user actions. (Even though we only had one so far.) I added one new
user-specific action which allows you to quickly mention the user in
chat. Otherwise you would've had to copy their username or use the
completion menu.
It's convergent on mobile, it still has the hover indicator and it also
is available through the AuthorComponent.
BUG: 486252
This prevents doing actions like zooming in your screen (Meta+Equals)
because it will tripper shortcutOverride and close the menu. Instead, we
shouldn't block shortcuts but still allow closing when Escape is
pressed.
This *does* block all NeoChat shortcuts when the completion menu is
open, but personally I think this is fine. If you have this open, you
really should finish your message first!
In chatBarSizeHelper, if user is in compact mode and resizes the window,
maxWidth would be -1 and that caused something to go wrong with the
padding calculations.
Instead, just set it to root.width with some padding, so it always is
the width of the ChatBar.
Remove the relationEventContentModel function from ChatBarCache as ContentProvider makes it unneeded. This means turning ContentProvider into a QML singleton.
Make `DelegateSizeHelper` take a `QQuickItem` rather than a width value and move `TimelineDelegate` to use it rather than duplicting the code.
This requires the creation of `LibNeoChat` so that both the main and timeline modules can get access to the class.
Note: ideally more stuff will go into `LibNeoChat` but it turns out our dependencies are kinda spaghetti like and so will take some untangling.
Fix showing polls and update the events and PollHandler to make them easier to work with.
Add a PollAnswerModel to visualise poll answers.
Enable sending polls.
Create Message attached property to propagate parameters like room, timeline, index and maxContentWidth down to the message content avoiding lots of boilerplate
Key-specific handlers, such as Key.onDeletePressed implicitly accept
the event. This means that the entire logic for the delete key must
be reimplemented, and e.g. Ctrl+Delete to delete the previous *word*
was missed.
Since all it has to do is handle the typing notification and format bar,
just use the already existing Keys.onPressed handler (which does *not*
accept the event) and add a case for Delete alongside Backspace.
First, the fill mode for the sticker images shouldn't stretch them.
Also make sure there is enough padding in the category so the image
doesn't appear larger than the button. Finally, set the source size for
the images so Qt can smooth them out better.
Currently both Enter and Ctrl+Enter send the message in ChatBar on
desktop. This might be unexpected behavior to users coming from other
chat applications (eg. WhatsApp, Telegram, Element) as those send
with Enter only by default. They allow changing send to Ctrl+Enter
in settings and other option is used to insert a newline.
BUG: 476758
Move the fucntionality of ActionsHandler into ChatbarCache and ActionsModel.
At this stage there wasn't much left that is was doing and the functionality could easily move.
Rework ActionsHandler as static helper functions.
The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
Move reply pane to use MessageContentModel. This means the reply pane component is no longer required.
This commit also limits the size of code and image componets in a reply to keep them from getting too huge.
So at the moment this remains behind the feature flag as this only adds a threadmodel and a basic visualisation. There is much more to come to get it ready for full release.