Commit Graph

5260 Commits

Author SHA1 Message Date
Pascal Precht ada657fab6 feat(StatusInput): introduce `reset` API
This can be used to reset text, error message and validity state of inputs
2022-09-21 18:20:04 +02:00
Alexandra Betouni 56212c547a fix(StatusChatListCategoryItem): Disable sensor when chevron clicked
List items' mouse area was also triggered when chevron
(sub menu) button was clicked so it was unsetting the
opened variable which is responsible for opening/closing
the chats list.
2022-09-21 18:20:04 +02:00
Alexandra Betouni 0c0d9bf919 fix(StatusChatInfoToolBar): Right anchored title in StatusChatInfoToolBar
So that elide mode in text can be activated
2022-09-21 18:20:04 +02:00
B.Melnik b9b4ecae21 feat(Spellchecker): Add Spellchecker class
Closes: #399
2022-09-21 18:20:04 +02:00
B.Melnik 556de60a8d feat(Spellchecking): Add huspell dependency
Closes: #397
2022-09-21 18:20:04 +02:00
Pascal Precht 2bb282bb2c fix(StatusQ.Controls.Validators): fix bug that addressOrEns validator isn't properly exposed in QML 2022-09-21 18:20:03 +02:00
Khushboo Mehta 45dd8147ad feat(StatusExpandableItem): Correct placement of expandable region in tertiary type 2022-09-21 18:20:03 +02:00
Pascal Precht 36b75b8beb chore: cut 0.9.0 release 2022-09-21 18:20:03 +02:00
Pascal Precht 74a88a70b3 feat(StatusBaseInput): introduce `component` property
This property enables users to load any component into the input field.
This is useful for rendering a "clearable" icon button, simple icons or
even more complex buttons.

Usage:

```qml
StatusBaseInput {
    ...
    component: StatusIcon {
        name: "cancel"
        color: Theme.palette.dangerColor1
        width: 16
    }
}
```

The `clearable` property of `StatusBaseInput` also renders and icon button
on the right hand side. With this new feature, `clearable` is just a short-hand
for:

```qml
StatusBaseInput {
    ...
    component: StatusFlatRoundButton {
        visible: edit.text.length != 0 &&
                statusBaseInput.clearable &&
                !statusBaseInput.multiline &&
                edit.activeFocus
        type: StatusFlatRoundButton.Type.Secondary
        width: 24
        height: 24
        icon.name: "clear"
        icon.width: 16
        icon.height: 16
        icon.color: Theme.palette.baseColor1
        onClicked: {
            edit.clear()
        }
    }
}
```

Closes #380
2022-09-21 18:20:03 +02:00
Pascal Precht 1b5d407e93 fix(StatusCheckbox): give checkbox label proper theme color 2022-09-21 18:20:03 +02:00
Pascal Precht ff549d2822 feat(StatusQ.Controls.Validators): introduce `StatusAddressAndEnsValidator` 2022-09-21 18:20:03 +02:00
Pascal Precht f979011323 feat(StatusQ.Controls.Validators): introduce `StatusAddressValidator` 2022-09-21 18:20:03 +02:00
Pascal Precht af8d2036f3 feat(StatusInput): introduce `ValidationMode`
This allows users to configure how validation is run. There are two modes:

1. `ValidationMode.OnlyWhenDirty`
2. `ValidationMode.Always`

By default, validation happens when the inputs value changes, or on
initial `Component.onCompleted` event. The first mode allows for not
performing validation when the input field is blank and validation.
isn't necessary (yet).
2022-09-21 18:20:03 +02:00
Pascal Precht de776e4567 feat(StatusValidator): allow validators to provide default `errorMessage`
Validators can now define a default `errorMessage` like so:

```qml
StatusValidator {
  ...
  errorMessage: "..."
}
```

Because there's no access to runtime validation errors, `errorMessage` have to
be static. However, if applications wish to provide their own `errorMessage`
they can still override it and make it dynamic:

```qml
SomeValidator {
  ...
  errorMessage: input.errors.someValidator ? "Whoopsie" : ""
}
```
2022-09-21 18:20:03 +02:00
Pascal Precht 09c0892e3c Revert "chore: replace profile icon (#312)"
This reverts commit aab59763e5ad943b61856a7394d866ea68068df7.
2022-09-21 18:20:03 +02:00
Khushboo Mehta 5c5d782605 feat(StatusExpandableItem): Refactored the StatusExpandableSettingsItem to support different types
Renamed StatusExpandableSettingsItem to StatusExpandableItem.
Added support for dofferent types of styles for the item.
Type Primary: Relates to Settings Design
Type Secondary: Relates to Collectibles Design
Type Tertiary: Relates to the Collectibles detailed view design

