Commit Graph

53 Commits

Author SHA1 Message Date
Jonathan Rainville a01e851070 fix: fix being unable to put multiple spaces in a row 2021-04-01 17:07:25 -04:00
Jonathan Rainville 4af1135f6c fix: show formation menu in middle of selection or above double click 2021-04-01 16:49:02 -04:00
Pascal Precht 42e3444731 fix(StatusChatInput): fix text area alignment so it doesn't jump
There was a UI bug in the StatusChatInput where, only in the timeline view,
the scrollview wrapping the textarea would have a weird behaviour in which
it would render the visible text(placeholder) *lower* than how it's actually
positioned. Once the textarea is clicked, it would re-adjust with a smooth
scroll.

Obviously this is undesired behaviour as the text should always render in the
correct position.

This commit finally fixes this weird behaviour by moving the dynamic height
calculation to the wrapping Rectangle and changing the textarea's top- and
bottom paddings dynamically.

Fixes #2018
2021-03-24 14:35:30 -04:00
Jonathan Rainville 5d67a3f5f9 fix: fix sending three word names mentions not working 2021-03-24 14:16:55 -04:00
Jonathan Rainville 7fb9578285 feat: highlite mentions in the chat input as well 2021-03-22 15:49:21 -04:00
Eric Mastro f1e83f74bc feat: drag and drop images
Allow up to 5 images to be dragged and dropped in to one-on-one chats and in the timeline. Can be combined with the existing upload button. The upload file dialog has been changed to allow multiple selections. Drag and dropped images adhere to the following rules, with corresponding validations messages:
- Max 5 image
- Image size must be 0.5 MB or less
- File extension must be one of [".png", ".jpg", ".jpeg", ".heif", "tif", ".tiff"]

Drag and drop and uploaded images are now also deduplicated.
2021-03-16 13:51:37 -04:00
Pascal Precht e6f17fdf55 uiux(StatusChatInput): highlight matching formatting option
This will highlight any option in the text formatting menu whose
formatting matches the selected text formatting

Closes #1931
2021-03-04 08:57:43 -05:00
Pascal Precht 6603f025c3 fix(StatusChatInput): exclude markdown indicators from formatting
Closes #1928
2021-03-03 15:42:42 -05:00
Pascal Precht ed0b9ec1d6 uiux(StatusChatInput): close text format menu on deletion
Closes #1932
2021-03-03 13:30:57 -05:00
Richard Ramos 608455f563 fix: improve qml bottlenecks 2021-03-01 14:17:26 -05:00
Pascal Precht 10636c2460 feat(StatusChatInput): render formatted text inside input
Closes #1796
2021-02-18 16:37:36 -05:00
Jonathan Rainville 0e699cac65 chore: run translation scripts 2021-02-18 15:23:58 -05:00
Pascal Precht 96c2f123b4 feat(StatusChatInput): make text input formatting work via shortcuts
Closes #1803
2021-02-15 16:22:16 -05:00
Pascal Precht 6c272dddf6 feat(StatusChatInput): introduce context menu to format message
Closes #1804
2021-02-12 14:44:47 -05:00
Richard Ramos 58e9584984 fix: make mentions with nicknames work the same as mobile 2021-02-12 14:39:34 -05:00
Richard Ramos 554128da50 fix: cursor position 2021-02-08 17:38:42 -05:00
Richard Ramos 9d9f51c080 fix: code review - 2 2021-02-08 17:38:42 -05:00
Richard Ramos 7178ae5910 fix: code review 2021-02-08 17:38:42 -05:00
Richard Ramos 21176f702f fix: remove format on text
Fixes #1771
2021-02-08 17:38:42 -05:00
Richard Ramos d0de5c074f fix: populate suggestion box with all users from the message list
Fixes: #1328
2021-02-08 17:37:44 -05:00
Pascal Precht ea2238f998
uiux(StatusTimeline): fix send button look & feel
Due to how `StatusButton` has evolved, the send button in the Status
timeline no longer looked and behaved the way it was supposed to.

This commit patches that by introducing new properties to `StatusButton`
and making use of them in the Status timline, so that existing buttons
don't break.

It also fixes a bug in the StatusButton where the hovered background
color was wrongly calculated.
2021-02-02 11:51:02 +01:00
staked-smart-ace 2b3bbb0b1e Updated selection color of the chat input box as the design. Fixes #1750 2021-02-01 11:49:04 -05:00
Jonathan Rainville 94f1267ea9 feat: enables inserting emojis and mentions using Tab as well 2021-01-21 12:04:50 -05:00
staked-smart-ace 086c868bdc
uiux(StatusButton): introduce warn type
Fixes #1603
2021-01-19 12:45:03 +01:00
staked-smart-ace c6c8ed0858 Fixed radius issue of the chat input box. Fixes #1612 2021-01-15 10:54:40 -05:00
staked-smart-ace 96b09fd025 Fixes #1611 2021-01-14 15:59:45 -05:00
Jonathan Rainville 37edfed446 fix: fix QML warnings 2021-01-04 15:23:23 -05:00
Pascal Precht 400b020118 fix(StatusChatInput): ensure send button is disabled when message limit is exceeded
This was missing in the previous work we've done to make the `StatusChatInput` work
as a status timeline update component.

