Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

New design #3

Open
4 of 6 tasks
hannesschulze opened this issue Jan 27, 2019 · 16 comments
Open
4 of 6 tasks

New design #3

hannesschulze opened this issue Jan 27, 2019 · 16 comments

Comments

@hannesschulze
Copy link
Owner

hannesschulze commented Jan 27, 2019

Inspired by https://github.com/aprilis/messenger

Mockup:
frame 1

TODO:

  • Display available devices
  • Display battery level
  • Dock integration (needs design, see Basic Application Structure #18)
  • Notifications view
  • SMS view
  • Files view (needs design)
@aadilayub
Copy link

Perhaps you could use GTK progress bar to indicate battery percentage?

Like this:

screenshot from 2019-03-03 22 37 19

@hannesschulze
Copy link
Owner Author

I don't actually think that's a good idea, because a progress bar in the dock is indicating progress, which isn't the case for this - at least imo it would be confusing to have that :)

@hannesschulze
Copy link
Owner Author

Some updates to the design:

Frame(12)

Basically just because I didn't have much time when making the first one

@aimproxy
Copy link

The design looks really great, I have looking for something like this, that design is really a god job, and please if you have this design ready publish on appcenter!

@Fatih20
Copy link
Contributor

Fatih20 commented Jun 11, 2020

Hey, maybe I can help with the design. What do you mean by "telephony view" ?

@hannesschulze
Copy link
Owner Author

Hey, thanks for your offer!

Just to give you a quick overview about what I'm currently doing with the design:

  • I've just started working on the SMS view -- I think the design for this one is pretty much set, it will be similar to the chat bubbles here while all recent conversations will be kept in a GtkNotebook (which is already kind of implemented).
  • I don't think making phone calls is supported in KDE Connect, I just put the section there in the first mock-up 😄 I will remove this point from the TODO list
  • I currently have no idea what's the best way to implement file sharing. One option for that would be to include it as a mountpoint into the file manager and also adding an entry to the context menus using Contractor (doesn't need a design). However, I think it might also be good to have a dedicated view for this in the app (maybe something like a "Drag files here" screen which then sends the files to the phone)

I think if you would like to help with the design you could put some thought into the last view. Also you're free to review my current design, just note that nothing's final yet 😄

@Fatih20
Copy link
Contributor

Fatih20 commented Jun 15, 2020

* I currently have no idea what's the best way to implement file sharing. One option for that would be to include it as a mountpoint into the file manager and also adding an entry to the context menus using Contractor (doesn't need a design). However, I think it might also be good to have a dedicated view for this in the app (maybe something like a "Drag files here" screen which then sends the files to the phone)

I assume file sharing would be two way?

@hannesschulze
Copy link
Owner Author

Well, that's an interesting question...

On the PC side, I thought of these ways to share files:

  1. PC -> Phone by selecting a menu item in the file manager (using Contractor)
  2. PC -> Phone by dragging and dropping the file into the app
  3. Phone -> PC by opening a mount point in the file manager

However I just noticed that there is also a Send files option in the Android app. I'm not really sure how this works and unfortunately I can't test this with KDE Connect right now because I don't have KDE installed. I guess, since everything in KDE Connect works using small, custom JSON packets, it would be possible to display a screen once Conecto has received a request from the phone.


I just looked through KDEConnect's source code ­­-- it seems like they just save the file to a fixed location specified before. I'm not really a fan of this, I'd prefer seeing a PHONE_NAME has shared the following file message, maybe showing an icon for the file type and filename (maybe you have a better idea) and a button opening a FileChooserDialog.

@Fatih20
Copy link
Contributor

Fatih20 commented Jun 15, 2020

Well, that's an interesting question...

On the PC side, I thought of these ways to share files:

1. **PC -> Phone** by selecting a menu item in the file manager (using Contractor)

2. **PC -> Phone** by dragging and dropping the file into the app

3. **Phone -> PC** by opening a mount point in the file manager

However I just noticed that there is also a Send files option in the Android app. I'm not really sure how this works and unfortunately I can't test this with KDE Connect right now because I don't have KDE installed. I guess, since everything in KDE Connect works using small, custom JSON packets, it would be possible to display a screen once Conecto has received a request from the phone.

I just looked through KDEConnect's source code ­­-- it seems like they just save the file to a fixed location specified before. I'm not really a fan of this, I'd prefer seeing a PHONE_NAME has shared the following file message, maybe showing an icon for the file type and filename (maybe you have a better idea) and a button opening a FileChooserDialog.

I think your idea works fine and you're better-suited to designing these. 👍️

@hannesschulze
Copy link
Owner Author

Alright, no problem 😄

Once I'm done with a mock-up for this I might also post it here.