BREAKING CHANGE: Renamed and expanded features of the  StatusExpandableSettingsItem to StatusExpandableItem
2022-09-21 18:20:03 +02:00
Pascal Precht 782c0eecfe feat(StatusSearchPopup): introduce forceActiveFocus API
This is used to enforce focus on the search input when the popup
is opened. In fact users decide to override the search popup's
`onOpened` handler, they still get access to this API to make use of it.
2022-09-21 18:20:03 +02:00
Pascal Precht 7bd484c339 feat(Status.Core.Theme): add RobotoMono font
Closes #342
2022-09-21 18:20:03 +02:00
Pascal Precht dc96cf04a9 fix(StatusModal): don't reserve header subtitle space
Closes #378
2022-09-21 18:20:03 +02:00
Pascal Precht 40001ef7a9 fix(StatusChatListAndCategories): rely on correct tooltip settings prop
Category tooltip settings were broken in this component due to a mismatching
property name.

This commit fixes it.
2022-09-21 18:20:03 +02:00
B.Melnik 0511fade5c fix(StatusAppThreePanelLayout): Fix margin between left and center panels
This margin shows because of `handle` width incuded in `SplitView` width. Handle have `Component` type and can't accessable for getting sizes. I add `magic constant` as hotfix.

Closes: #307
2022-09-21 18:20:03 +02:00
B.Melnik d8d5048622 refactor(StatusPopupMenu): Refactor bug with reopen menu 2022-09-21 18:20:03 +02:00
Alexandra Betouni 12f6791d0c feat(StatusInput): exposed edit component
We need to be able to call forceActiveFocus, so
TextEdit component should be somehow accessible

Relates to desktop #3310
2022-09-21 18:20:03 +02:00
Pascal Precht 45ea097f3e chore: release v0.8.0 2022-09-21 18:20:03 +02:00
Pascal Precht 5f30a34161 feat(StatusBaseInput): introduce focussed property
We can't alias the property as `focus` because this is a final readonly
property, so we're introducing a `focussed` property instead.

Closes #373
2022-09-21 18:20:03 +02:00
B.Melnik 756bc6a1dc fix(StatusModal): Remove self-calculating height
Based on Qt docs `contentItem` must have `implicit` sizes.
link to rules: https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#popup-sizing
2022-09-21 18:20:03 +02:00
Alexandra Betouni faea959d63 feat(StatusInput): Introduced secondaryLabel property
Due to design updates in AddAccount modal, updates are
needed in StatusBaseInput and StatusInput

* Added the possibility of having the icon on the right
  side
* Added secondaryLabel for title
* Added examples in StatusInputPage

Closes #383
2022-09-21 18:20:03 +02:00
Khushboo Mehta fa5c50622a feat(qrc): Add new icon needed for share modal 2022-09-21 18:20:03 +02:00
Khushboo Mehta 9bb00e43a2 feat(StatusModal): Add popup menu support for StatusModal
Added logic to support a popup menu to be launched from the StatusModal header.
Added an example in sandbox to demonstrate its usage.

fixes #374
2022-09-21 18:20:03 +02:00
B.Melnik 49c9348f65 fix(StatusInput): Forward keys events to root
Closes: #372
2022-09-21 18:20:03 +02:00
Khushboo Mehta 1398b3c9d5 feat(StatusExpandableSettingsItem): Added new component for wallet settings
Also added a page in the sandbox to demonstrate its usage.
2022-09-21 18:20:03 +02:00
Pascal Precht 4c661109c6 feat(StatusQ.Controls): introduce StatusSwitchTabBar and StatusSwitchTabButton
This commit adds two new components to the StatusQ.Controls module:

- StatusSwitchTabBar
- StatusSwitchTabButton

Usage:

```qml
StatusSwitchTabBar {

    StatusSwitchTabButton {
        text: "Tab 1"
    }

    StatusSwitchTabButton {
        text: "Tab 2"
    }

    StatusSwitchTabButton {
        text: "Tab 3"
    }
}
```

Closes #365
2022-09-21 18:20:03 +02:00
B.Melnik cd72ef5f38 refactor(StatusModal): Remove custom content property
BREAKING CHANGES:
- `content` property removed
- `Loader` inside StatusModal removed
- default `contentItem` property should be used now

