Commit Graph

223 Commits

Author SHA1 Message Date
Pascal Precht 9cbdf4fa97 feat(Components): introduce `StatusRoundIcon` component
This commit introduces a `StatusRoundIcon` component which renders
a `StatusIcon` inside a rounded rectangle.

This is similar to `StatusRoundButton`, just that it isn't a clickable
component.

With these changes, we also introduce a new `StatusIconSettings` config
object that can be used across component that need icon configuration.

The configuration includes the following properties:

- `name` - Name of the icon and used to locate the asset
- `width`
- `height`

Closes #53
2022-09-21 18:20:02 +02:00
Pascal Precht 8b7911cff9 fix(Components): add proper foreground color for StatusBadge
Fixes #59
2022-09-21 18:20:02 +02:00
Pascal Precht a3525c63e3 feat(StatusIconTabButton): introduce image loading state and fallback
This commit introduces a loading indicator for cases where `icon.source`
is set (a custom image/icon) to improve UX of the component.

It also falls back to a letter identicon in case loading the image source
wasn't successful.

Usage:

```
StatusIconTabButton {
    icon.source: "SOME URL THAT CAN'T BE RESOLVED"
    icon.color: "red" // in case fallback is used, icon.color will be gray by default
    name: "Some channel" // used to generated letter identicon as fallback
}
```

Closes #37
2022-09-21 18:20:02 +02:00
Pascal Precht d7eb4ab4b3 fix(StatusRadioButton): ensure control label as correct color
Closes #51
2022-09-21 18:20:02 +02:00
Pascal Precht 9f6f36f571 refactor(sandbox): rely on global `Theme` instead of theme prop 2022-09-21 18:20:02 +02:00
Pascal Precht 6211ebcf66 chore(README): add StatusQ.Layout module to readme 2022-09-21 18:20:02 +02:00
B.Melnik d7db8dc0df chore: add StatusCheckBox
Closes: #10
2022-09-21 18:20:02 +02:00
B.Melnik 96a5b3b55a chore: add StatusRadioButton
Closes #11
2022-09-21 18:20:02 +02:00
B.Melnik f185b892ea feat: add StatusSwitch
Closes #12
2022-09-21 18:20:02 +02:00
B.Melnik 8fdd4f7e20 fix: fix crash on removing title bar 2022-09-21 18:20:02 +02:00
Pascal Precht a1e721bfc3 feat(Layout): introduce StatusAppNavBar
This commit introduces a new `StatusAppNavBar` component that can be used
to create a Status application's tab bar for dedicated tab sections such as
chat, profile, wallet etc.

The component is build in a way that it support declarative and imperative usage
where necessary.

In its most simple form, a `StatusAppNavBar` comes with a single tab button
for the chat section. Such button has to be of type `StatusNavBarTabButton`:

```qml
import StatusQ.Layout 0.1

StatusAppNavBar {
    navBarChatButton: StatusNavBarTabButton {
        icon.name: "chat"
        badge.value: 33
        badge.visible: true
        tooltip.text: "Chat"
    }
}
```

In addition, it's possible to specify a list of `StatusNavBarTabButton` for
other sections of the application using the `navBarTabButtons` property:

```qml

StatusAppNavBar {
    ...
    navBarTabButtons: [
        StatusNavBarTabButton {
            icon.name: "wallet"
            tooltip.text: "Wallet"
        },
        StatusNavBarTabButton {
            icon.name: "browser"
            tooltip.text: "Browser"
        },
        StatusNavBarTabButton {
            icon.name: "status-update"
            tooltip.text: "Timeline"
        }
    ]
}
```

Lastly, when desired to render tabs for Status community, which can grow
in size, `StatusAppNavBar` exposes a list via the `navBarCommunityTabButtons`
property that can have a `model` and a `delegate`. The `delegate` should also
be a `StatusNavBarTabButton`:

```qml

StatusAppNavBar {
    ...
    navBarCommunityTabButtons.model: someModel.communities

    navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
        name: model.name
        tooltip.text: model.name
        anchors.horizontalCenter: parent.horizontalCenter
    }
}
```

The amount of community tab buttons can grow as they need until their dedicated
area becomes scrollable, at which point all `navBarTabButtons` will stick to the
bottom of `StatusAppNavBar`.

Closes #18
2022-09-21 18:20:02 +02:00
B.Melnik a3c3091c5d feat:Add buttons components 2022-09-21 18:20:02 +02:00
B.Melnik 65991fe559 chore: remove title bar example
Co-authored-by: Pascal Precht <pascal.precht@gmail.com>
2022-09-21 18:20:02 +02:00
Pascal Precht a9df397e71 feat(Controls): introduce StatusNavBarTabButton
This component is used to render application tabs in the application
nav bar that is yet to be implemented.

`StatusNavBarTabButton` is a composition of `StatusIconTabButton`, `StatusToolTip`
and `StatusBadge` and exposes each of these to enable customization.