@sidevesh
Copy link

hey @hannesschulze , love what you are building here and would love to help,
my thoughts on the Files tab:
For the initial release maybe we can add a minimal interface,
when a file is shared from the phont to the PC, we can show a notification,
to send files from PC to phone we can offer two ways,
first, as an option in the right click menu in the Files app,
second, currently the left side pane in the mockup above seems a bit empty so maybe we can add some actions there, starting with a "Send files" option that opens a file chooser dialog.

This way, maybe we can forego the Files tab for now and revisit it later.

Just my thoughts, let me know if I can help out with the File transfer, UI or with #16 .

@hannesschulze
Copy link
Owner Author

hannesschulze commented Jul 14, 2020

Hey, thanks for your suggestion.

I think the notification and context-menu is pretty much what I was thinking about. I think the "Send files" button in the sidebar could work, I like that idea! It might also be possible to additionally support drag'n'drop by using a Gtk::Overlay or something similar on drag motion, so that this could fully replace the "Files" tab.

As for the implementation, any help would be appreciated! Since I'm already working on the SMS view, I think I should probably split this issue up a bit. If you want to, you can take a look at transferring files (which will also be useful for #23), MPRIS or porting over the code from #11 to C++.

If you have any questions about the API design, please feel free to ask. I am trying to document my code as much as possible, so building with -Ddocs=true for doxygen documentation might be a good starting point.

EDIT: Ok, thinking about this a bit more, I don't think it is even possible to have both a file manager in focus and the popover open at the same time. So maybe drag'n'drop support isn't really necessary right now.

@sidevesh
Copy link

Yeah, drag and drop is not necessary right now, I will take a look at the clipboard functionality to begin with,
will be working on elementary os apps for first time so might need assist from you :)

@sidevesh
Copy link

Hey @hannesschulze ,
I tried to run the project but on running ninja I am getting following error:

[23/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_application.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/application.h:25, from ../src/application.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [24/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_device-popover.cpp.o'. In file included from ../src/widgets/popover-window.h:24:0, from ../src/device-popover.h:25, from ../src/device-popover.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [25/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_main.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/application.h:25, from ../src/main.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [26/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_window.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/window.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [33/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o'. FAILED: com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o c++ -Icom.github.hannesschulze.conecto@exe -I. -I.. -Ilibconecto -I../libconecto -I../libconecto/./plugins -I/usr/include/jsoncpp -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/p11-kit-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/gee-0.8 -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/granite -I/usr/include/plank -I/usr/include/libbamf3 -I/usr/lib/x86_64-linux-gnu/libbamf3/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -pthread -MD -MQ 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o' -MF 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o.d' -o 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o' -c ../src/models/sms-storage.cpp ../src/models/sms-storage.cpp: In lambda function: ../src/models/sms-storage.cpp:128:43: error: ‘create_from_iso8601’ is not a member of ‘Glib::DateTime’ Glib::DateTime::create_from_iso8601 (vals.at (MessageColumns::DATETIME))); ^~~~~~~~~~~~~~~~~~~ ../src/models/sms-storage.cpp: In lambda function: ../src/models/sms-storage.cpp:145:43: error: ‘create_from_iso8601’ is not a member of ‘Glib::DateTime’ Glib::DateTime::create_from_iso8601 (vals.at (MessageColumns::DATETIME))); ^~~~~~~~~~~~~~~~~~~ [36/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_main_active-device-view.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/views/main/active-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [40/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_dock_active-device-view.cpp.o'. In file included from ../src/views/dock/../sms-view.h:24:0, from ../src/views/dock/connected-device-view.h:28, from ../src/views/dock/active-device-view.h:28, from ../src/views/dock/active-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [41/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_main_connected-device-view.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/connected-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [42/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_dock_connected-device-view.cpp.o'. In file included from ../src/views/dock/../sms-view.h:24:0, from ../src/views/dock/connected-device-view.h:28, from ../src/views/dock/connected-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ ninja: build stopped: subcommand failed.

Any ideas why this could be happening ?

@hannesschulze
Copy link
Owner Author

Ah, I know what's happening.

First of all, I don't know what's the best way to get rid of those deprecation warnings. I think they just occur because some function in the granite header uses a deprecated type from the same header, probably caused by the Vala compiler.

The main problem seems to be that I am not actually developing Conecto on elementary OS 5 (which is based on Ubuntu 18.04) and I am using some Gtkmm-features which are not available in the version bundled with Ubuntu 18.04. I didn't plan to release Conecto for elementary OS 5 (version 6 should be coming out later this year).

These are probably just minor problems. I am going to set up CI for Ubuntu 18.04 so I can fix them.

@hannesschulze
Copy link
Owner Author

Should be working now 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants