Commit graph

120 commits

Author SHA1 Message Date
Mike Noe
af0babd8fa smsapp/qml: Remove unneeded imports 2024-03-13 07:39:26 -04:00
Albert Vaca Cintora
799e00d252 Improve accessibility based on HAN university accessibility report
Unfortunately, most issues are in Kirigami and we can't fix them from our side. Namely, these things remain unfixed: 
- `Kirigami.PlaceholderMessage` are not read by screen readers
- When navigating with the keyboard, pressing tab selects elements from right to left, which is weird
- When navigating with the keyboard, the selected element is not highlighted
- `Kirigami.Action` that don't have a `text` property don't use the `Accessible.name` property when using a screen reader.
2024-03-12 14:26:37 +00:00
Mike Noe
6c777875ff smsapp/qml: Define explicit params in signal handlers 2024-03-12 09:04:13 -04:00
Yifan Zhu
784b2853ca Call signals instead of signal handlers
Directly calling signals is the supported way to send signals.
Calling signal handlers worked in the past, but will be phased out in
the future (https://bugreports.qt.io/browse/QTBUG-120573).
2024-01-10 22:24:02 +00:00
Nicolas Fella
61d6430cfc Fix displaying names in smsapp 2023-12-25 15:56:13 +00:00
Nicolas Fella
e6383a47ca Fix start dir for file dialog 2023-12-25 15:56:13 +00:00
Nicolas Fella
69a1d5ec6b Port to ecm_add_qml_module 2023-12-25 15:56:13 +00:00
Nicolas Fella
37ff0b5318 [app] Remove QML import versions
Those are not needed in Qt6 and only get in the way
2023-12-25 15:56:13 +00:00
Alexander Lohnau
8852f342e9 smsapp: Port away from deprecated Kirigami.BasicListItem 2023-11-16 18:15:04 +00:00
Alexander Lohnau
aa30937905 smsapp: Fix wrong QML connection for plaing/displaying media 2023-11-16 18:15:04 +00:00
Alexander Lohnau
d7df67ce0a smsapp: Fix warnings about incompatible type for icons 2023-11-16 18:15:04 +00:00
Alexander Lohnau
ebfabd7c14 Port smsapp to Qt6
See https://invent.kde.org/libraries/kirigami-addons/-/issues/9 for the Avatar change
This app is now Qt6-only, but the rest of kdeconnect still works with Qt5. This is only a runtime dependency
2023-11-16 18:15:04 +00:00
Carl Schwan
85897fcdc3 Port to FormCard
This is the successor for MobileForm
2023-09-15 16:10:47 +00:00
Dmytrii Zavalnyi
0d02a6f99e Fix inactive "Send Arrow" in smsapp after first message sent
The "enabled" property of the button was set to false and has overwritten the default value based on the message length.
The message field had "anchors.fill" positioning and raised  "Binding loop detected for property "implicitHeight"" error.
attachmentList property of ChatMessage didn't have the default value and was undefined.

BUG: 455149
2023-04-21 16:28:58 +00:00
Dmytrii Zavalnyi
f82d15ce1e SMS app shows devices with SMS capabilities only
Replaced DevicesSortProxyModel with DevicesPluginFilterProxyModel with applied "kdeconnect_sms" filter for the devices list model.

BUG: 410112
2023-01-23 18:31:44 +01:00
Simon Redman
5b716dde02 [SMS App] Fix loading more messages
## Summary

For awhile (since at least early last year), it has not been possible to scroll past the first screen of message history. I believe this was due to a version bump in some library, but I was not able to biset it at the time.

This changes how messages are loaded to work again. I like this solution better anyway, because it means one can smoothly scroll back in time without needing to stop every time you reach the top of the history.

BUG: 452946

## Test Plan

### Before:
Scrolling to the top of the kdeconnect-sms history would do nothing. You could only view the first handful of messages in the conversation (whichever messages the app decided to load for you when you first open the conversation).

### After:
Scrolling to the top of the list of messages will cause the app to load more, allowing you to view more history of messages.
2023-01-22 22:10:46 +00:00
ivan tkachenko
4b6caf9af4
Port away from deprecated QML features 2022-09-21 01:14:37 +03:00
Nicolas Fella
8523fc0f86 [smsapp] Simplify device handling
The current device id is de-facto a global value

Store it in a singleton instead of passing it between our components
2022-05-31 16:50:53 +00:00
Nicolas Fella
8010739a8a [smsapp] Refactor and fix argument handling
Use a singleton instead of context properties for data handling

Fix passing initial message

Make device menu creation more declarative

Fix initial device handling

Update current device when new instance with initial device is requested
2022-05-23 22:10:07 +00:00
Bharadwaj Raju (away; can't respond)
fc83fb32e9 smsapp: Assorted UI improvements
- Move the device combobox to the global drawer
- Move search field and new button to header
- Use Kirigami SearchField instead
- Don't switch focus away from search field when typing
- Give the New button an icon
- Clarify the search field text
- Center messages view loading indicator
- Make send and attach buttons stick to bottom of text area
- Make cursor an I-beam when hovering over text area
- Move send button to the right
- Give proper padding to messages view top
- Move refresh action to global drawer
- Show refresh button directly in loading message where it is most useful

| Before | After |
| ------ | ------ |
| ![kdeconnectsms-old1](/uploads/469fa5f198ce81f1f53e8aa73694a824/kdeconnectsms-old1.png) | ![kdeconnectsms-new1](/uploads/c3b2b552d5d1bb73c566c6879c5b2a3c/kdeconnectsms-new1.png) |
| ![kdeconnectsms-old2](/uploads/eed795529946ed9ff856d8599bc66fb2/kdeconnectsms-old2.png) | ![kdeconnectsms-new2](/uploads/7abff93670aaea36052f3e3bfe01da62/kdeconnectsms-new2.png) |
| ![kdeconnectsms-old3](/uploads/f24dc7a902e33a1317cc8d9b90c39482/kdeconnectsms-old3.png) | ![kdeconnectsms-new3](/uploads/ea7d07f64d1904757dce56e86f1876ba/kdeconnectsms-new3.png) |

cc @teams/usability @teams/vdg
2022-02-09 03:47:36 +00:00
Felipe Kinoshita
c0cbcc0d36 Push a new layer when entering About Page in the SMS App
This commit replaces `pageStack.push...` to `pageStack.layers.push...`
when entering the About Page in the SMS App.

BUG: 423932
2021-06-16 11:08:34 +00:00
Felipe Kinoshita
0d697a6452
Use Kirigami Placeholder Message instead of a Label in the SMS App
This commit makes use of the Kirigami.PlaceholderMessage component
instead of a QML Label, also moves the placeholder message to be
inside the ListView.
2021-06-15 14:53:37 -03:00
Simon Redman
57fa947d95 [SMS App] Fix message sending area from always having a white background
## Summary

Replace the (deprecated and removed) reference to `Kirigami.Theme.viewBackgroundColor` with `Kirigami.Theme.backgroundColor`

This element is necessary in order to have theme hot-switching work correctly

BUG 434791

## Test Plan

### Before:

When using the KDE Connect SMS app in an un-modified dark theme, the message entry text box would be rendered as all white and text would correctly be rendered in white (making it un-readable).

This seems to be somehow related to a recent Kirigami version (it only happened to me after doing a distro upgrade and my ancient Kirigami installed to ~/.prefix does not reproduce the issue).

viewBackgroundColor was deprecated and apparently removed from Kirigami a version or two ago. Thus the coloring was no longer correct.

For screenshots and discussion, see [bug 434791](https://bugs.kde.org/show_bug.cgi?id=434791)

### After:

Text and background are rendered in the expected colours for the theme.
2021-05-23 17:49:40 +00:00
Simon Redman
8dd0111d99 [SMS App] Add thumbnail preview to ConversationList 2020-09-27 03:51:17 +00:00
Nicolas Fella
400c800deb [app] Add plugin settings page
Include a page that allows (de)selecting and configuring plugins

This is one of the last missing pieces for feature parity with the KCM.
2020-09-08 20:33:20 +02:00
Aniket Kumar
706fc314fb Adding support to send attachments to the remote device. 2020-08-31 15:35:25 +05:30
Aniket Kumar
e368dd4ab5 Implementing support to request and receive original attachment file from the remote device. 2020-08-23 17:43:22 +05:30
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Aniket Kumar
0b3d6bee85 Implementing Attachment class and adding support to display the thumbnails of attachments in QML. 2020-08-10 00:46:30 +05:30
Aniket Kumar
af8a5bc49b Enabled seding of multi-target messages in SMS app. 2020-07-08 14:23:13 +05:30
Aniket Kumar
0cee486a62 Fixed the wrapMode property value of TextArea from non existing TextArea.wrap to TextEdit.Wrap. 2020-07-08 14:15:30 +05:30
Ashvin Nihalani
74c6b71e04 UI Improvements
Removed Clutter Single Party Conversation
Added Name ti Multiparty
Changed Default Icon in Conversation List
2020-07-05 12:51:01 +00:00
Ashvin Nihalani
c333f2af17 [SMS App] Select Message Text
Switched from QT Label to Text Edit as QA Label is not allowed to select text
https://stackoverflow.com/questions/49784099/qml-how-to-make-text-or-label-selectable
https://bugreports.qt.io/browse/QTBUG-14077

BUG: 418630 - Cannot select text in messaging app
2020-07-05 00:49:31 +00:00
Nicolas Fella
166a88072b [smsapp] Rework message items
The current implementation seems to have an issue with an undetected binding loop that causes lockup. During investigation I figured that the code was way to complex and brittle for what we need.

This is a cleaner reimplementation. It also replaces the custom Avatar component with the one from Kirigami.

The looks are subject to tweaking of course
2020-07-01 19:15:45 +00:00
Aniket Kumar
2b8e95caac [smsapp] Replace custom ListItem with Kirigami's BasicListItem 2020-06-27 18:22:00 +02:00
Simon Redman
a9f151947b [SMS App] Stop ChatMessage.qml from rendering HTML 2020-06-06 13:29:06 +00:00
Rihards Skuja
60bf200723 smsapp: fix reference to undefined var in QML
Launching smsapp prints:
qrc:/qml/main.qml:36: ReferenceError: _initialMessage is not defined

This patch applies the changes made to the property from C++ in
c17972881b to QML.
2020-05-30 02:50:13 +00:00
Aniket Kumar
fca66244ab improved sorting and filtering methods 2020-05-19 10:07:06 +05:30
Aniket Kumar
d0367f11fb Removing earlier hack to pass an address as a string instead of ConversationAdress type. 2020-05-18 08:11:26 +05:30
Nicolas Fella
785f70c28f [smsapp] Fix starting new conversation 2020-05-12 01:05:38 +02:00
Simon Redman
b8aab3407a [SMS App] Sms helper improvements 2020-05-09 16:50:08 +00:00
Simon Redman
95a62f4fdb [SMS App] Convert tabs to 2 spaces in ChatMessage.qml
How did those get there?
2020-04-23 19:13:44 -07:00
Jiří Wolker
2ef5cd4551 [SMS App] Make SMS message field scrollable
## Summary

This patch makes SMS message field scrollable and limits its height to ⅓
of window height (or ⅔ for smaller windows) so messages in conversation
are shown even when writing very long messages.

## Test Plan (and screenshots)

<small>These screenshots are in APNG and WEBP formats. Download them if
your browser does not support this format.</small>

### Before:

Message field height was not limited. Message field could be even higher
than window. That makes first lines of this field and messages in
conversation inaccessible.

![grab-noscroll.apng](/uploads/70a44ec3abd0e0707cf69f53ee832542/grab-noscroll.apng)

### After:

Message field height is limited to ⅓ or ⅔ of window height. When text
content reaches this threshold, scroll bars will show up.

![grab-scroll.webp](/uploads/489b9bb197a092f715bc2160acc7fd42/grab-scroll.webp)
2020-04-23 17:24:51 -07:00
Jiří Wolker
6abe790aa4 [SMS App] Make SMS character counter width only grow
SMS character counter was changing its width (both growing and
shrinking) so it also resized message field (and that caused text
reflow). This patch makes counter width only grow.

Type SMS that is long enough to make SMS character counter wider than
“Send” button. Remove the text (leave there 150 or 60 chars to keep it
visible). Character counter should keep its width.
2020-04-23 17:19:15 -07:00
Aniket Kumar
1ed998a9b3 some fixes 2020-04-23 02:31:28 +00:00
Aniket Kumar
97fea5e692 Apply suggestion to smsapp/qml/ConversationList.qml 2020-04-23 02:31:28 +00:00
Aniket Kumar
cd0259aba6 Added searching on both fields all the time and generalized check for address 2020-04-23 02:31:28 +00:00
Aniket Kumar
518f161b4f added message diaplay for no matched contacts 2020-04-23 02:31:28 +00:00
Aniket Kumar
b0cffea4a1 minor fix 2020-04-23 02:31:28 +00:00
Aniket Kumar
6827f31aa1 UI chnages and sorting/filtering chnages for multitarget converations 2020-04-23 02:31:28 +00:00