Usage:

```
StatusNavBarTabButton {
    checked: true/false // whether or not it's 'active'
    name: "string" // used to render a `StatusLetterIdenticon`
    badge.value: 30 // `StatusBadge` is exposed as `badge`
    tooltip.text: "Some tooltip" // `StatusTooltip` is exposed as `tooltip`
    icon.name: "message" // Behaves exactly like `StatusIconTabButton.icon`
}
```

Closes #17
2022-09-21 18:20:02 +02:00
Pascal Precht cc6d28b7ce feat(Controls): introduce StatusToolTip component
This moves the `StatusToolTip` component into `StatusQ` and applies some of
the changes done by @jrainville in https://github.com/status-im/status-desktop/pull/2447.

Usage:

```
import StatusQ.Controls 0.1

Button {
    text: "Hover me!"
    StatusToolTip {
        visible: parent.hovered
        text: "Top"
        orientation: StatusToolTip.Orientation.Top // default: Top
    }
}
```

Closes #14
2022-09-21 18:20:02 +02:00
Pascal Precht 11d2d2e883 fix(README): fix module name in readme docs 2022-09-21 18:20:02 +02:00
Pascal Precht 791d3e275a feat(Core.Controls): introduce StatusIconTabButton component
This adds the `StatusIconTabButton` componoent to `StatusQ` with some slight
adjustments:

- removes `iconColor` in favour of `icon.color`
- removes `disabledColor` (main reason being that we don't show disabled buttons of this type)

This button handles various cases:

1. Icon tab buttons - An icon button used in Status Desktop for different sections
2. Letter identicon button - Used for community sections that don't have a profile picture
3. Image icon button - Used for community sections that do have a profile picture

Which type is rendered depends on the configuration of the component as shown
in the usage.

Usage:

```
import StatusQ.Controls 0.1

// When `icon.name` is set, it renders a `StatusIcon` button
StatusIconTabButton {
    icon.name: "chat"
}

// When `icon.source` is set, it renders a `StatusRoundedImage` button
StatusIconTabButton {
    icon.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
}

// When `name` is set, it renders a `StatusLetterIdenticon` button
StatusIconTabButton {
    name: "#status"
}

```

Closes #16
2022-09-21 18:20:02 +02:00
Pascal Precht b2576f0e5e feat(Components): introduce StatusBadge component
This component can be used to render badges with additional information
as seen in the navbar tab buttons and menu items.

Here's how it can be used:

```
StatusBadge {
  value: 2
}
```

By default and based on value, StatusBadge will change its width.
If no value is provided, it renders as badge indicator as seen in the profile
tab button.

Closes #15
2022-09-21 18:20:02 +02:00
Pascal Precht 50506b40a1 feat(Components): introduce StatusRoundedImage
A component that renders an image as a circle, given some URL.

Usage:

```
StatusRoundedImage {
    image.source: "..." // some url
}
```

Closes #32
2022-09-21 18:20:02 +02:00
Pascal Precht ac90eff84c feat(Core.Theme): expose solid black and white on `ThemePalette`
Status color palettes don't specify a solid black and white that stay
black and white in both themes.

This commit introduces `black` and `white` as solid colors to `ThemePalette`
so they are automatically inherited in all built-in and custom themes.
2022-09-21 18:20:02 +02:00
Pascal Precht ad5c6c555b fix(Core.Theme): remove redundant theme properties
This slipped through in #31
2022-09-21 18:20:02 +02:00
Pascal Precht 554400e9d2 feat(Components): introduce StatusLetterIdenticon
This introduces the `StatusLetterIdenticon` component to StatusQ.

Usage:

```
import StatusQ.Components 0.1

StatusLetterIdenticon {
    name: "#status"
}
```

Closes #28
2022-09-21 18:20:02 +02:00
Pascal Precht 6f0e63268f fix(Core.Theme): ensure all font weight are available
Turns out, even though we only use one and the same `font.family` name
throughout our components (namely `Inter` and/or `InterStatus`),
`font.weight` properties set to anything other than `Font.Normal` (which is the default),
will not apply unless all font weights have actually been loaded.

Unfortunately we can put a `FontLoader` as direct child in a `ThemePalette`
so we have to make it actual properties.

These properties aren't really used anywhere and merely serve as a place
to load font assets.

Fixes #30
2022-09-21 18:20:02 +02:00
Pascal Precht f999f30d44 feat(Components): introduce StatusLoadingIndicator
A `StatusIcon` that rotates infinitely and can be used for indicating
pending states.

Usage:

```
StatusLoadingIndicator {
    width: 24 // default: 17
    height: 24 // default: 17
    color: "red" // default: loading asset color
}
```

Closes #7
2022-09-21 18:20:01 +02:00
Pascal Precht eac3896a5d feat(Core): introduce StatusBaseText component
Abstract text component that defaults to Status' `Inter` font.
Also known as `StyledText` in Status Desktop.

This will close #20 as it doesn't make sense to implement multiple
components for a single text type. Size and weight of text can be configured
on a per usage basis.

Closes #20
2022-09-21 18:20:01 +02:00
Pascal Precht ab91f8f269 chore: add usage instructions to readme file 2022-09-21 18:20:01 +02:00
B.Melnik 6c62e1c20b feat: Set up catalog app (sandbox)
Closes #5
2022-09-21 18:20:01 +02:00
Pascal Precht afe2388c1b feat: introduce theming capability
This commit introduces the theming story discussed in #3.
Once this lands, we'll have a new namespace `StatusQ.Core.Theme` which
can be used as follows:

```qml
import StatusQ.Core.Theme

StatusLightTheme {}
StatusDarkTheme {}

Theme.palette.[SOME_THEME_PROP] // as spec'ed in #3
```

Closes #3
2022-09-21 18:20:01 +02:00
Pascal Precht 36d061bdaa chore: move StatusIcon component to StatusQ
Closes #2
2022-09-21 18:20:01 +02:00
Pascal Precht 3a356914db chore: let the fun begin 2022-09-21 18:20:01 +02:00
Michał Cieślak e76a874385 Remove submodule ui/StatusQ 2022-09-21 18:20:01 +02:00
Michał Cieślak be5de27513 feat(MessageView): hide image url in the message when image is unfurled
The url is hidden when there is only one url in the message with no
additional text and the image is shown (unfurled).

Closes: #7321
2022-09-21 10:33:15 +02:00
Lukáš Tinkl c7c77b52eb fix(ChatHeaderContentView): don't display "Contact" subtitle
for 1-to1 chats

Fixes: #7419
2022-09-20 18:02:34 +02:00
Michał Cieślak f900e7c00e fix(general): buttons font fixed, font loading refactored
Fixes: #7389
2022-09-19 22:10:25 +02:00
Michal Iskierko 15b67313b6 chore(@desktop): Bump StatusQ version
Issue #7241
2022-09-19 11:24:35 +02:00
Lukáš Tinkl 9bbbdc828b chore: sync StatusQ
- corrects the spacing in "Pinned by @author" message
- and fix a typo

Fixes: #7305
2022-09-16 15:26:11 +02:00
Lukáš Tinkl d6088471b1 fix: various button/list item alignment fixes fixes 2022-09-16 09:55:19 +02:00
Alexandra Betouni b47b3e8be6 feat(AssetDetailView): Adding price history chart
Closes #6490
2022-09-15 18:13:38 +03:00
Lukáš Tinkl fda78a1003 fix(BackUpCommuntyBannerPanel): StatusButton port fix
the `clicked()` signal has no longer any parameter
2022-09-14 13:29:23 +02:00
Lukáš Tinkl f4a78a1f10 fix: port to StatusButton changes in master
and pull in changes from StatusQ master
2022-09-14 09:16:58 +02:00
Patryk Osmaczko c411f83413 chore: bump statusq 2022-09-12 10:32:25 +02:00
Khushboo Mehta 928e1999d9 feat(@desktop/wallet): Implement Transaction details as per new design
fixes #7214
2022-09-09 21:36:58 +02:00
Khushboo Mehta e9d3d7a0b0 bash: q: command not found
feat(@desktop/wallet): New design for Transaction History

fixes #7213
2022-09-09 00:04:25 +02:00
Michał Cieślak 0be30b5e54 feat(@desktop/communities) Permissions - holdings edit and remove
Closes #6339
2022-09-08 11:11:28 +02:00
Lukáš Tinkl f4a6fa8012 fix(LanguageView): simplify the radio buttons handling
- pull in required StatusQ changes (see status-im/StatusQ#882)
- simplify the radio buttons handling, no need for a ButtonGroup as they
share the same parent
- the radio buttons have the desired font size as a result ;)
2022-09-06 09:54:11 +02:00
Alexandra Betouni e1c548696f feat(Desktop)!: Updating desktop app due to IconSettings refactor
As part of https://github.com/status-im/StatusQ/issues/781
2022-09-02 18:41:21 +03:00
Alexandra Betouni b6ff7b9ded feat(desktop): Made activity button be visible everywhere
Closes #6635
2022-09-02 10:29:23 +03:00
PavelS a01e0822b7 feat(@desktop/chat): add textformat quote option functionality
Adjust text format popup position

Fixes #6988

Requires https://github.com/status-im/StatusQ/pull/876
2022-09-01 12:45:45 +03:00
Michał Cieślak c19dbaf09b chore(@desktop): Bump StatusQ version
Fixes #6836
Cursor shape fixed in StatusImageCropPanel
2022-08-31 15:41:45 +02:00
MishkaRogachev 2d873db153 test(community): Fix community categories tests 2022-08-31 14:41:35 +03:00