Commit Graph

173 Commits

Author SHA1 Message Date
Jonathan Rainville 2e25bf4f8a fix(CompactMessage): fix message hover getting stuck
Fixes #2226 and #2196
2021-04-21 18:05:42 -04:00
Pascal Precht b36652348a uiux(Chat): ensure emojis are centered vertically within messages
Closes #227
2021-04-20 13:06:25 -04:00
Pascal Precht aeedc87368 feat: introduce global settings
This commit introces global settings that apply across accounts used
inside the application. This is useful when settings like the selected
locale should b the same across all accounts.

Closes #2144
2021-04-19 13:53:14 +02:00
Pascal Precht 6529efda4d uiux: fix sticker message border color 2021-04-15 16:59:55 -04:00
Jonathan Rainville 63b5c549b9 fix: fix invite button not setting Joined correctly
Fixes #2209
2021-04-13 17:50:32 -04:00
Jonathan Rainville 8607251a6e fix: fix qml warnings 2021-04-13 17:49:43 -04:00
Jonathan Rainville a9cae5b96e fix: fix compact message hover when a popup is opened
Fixes #2187
2021-04-13 14:43:48 -04:00
Jonathan Rainville b1fbad91fe fix: fix channel-identifier-dark-text 2021-04-13 14:42:45 -04:00
Jonathan Rainville 10fd90a152 fix: date label not showing correctly
Fixes #2184
2021-04-13 14:40:44 -04:00
Jonathan Rainville 1bc3fa1c97 fix: fix sticker click modal to only open on sticker click 2021-03-30 16:08:13 -04:00
Jonathan Rainville 0478a04db9 fix: fix chat time tooltip being too big
Fixes #1946
2021-03-25 16:57:47 -04:00
Iuri Matias 4e15002beb hide reactions and replies when the message is a transaction 2021-03-24 14:43:04 -04:00
Pascal Precht c28d4054ef fix(Chat): ensure chat reply separator doesn't leak into message
Fixes #1988
2021-03-24 14:17:43 -04:00
Jonathan Rainville 7188579e46 fix: fix mention showing as pubkey and show styling 2021-03-24 14:16:55 -04:00
Pascal Precht e1a4a47636 fix(Chat): disable HoverHandler when profile popup or context menu are open
Alright, this is an interesting one:

As described in #1829, when the profile popup is opened within the chat view,
users are still able to click *through* the popup on message, which then puts them in
an active state.

I've done a bunch of debugging as described [here](https://github.com/status-im/status-desktop/issues/1829#issuecomment-804748148) and after doing some
further debugging, I found out that `isMessageActive` isn't really the culprit here.

What causes this effect is the `HoverHandler` that's attached to the `CompactMessage` item.
`HoverHandler` is a standard QML type that emits `hoverChanged` signals so one can do things like
applying hover effects on elements, which is exactly what we do:

```
HoverHandler {
  onHoverChanged: {
    root.isHovered = hovered  // `root` being the message item
  }
}
```

I assume we went with this handler because putting a `MouseArea` in there instead, which fills
the entire message component pretty much eliminates all existing mouse handlers attached to
other child components, such as the profile image or the username of the message, which also
open a message context menu.

It turns out that, having a `HoverHandler` as described above, actually activates it when the
user clicks with the left mouse button as well (not just on hover). That's what causes the "click-through"
effect. This can be verified by setting `acceptedButtons` to `Qt.RightButton`, basically telling
the handler that only right clicks will activate it.

I then tried using `Qt.NoButtons` instead so that no button clicks and only hovers will activate
the handler, but that didn't seem to have any effect at all. It still defaults to `Qt.LeftButton`.

So the last resort was to disable the `HoverHandler` altogether, whenever either the profile popup,
or the message context menu (for emojis etc) is open.

Unfortunately, we don't have access to the profile popup in the compact message component, because it's
detached from the component tree. Therefore, I've introduced a new property `profilePopupOpened` on
the chat layout, which we can read from instead.

Fixes #1829
2021-03-23 10:32:31 -04:00
Jonathan Rainville 62d10eba49 feat: show community invite component on community link 2021-03-17 16:09:23 -04:00
Richard Ramos 4f4a3f1c30 feat: see stickers details when clicking on a sticker 2021-03-16 15:39:52 -04:00
Pascal Precht 86ea7014f6 fix(Communities): make rejoining communities work
When the communities code was moved into its own view in https://github.com/status-im/status-desktop/commit/b38d1df59
it broke the functionality to join communities again.

Qt complains that the Nim API in use `chatsModel.communities.joinCommunity`
expects two parameters, when it's call with just one.
This is unexpected because the API in question set a default value
for its second parameter.

To make this work again, we have to make sure the `setActive`
parameter is supplied every time we call the API from
within QML.