This commit also adds an event handler which was missing to trigger the `onMessage`
event when the send button is clicked.
2020-12-21 14:14:48 -05:00
emizzle ba48b266a9 chore: re-add sticker loading UI
The sticker loading UI was removed when the StatusChatInput and friends were added in. This PR re-adds the sticker loading UI introduced in PR# 955 (https://github.com/status-im/nim-status-client/pull/955).
2020-12-18 15:34:31 -05:00
Pascal Precht f512d5063c feat: introduce StatusUpdateChatInput variation
This commit changes the `StatusChatInput` component to also be a `StatusUpdateInput`.
The latter isn't an actual new type or component, it's just a visual variation of the already
existing status chat input. That's my most of the changes are `isStatusUpdateInput` conditions
sprinkled here and there.

In addition, this commit introduces a new `chatType` which is passed to `StatusChatInput` later
in the timeline view, so it knows it has to render like a status update input.
2020-12-14 12:36:49 +01:00
Richard Ramos 02867d8627 fix: newlines on chat input 2020-12-11 14:04:06 -05:00
Pascal Precht 2baf56f505 refactor(Chat): move suggestions ListModel into StatusChatInput
StatusChatInput was relying on the suggestions ListModel, even though there was
no guarantee that it would exist. This is more apparent when using the component
in different context (e.g. Timeline/Status Updates). QML will throw a reference
error in this case.
2020-12-10 12:30:31 +01:00
Pascal Precht 9745205302 refactor(Chat): move send message logic out of status chat input
`StatusChatInput` ideally shouldn't rely on chatsModel and other global
objects at all. Also, when using the component in different places, it can cause
accidental sending of message when testing the component (because all the logic is already
wired up)
2020-12-10 12:30:31 +01:00
Richard Ramos ae30d04010 refactor: ProfileView 2020-12-08 17:01:22 -05:00
hydrogen dacbadbed1 fix: markdown leading space 2020-12-08 16:59:51 -05:00
Pascal Precht 0957ec1ded chore: disable stickers popup when no stickers available
This is needed so that statusChatInput can work for the timeline without
exploding. Timeline doesn't need stickers
2020-12-07 13:52:25 +01:00
Pascal Precht e79c754405 refactor(StatusChatInput): fine-tune image area and prepare for status update input 2020-12-07 13:52:25 +01:00
hydrogen f69da599ae fix: update chat view after user is blocked 2020-12-04 15:52:04 -05:00
hydrogen 8fd28dfad6 fix: check if user is blocked on profile popup
This PR is a response to @emizzle's suggested change in PR #1431 . It checks if a user is blocked before exposing certain functionality to the user in a Profile popup. The new unblock button also has a fail-safe unblock confirmation popup

disable the chat input if 1-on-1 chat recipient has been blocked.
2020-12-04 15:52:04 -05:00
Richard Ramos 159c82c329 feat: choose network 2020-11-26 11:44:49 -05:00
emizzle 417194e7b4 feat: Keyboard shortcuts
Add keyboard shortcuts according to https://notes.status.im/02cfVf1KQLeQU2SqrIi9tw

fix: update chat message bubbles
- Align emojis to middle of text
- Add line-height as per design
- Properly support RTL languages (right-aligned) and LTR languages (left-aligned)
- Remove unneeded non-breaking space at the beginning of current user messages
- Properly support markdown for bold, strikethrough, and italic
- Fix text being removed when in between strikethrough markdown (~~)

fix: emoji resolution update for high resolution monitors
- Emojis now use the 72x72 original set, but are down-scaled to 20x20 (in chat bubbles) or 22x22 in other places, effectively tripling their pixel density

feat: handle new lines in blockquote

Handle new lines in blockquote so that messages display correctly.

Also, add functionality when a new line is entered in to the chat input, if it's inside a blockquote, a new ">" will be added automatically. This is also handled when backspace is entered.

feat: update xss to support full qt html4 table and table-cell attributes
2020-11-26 11:33:32 -05:00
Pascal Precht 69fd2dc99b uiux(StatusChatInput): ensure input gets focussed when replying to messages 2020-11-24 11:20:09 +01:00
Jonathan Rainville d49be78417 feat: show nickname if there is one in the mentions 2020-11-19 17:00:28 -05:00
Jonathan Rainville d4a220b051 fix: enable copying <script> but will still go away when putting emoji 2020-11-19 16:58:41 -05:00
Jonathan Rainville 537ae7991b fix: make sure the mention and emoji pickers close when pressing escape 2020-11-19 13:54:17 -05:00
Jonathan Rainville 89b45146fc fix: fix ens names that are not status having an extra `.eth` added 2020-11-19 13:54:17 -05:00
Jonathan Rainville cecaa292ba feat: enable putting text after the shrug or tableflip 2020-11-17 09:27:57 -05:00
Jonathan Rainville 84ff2b21a9 fix: fix a couple of QML warnings 2020-10-27 10:23:40 -04:00
Jonathan Rainville 4371501efc feat: style mention suggestions and make it work with keyboard 2020-10-20 17:21:02 -04:00
Jonathan Rainville 676549cccd refactor: move emoji suggestion to own component and make it reusable 2020-10-20 17:21:02 -04:00