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.
This commit adds a menu item to the message context menu to
copy links that may exist inside of a message.
There are three possible scenarios:
1. There's no link in the message, which causes the menu to not
render the dedicated menu item at all
2. There's one link in the message, which renders an additional
`Action` with a copy-to-clipboard functionality
3. There are multiple links in a single message. This adds a
nested `PopupMenu` in the existing menu with menu items for each
link extracted from the message
To make this work there were some changes in the `PopupMenu` component
needed, as it wasn't take the sub menu's `enabled` state into account
properly. This makde it always render nested menus even when they
should've been invisible.
Closes: #1733
Having the Timeline component loaded eagerly made switching
between channels rather slow because it always tries to read
the current message list from the chats model.
This commit changes the layout so that the timeline layout container
is only loaded conditionally when indeed activated.
This commit checks on bootstrap what the currently configured theme
of the user is and loads the system tray icon in its corresponding
variation.
Unfortunately, MacOS doesn't seem to automatically swap out the icons
based on the system's theme, so we have to do it manually with two
different SVG files.
Another gotcha here is that, it doesn't seem to be possible to change
the system tray icon at runtime. When trying to reassign the `icon.source`
based on a newly selected theme, the icon disappears altogether.
The application also doesn't get notified when a user switches the theme
inside the operating system, requiring her to switch to the same theme
manually unless restarted.
Last but not least, using SVG files instead of PNG doesn't seem to solve
the problem that the icon is rendered blurry. I've looked in the docs
but there doesn't seem to be an option to have any influence on that...
This commit introduces the new design and behaviour of the modal
that opens up when starting a new 1-on-1 chat.
Main changes include:
- New search UI/UX functionality of users and ENS resolutions
- Composed view of existing contacts and contacts to be searched
- Ability to add contacts from within the modal
Closes: #1747
This was missing in one of our previous PRs and causes the
channel context menu to not function properly e.g. when deleting
chats, it currently always deletes the first chat in the channel list
instead of the active channel.
There's a bug in the `SetCurrencyModal` where it runs into a callstack size
exceeded error because we're calling it's `open()` API to open itself.
That function happens to call itself again and again.
The reason that API was introduced in the first place, was to ensure that
the configured default currency is reflected currectly.
This commit fixes that issue by getting rid off the `open()` and `close()`
APIs which cause the mentioned error, and rely on `openPopup`'s parameters
configuration instead.
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.
There's a bug in the profile popup where we're calling an API that
actually doesn't exist. This commit fixes it by calling into the
correct `profileModel` member, to make unblocking users work.
There are some inconcistencies in the application when it comes to
button UI elements because we're using `StatusButton` in some places,
in other we use `StyledButton`. The latter is the original
component we've created when we started out building Status
Desktop, but is planned to be removed entirely in favour of
`StatusButton`.
This commit replaces the usages of `StyledButton` with `StatusButton`
StatusButton has a lot of issues when it comes to consistent behaviour
and look & feel. This includes things like calculating incorrect
hover colors as well as not being flexible enough to be used in various
scenarios
This commit changes StatusButton so that it's able to handle outlined
versions of warn buttons, calculates proper colors and more.
Many of these changes introduce heuristics to make things work.
In the long run, we should revisit the different variants that exists
(primary, secondary, outlined, warn etc) to encode them properly
in the API.
There are some places in the application where a custom round
button has been implemented, which essentially can be realized
using our `StatusRoundButton`. This commit addresses those cases.
The `StatusRoundButton` was missing the `hoverEnabled` flag, causing it
to not turn the cursor into a pointer when the component is hovered.
It's also not rendering the proper hover color.
This commit fixes that to improve usability and look & feel.
There's a but in the app's profile section where the link to
invite friends is never rendered, even if the currently logged-in
user has no added contacts.
This is because the UI refers to the count of *all* contacts the
user has (even removed ones - remember that, once added, removing
a contact is only done by removing a tag).
This commit ensures that the invitation link is rendered by
relying on the *added* contacts list. It also prevents the
"blocked contacts" button from rendered when there's no blocked
contacts.
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
This commit does a bunch of things:
- First and foremost, it removes the active channel dependency.
This is needed to have it operate on the correct channel object,
without forcing us to change the active channel (e.g. right-clicking
on a channel item that's not active, will make it active eventually)
- To make that work, this commit changes the `ChannelContextMenu`
to receive a `ChatItemView`, so it can be used for things like determining
what menu options are shown, what members are in a group, whether
someone is admin of a group etc.
- This also required a new `QtProperty` called `contextChannel`.
The reason this is required, is because in some cases, like receiving
members count of groups, we need a complete `ChatItemView` object
as we don't have access to certain APIs otherwise.
- Unfortunately, we can't pass down `activeChannel` every where for that
because sometimes the context menu should not actually operate on
the active channel.
Fixes: #1755
This commit introduces a new `ChannelContextMenu` component that can be reused
in different places, such as the channel list, as well as the chat bar.
At the moment we use two different pop up menus that also show two different
set of menu options. By using `ChanelContextMenu` in both of these places,
we get the same menu and same experience.
Closes#1711
With the recent addition of the `muted` property in this component,
the `width` is no longer reliably calculated. Sometimes it can happen
that the muted bell icon jumps out of the component. This is very apparent
inside of a `StatusChatInfoButton`.
This commit ensure that the width of this component always includes all
of its children, fixing the ui bug mentioned above.
This is a new form control component to select colors for wallet
accounts. It will replace the currently used `ColorSelect` in the
Status Desktop application so it aligns with the new designs.
Closes#1497
It was requested to change the tooltip to black an white and white on
black in dark and light themes respectively.
This commit changes the colors accordingly.
The background color of the component was hard coded to grey.
This commit changes it to `backgroundHover` so it looks consistent
in dark and light themes.
This introduces a new component to render Addresses that can be
expanded as well as copied using `CopyToClipBoardButton`.
While there's already an `Address` component that allows for expansion,
it doesn't give us control over it's look and feel and, should rather
be a `Button` anyways.
There's also cases in the application where we render a collapsed address
and don't allow for expanding it. In such cases, we might not want/need
a button at all.
Might make sense to introduce a separate address component that just shows
a collapsed address without any behaviour, which can then be used inside
`StatusExapandableAddress`.
Closes#1633
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.
As reported in #1584 the message that asks users to backup their seed phrase
is shown even when the seed phrase was imported in the first place, implying that
the mnemonic is already backed (it has to come from somewhere, right?).
This commit introduces a new `appSettings` property that is temporarily set to
determine whether or not the backup message should be shown.
It's set only temporarily because we actualy determine whether we want to show the
backup message, by checking if the account's mnemonic is still stored in the settings.
When a backup is done, Status removes the mnemonic from the profile settings.
So in order to get the right behaviour we need to make sure to remove the mnemonic
from the profile settings after the account has logged-in and originated from
an imported seed phrase. This is done by setting the mentioned property.
Closes#1584
This is a component that is similar to the `StatusSectionMenuItem` component, just
with the difference that it's not a clickable element, rather "description" element,
inspired by HTML `<dl>`, `<dt>` and `<dd>` elements ("description list", "description term",
"description" respectively).
The component comes with a `CopyToClipBoardButton` by default. We might want to decide
to make it configurable later on, as there could be places where we just want to
render the description item, without a copyble description.
Adding a contact through the Add Contact Modal isn't working because the
function being called to add a contact doesn't actually exist.
This was most likely a mistake as the change was just to call that function
in question from a different property.
This commit does exactly that.
Fixes#1660
Setting the default currency through the UI doesn't work because of a `MouseArea` that
is masking the an underlying `StatusRadioButton` which will tricker the default currency
change.
This commit enhances the `MouseArea` to trigger the default currency change and it
also ensures the UI is responding accordingly. Namely that the new default currency
is correcly selected in the list of currencies.
There's also a little change in the background hover color so it works well across
light and dark themes.
Fixes#1632
This commit does a couple of things:
- It changes a label in the wallet menu from "Add/remove Token" to "Manage Assets"
as it has been designed
- It changes the asset list so a hover state could be introduced. Previously there
was no visual effect or response to mouse hover on asset items
- It improves usability of the asset list by making an entire asset item
clickable to toggle the asset in the wallet. This was not possible before.
Users had to click the checkbox achieve this effect
Closes#1631
This commit makes reactions in the status timeline work.
There are two things prior to this commit that are broken:
1. The logic that opens the reaction context menu always expects
and instance of `chatsView` because it tries to calculate a users
nickname. Such an instance isn't always available in that context, so
the nickname logic has been moved to `appMain` for now, removing that
dependency and therefore making it work in both, the chat view as well
as the status view.
2. While 1) makes the context menu work, it turns out that adding and
removing reactions inside the status timeline is still not working.
The reason for that is, that the reactions component maintains its own
`messageList`, which isn't aware of the fact that reactions for messages
coming from chats of `ChatType.Profile`, need to go into a dedicated
message list for `ChatType.Timeline`.
In other words, reactions are sent and removed from message in messagelists
that don't actually exist.
This commit fixes both of these things by ensuring the message lists
maintained by reactions are timeline aware. Also ensuring updates are
done correctly.
`StyledButton` is considered obsolete and by using `StatusButton` we're getting
the expected and correct look & feel of buttons by default.
Closes#1627
The contact list was taking the entire width of its surrounding element,
making it grow too wide to be usable (see #1589).
In fact, it's not following the designs made for this part of the application,
so this commit changes the max layout width to align with the intended
design and should also fix some of the usability issues mentioned in #1589Fixes#1589
The "more actions" button in the contacts list had some hard coded colors
for its hover effect which break the experience in dark mode.
This commit makes changes those so that they work universally.
When the network connection is changed, the sticker packs are cleared and then re-loaded (either loading the offline (installed) sticker packs, or all the sticker packs from the network).
Stickers can be sent while offline, though the sticker images do not load once offline (this is likely a side effect of the bug described below).
There is a known bug in QNetworkAccessManager (https://bugreports.qt.io/browse/QTBUG-55180) that was re-introduced in 5.14.1 that does not allow us to download resources if we go offline then come back online. The workaround employed in this PR manually sets the NetworkAccessible property of QNetworkAccessManager once we have been connected back online. The NetworkAccessible property is marked as obsolete and will be removed in Qt6, so it is something that we need to be aware of when we upgrade. However the hope is that the bug has been fixed.
Close StickersPopup when disconnected from network (so that re-loading of sticker packs doesn't look out of place).
fix: set network status correctly at load
feat: stickers gas estimate async
feat: When network re-connected, any http images that were not properly loaded in an ImageLoader component will automatically be reloaded.
fix: Sticker button loading icon
chore: Bump nimqml and dotherside
NOTE: This PR uses an updated nimqml and dotherside. The respective changes should be merged first, and the commit hash should be bumped in this PR prior to merging. Relevant PRs:
[https://github.com/status-im/dotherside/pull/20](https://github.com/status-im/dotherside/pull/20)
[https://github.com/status-im/nimqml/pull/17](https://github.com/status-im/nimqml/pull/17)
Prior to this commit, the function was expected on a `chatView` QML object.
This has worked out so far because the places where the API is used were always
living inside `ChatLayout`.
With the new timeline however, this is no longer the case so we have to make sure
that the API is available to other views as well.
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.
This commit introduces some `MouseArea`s so components inside the
`StatusUpdate` component cancel it out by having a higher `z`.
Also, in some cases we need to conditionally set the `root.hovered` property
to ensure the values get inverted correctly, otherwise it causes undesired
flicker effects.
Fixes#1377.
Fixes#1479.
Two sites have been added to the whitelist: giphy.com and tenor.com.
`imageUrls` in its entirety has been removed and instead all links are being handle through the message `linkUrls`. This prevents double-handling of urls that may or may not be images.
The logic to automatically show links previews works like this:
1. If the setting "display chat images" is enabled, all links that *contain* ".png", ".jpg", ".jpeg", ".svg", ".gif" will be automatically shown. If the URL doesn't contain the extension, we are not downloading it. This was meant to be somewhat of a security compromise as we do not want to download each and every link posted in a message just to find out its true content type.
2. If the above setting is *disabled*, then we follow the whitelist settings for tenor and giphy. This allows us to preview gifs that do not have a file extension in their url.
feat: bump status-go to the commit that supports the new whitelist (https://github.com/status-im/status-go/pull/2094), and also lets us get link preview data from urls in the whitelist. NOTE: this commit was branched off status-go `develop`, so once it is merged, and we update this PR to the new commit, we will effectively be getting status-go develop changes. We *could* base that status-go PR off of master if it makes things easier.
fix: height on settings update issue
feat: move date/time of message below links
fix: layout issues when changing setting `neverAskAboutUnfurlingAgain`
feat: Add MessageBorder component to aid in showing rounded corners with different radius
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.
This is needed when accessing the context menu from the timeline status updates.
Previously, it'd only change the active channel because it assumed the user is already
in the chat view. This is no longer the case when in timeline view, so we need to make sure
we first navigate to the chat view.
YouTube link unfurling was not working for a couple reasons.
There were two main parts fixed:
1. QML context for messages pertaining to linkUrls and imageUrls was changed from implicit to explicit. By this, I mean that any time we referenced linkUrls/imageUrls, we were relying on the knowledge that those values would be populated by some parent context several levels up. Now, we are referring to properties that have been explicitly defined on the components. This offers the ability to reuse components, and makes reading the code and debugging much easier.
2. Error handling has been added to getting link preview data. An unhandled "error" was thrown each time a link that wasn't whitelisted was passed in, causing the app to crash. For example, when a link to a tenor gif was posted in the chat, that URL was not whitelisted, causing the app to crash.
In timeline status update messages we want to render the ENS name next to a
local nickname in case it exists. This commit extends the `UsernameLabel` to do
just that.
Closes#1488
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.
`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)
We were only resetting the `Image` source but not the consumer facing `imageSource`
property when removing a selected image from the image area.
This cause the `imageSource` to practically never change after an image has
been selected the first time. Selecting an image another time would open the
image area, but if the image happens to be the same as the first time, the `imageSource`
practically didn't change, causing the app to render an "empty" image.
We've introduced a bug in https://github.com/status-im/nim-status-client/commit/8fd28dfa where a
non-existing `UnblockContactConfirmationDialog` usage was added.
This commit changes it to be a standard `ConfirmationDialog` to make the application compile
again.
This is done because there's gonna be a case where this connection causes errors
because the component expects `NormalMessage` to be a parent of this component.
When used in future StatusUpdates, there's no `NormalMessage`. Unfortunately,
disabling the connection based on a condition doesn't remove the error, so we have
to move this code out entirely
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.
fix#898
The segmentation fault occured because the RPC response returned json with an error message as oppossed to the usual data required to update the chat. Since the section of the code didn't handle this error message it caused the app to crash. I've handled this error to show an error alert box by emitting a event
- Account color is used in list hightlight, separator and tabs
- Popup fields are cleared when opened
- Account color is randomized when popup is opened
- Show scrollbars in asset list if needed
- Show scrollbars in account list if needed
- Fix margin between assets
- Add symbol to asset amounts
- Stop scrolling at element bounds
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
fixes https://github.com/status-im/nim-status-client/issues/1232
This PR repurposes the DownloadView into a Loader component of a browser tab and is displayed when:
1. a new downloads tab is opened or
2. a new tab with the link status://downloads or finally when
3. the ShowAll button has been clicked.
You can open any number of Downloads tabs
When you open a new tab and type in status://downloads the title will remain as 'New Tab'
fix: add localization
The transaction component's `reset` functionality was meant ot reset a form when the modal was closed. It was difficult to manage and added extra overhead for each additional transaction modal created.
Instead of using reset functions, we can use Loaders to load and destroy the modal's as they are opened and closed. We do not need to keep them in memory and then also reset their functions. It creates a smaller memory footprint to destroy the object and reload on open.
feat: load gas prediction prices asynchronously
When the `StatusLetterIdenticon` received a `#channel` name that starts
with `#`, it wouldn't properly determine the channel color because of
not stripping out the `#`.