Also, worth noting that this is not the first time we're running into
a scenario like this.
2021-03-05 13:59:44 -05:00
Jonathan Rainville 84034d5dbf fix: fix channel color in communities 2021-03-03 16:45:23 -05:00
Jonathan Rainville c5241e2bf4 feat: intercept clicks on messages links as well 2021-03-03 16:45:23 -05:00
Jonathan Rainville 35688e9740 feat: show unfurled link for status chats in 1:1 2021-03-03 16:45:23 -05:00
Jonathan Rainville b38d1df591 refactor: move communities functions to communities view in chat 2021-03-03 16:45:23 -05:00
Pascal Precht bd9fa37ce3 fix(Chat): ensure correct contact username is shown
In some cases inside of 1-on-1 chats, the fake messages added to
the beginning of the message list, wouldn't determine the correct
username of the contact in question.

This commit explicitly calls `chatsModel.userNameOrAlias()` instead
of relying on `activeChannel.name` which tries to do the same.
2021-02-23 10:42:23 -05:00
Jonathan Rainville ae56a360c4 fix: message height taking into account the image even when hidden 2021-02-22 17:29:06 -05:00
Jonathan Rainville 6eee5da36e fix: fix texts to use secondaryText instead of darkGrey 2021-02-22 09:58:18 -05:00
Jonathan Rainville 46412204c5 feat: implement new colors for dark mode 2021-02-18 15:24:12 -05:00
Jonathan Rainville 0e699cac65 chore: run translation scripts 2021-02-18 15:23:58 -05:00
Iuri Matias 7b5a1660f8 make compact mode the default 2021-02-10 15:48:57 -05:00
Richard Ramos e8c169aace fix: make the time not selectable 2021-02-10 13:53:09 -05:00
Richard Ramos 0f44178c85 feat: add tooltip with the message timestamp when hovering the chat time 2021-02-10 13:53:09 -05:00
Richard Ramos b2262c8105 Show chat image and username again after a couple of minutes in chat
Fixes #1764
2021-02-10 13:52:36 -05:00
ace-smart 0c65551b45 Limited StatusToolTip width for maxWidth. Fixes #1817 2021-02-10 13:37:02 -05:00
ace-smart 9950221159 Adjusted padding and margin of the StatusTooltip component as design. Fixes #1817 2021-02-10 13:37:02 -05:00
Richard Ramos 3f525a0b2a fix: hover state on compact messages 2021-02-10 09:52:05 -05:00
Jonathan Rainville cabc82782c fix: fix emojis on normal mode and replies on compact 2021-02-08 16:48:14 -05:00
Jonathan Rainville e57fc2afb7 fix: fix appearance container to not have hover state and better height 2021-02-08 16:48:14 -05:00
Jonathan Rainville 51a379efda fix: add hover color for active emoji and fix corner 2021-02-08 16:48:14 -05:00
Jonathan Rainville 55920a4f9d feat: use StatusTooltip for emoji reaction list 2021-02-08 16:48:14 -05:00
Jonathan Rainville 984133ba4a feat: position emoji picker next to button group on the top 2021-02-08 16:48:14 -05:00
Jonathan Rainville 02651326b5 feat: add hover and selected state to the emoji picker 2021-02-08 16:48:14 -05:00
Jonathan Rainville c665861820 fix: fix button alignment and background glitch in compact mode 2021-02-08 16:48:14 -05:00
Jonathan Rainville 8a43fffd77 feat: add back date group in compact mode 2021-02-08 16:48:14 -05:00
Jonathan Rainville bffe888b0d feat: improve compact mode to fix all alignements 2021-02-08 16:48:14 -05:00
Richard Ramos f0479a50b1 fix: do not use a loading indicator for identicons 2021-02-01 12:00:03 -05:00
Jonathan Rainville b773766055 fix: fix chatIdentifier binding loop 2021-02-01 11:54:26 -05:00
Jonathan Rainville b245d858aa feat: redisgn compact mode part 1
redesigns the compact mode to have a nice hover, easier replying and adding reactions and more

Missing parts are aligning chat command, images and unfurlings, redesigning mentions and the channel list and also trying to find a way to re-enable link hovers in the text
2021-02-01 11:54:26 -05:00
Jonathan Rainville 21edea4a9a fix: fix double popup for estimating gas errors 2021-01-21 11:59:51 -05:00
Jonathan Rainville 444072f599 feat: call getPreviewData (url unfurling) in a separate thread
Fixes #1678
2021-01-19 16:51:59 -05:00
Malik Al-Jabr 3ad3739218 fix: gas estimate error
fixes #935
A bug occurs when someone requests a large amount of funds from you since the gas estimation will fail and there isn't a way of handling errors in the source yet.

This PR handles the error appropriatley for both `estimateGas` and `estimateTokenGas` where the response is only converted from hex to int if the RPC call was successful. Otherwise return the error message as the response and let the UI decide how to display it.

Currently the error for gas estimation in transaction bubbles is displayed in a popup however, ive come to realize that 2 popups open instead of one. This is a new bug of which I can't pinpoint the root cause at the moment and have opted to file a separate issue for it.
2021-01-19 16:11:06 -05:00
staked-smart-ace f2eda36569 Fixes #1610 2021-01-15 13:51:52 -05:00