Closes: #306
2022-09-21 18:20:03 +02:00
B.Melnik 181ed86b95 fix(StatusBaseInput): fix one line scroll
Closes: #291
2022-09-21 18:20:03 +02:00
B.Melnik 8f83dbbca5 feat(StatusChatListAndCategories): Add tooltip settings for categories buttons
Closes: #226
2022-09-21 18:20:03 +02:00
Pascal Precht d2fd625ee5 feat(StatusSearchPopup): add function hook to allow timestamp formatting
This introduces a new API to allow users to provide a function that formats
timestamps in the search results.

```qml
StatusSearchPopup {
  formatTimestampFn: function (ts) {
      return // formatted ts
  }
}
```

Closes #363
2022-09-21 18:20:03 +02:00
Pascal Precht 1af17548ba feat: introduce bigger versions of navbar icons
Turns out the icons used in the navigation bar of the application actually
are designed to be bigger than the usual icons.

We can't just use the original source and scale them up in QML because that
will impact the stroke width of the SVGs as well, hence we need to introduce
a special set of icons that are design bigger but presever the feature ratios.
2022-09-21 18:20:03 +02:00
B.Melnik 398f17c50e fix(StatusBaseInput): Make clear button bigger
Closes: #294
2022-09-21 18:20:03 +02:00
Pascal Precht 7734a33a95 feat(StatusDescriptionListItem): expose subtitle component for fine control
This enables users to get more control over the subtitle to set things like
`elide` and font properties.

Closes: #356
2022-09-21 18:20:03 +02:00
Pascal Precht 4d54a9347f feat(StatusDescriptionListItem): introduce support for `value`
This adds a new `value` property to the component to set label for a
selected value and also rendering a chevron as an indicator that the list
item becomes clickable.
2022-09-21 18:20:03 +02:00
B.Melnik 5394abb767 fix(StatusChatToolBar): Fix mouse event catching after menu closing
Closes: #350
2022-09-21 18:20:03 +02:00
Sale Djenic 07540b2463 refactor(StatusSearchPopup): change expected search model shape
This changes the share of the model expected to render search results.

BREAKING CHANGE:
The model has changed in the following way:
- `image` field added
- `color` field added
- `badgeIdenticonColor` field renamed to `badgeIconColor`
- `isLetterIdenticon` field renamed to `badgeIsLetterIdenticon`
2022-09-21 18:20:03 +02:00
Pascal Precht 7cf893113b feat(StatusModal): add ability to set elide config of header titles
There are now two new properties in `StatusModalHeaderSettings`:

- `titleElide`
- `subTitleElide`

These can be used to configure the `elide` property of both header titles.
The default values for both of them is `Text.ElideRight`.

Closes #353
2022-09-21 18:20:03 +02:00
B.Melnik d829635354 fix(StatusListItem): Add propogateCompostedEvents to title mouse area
Closes: #346
2022-09-21 18:20:03 +02:00
Pascal Precht 3398fa6119 chore: cut v0.7.0 release 2022-09-21 18:20:03 +02:00
B.Melnik aec06b41d4 feat(StatusWindowsTitleBar): Add windows title bar
Closes: #200
2022-09-21 18:20:03 +02:00
Pascal Precht 4c5b8a79d6 fix(StatusModal): ensure header and subtitles elide if needed
Closes #256
2022-09-21 18:20:03 +02:00
B.Melnik 239fa5e20f feat(StatusChatListCategoryItem): Add tooltips settings
Usage:

```qml
StatusChatListCategoryItem {
   addButton.tootlip.text: "Some add lazy text"
   menuButton.tooltip.text: "My menu"
}
```
2022-09-21 18:20:03 +02:00
B.Melnik 378101fa31 fix(StatusChatInfoButton): Add self-calculated implicitWIdth and elide to texts
This commit add elide flags to text in title and subtitle and add flexibility to width. Now compoents use next rules:
1. If width is set - text should be elided when implicit text  width is more than root object width
2. Component grows if width is not set based on inner elements natural sizes

Closes: #335 and #338
2022-09-21 18:20:03 +02:00
Pascal Precht dfcf6e07f1 fix(StatusListItem): don't set width on title item
There was an explicit `width` introduced on `statusListItemTitle`, most likely
to make room for it when `titleAsideText` is supplied.

This unfortunately causes the title get a very small width, resulting in broken
UI.

Since we can assume that there should be enough space for the titleAsideText
when it's used, we probably don't have to calculate a fixed width for the title
in the first place.

This commit therefore removes that explicit setting.
2022-09-21 18:20:03 +02:00