Commit graph

129 commits

Author SHA1 Message Date
Ryan Frew
d03e964ed7 Corrected newline inserting when using shift+return while writing SMS messages
Shift+return was always inserting newline at the end of the current line of text, ignoring where the cursor was, and not overriding currently selected text

BUG: 488585
2024-06-28 11:19:35 +00:00
Simon Redman
ec6a35e75b Fix SMS app icons and thumbnails
## Summary

Due to the difficult-to-test Qt5 -> Qt6 transition, there were some GUI errors with the SMS app:
- Contact photos were missing
- Attachment previews, if present, were in the place where the contact photo should be

This also takes a shot at fixing the long-standing issue that attachment previews were shown much taller than the row item, drawing over the items above and below. 

## Test Plan

### Before:
As in description, the conversations list items were not correct.

![image](/uploads/f68b662fecd6a4826986ede6e8191470/image.png)

### After:
Contact photos are shown to the left of the text preview, attachment preview, if present, is shown to the far right.

![image](/uploads/95f2b4d6e6ff26371a2f36d97fc3f52b/image.png)
2024-06-17 02:00:41 +00:00
ivan tkachenko
11ef11c0c3 smsapp: Clarify that source/file is a URL
Not using a URL type for URL data may lead to confusion.
2024-06-10 20:40:42 +00:00
ivan tkachenko
0ed648b4ba smsapp: Add qualified property access 2024-06-10 20:40:42 +00:00
Mike Noe
34eb9ceaa7 smsapp/conversation list: Fix formatting issues and refactor code
Preview icon and subtitle formatting were not optimal (shifted and
not eliding properly).  Refactor the delegate into a ItemDelegate
with a proper content item.

In addition, clean up some redundancy and generally refactor the
qml properties/items.
2024-04-09 08:16:22 +00:00
Mike Noe
09d5774f98 smsapp/qml: Remove explicit column height binding
This was causing a binding loop error
2024-03-23 11:35:11 +00:00
Mike Noe
08723d5503 smsapp: Clean up conversation list title elements
Items in the title are underlapping the chat pane.
Remove fake elipses from placeholder text and remove
New button text.
2024-03-21 20:36:24 -04:00
Mike Noe
da05a88655 smsapp/attachments: Remove Qt5Compat import
Replace deprecated OpacityMask with Kirigami.ShadowImage. Some
additional cleanup with sizing/centering the thumbnail(s).
2024-03-17 06:59:03 -04:00
Mike Noe
8b65e48b7f smsapp: Use Kirigami.ShadowedRectangle instead of DropShadow
Deprecated, allows to remove Qt5Compat import.
2024-03-15 19:36:51 -04:00
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