Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

UI feedback #359

Closed
dw opened this issue Mar 26, 2024 · 7 comments
Closed

UI feedback #359

dw opened this issue Mar 26, 2024 · 7 comments

Comments

@dw
Copy link

dw commented Mar 26, 2024

Hey there,

I've been a heavy user of otpclient for years and mostly love it. There are a couple of issues with the UI I'd love to see corrected, and would be happy to volunteer a bit of time for each (or all!) of them if there was interest in accepting any of the contributions upstream:

  • Search unreliability. CTRL+F "github" never does what I want, regardless of which search field is selected in the preferences. Ideally search should be over any field without having to worry about a setting, and should work reliably (I have not looked at the code to understand what is going on). It seems the unreliability might be related to not doing substring search, or struggling with account names containing spaces

  • Toggle delete rows modality - not sure if it was a conscious choice to give the UI a whole major mode just for deleting items. Would this not be better present on a right-click context menu? After a few years of use, I am still right-clicking each time, and on remembering how it's supposed to work, am genuinely afraid of the delete button because it changes how the UI works when enabled. Even with the delete button in the toolbar, the expectation would be that the currently selected item is deleted, whereas (without verifying - again, slightly scared of that button :P) the current behaviour is that any item selected after clicking the button is deleted

  • Toggle row reordering - another mode. Could it not be enabled by default?

  • Clicking column titles to sort-by-column. I have 2 pages of TOTP entries and manual sorting is never desirable

  • Edit row hidden on the hamburger menu. Would love to see this moved to a context menu too, because that's also an orthodox location for a per-item action

  • Add from QR code: this menu sees frequent use, but it is buried in a submenu. Could these 2 menu items be brought up one level to save a click (and slightly improve discoverability especially when sleepy)

  • Clicking to show a TOTP which is just about to expire requires a second click. Would probably be better to show the code for a fixed number of seconds, rather than up until the next expiry point. This one interrupts me almost every week

Apologies for the unsolicited feedback. I still love the app, and suspect there may be some logic behind not hiding stuff in a context menu

@paolostivanin
Copy link
Owner

paolostivanin commented Mar 26, 2024

Hello,
thanks a lot for taking the time to write such detailed feedback, really appreciated 😄
Let's go point by point:

  • I know, search is completely useless in v3. I'm working on v4 which will be written from scratch and will have a useful and working search mode
  • no particular reason. I did it that way lots of years ago and since I don't use the deletion feature often (maybe once a year) I've never bothered to think about how to improve it. But I agree that a context menu would be way better
  • what do you mean? That rows can be reordered by default at any time? In that case, I'll have to think about it, because reordering rows is a delicate operation that requires updating the db every time it's done
  • I had to remove this feature because it's broken on gtktreeview (that's why I'm moving away from this widget with v4)
  • agreed about having this in the context menu
  • could be, I'll have to think about it
  • there actually is a setting "show next otp" that you can enable. This would show the next otp always though, not only when it's about to expire. Have you already tried that?

@paolostivanin paolostivanin self-assigned this May 10, 2024
@paolostivanin paolostivanin added this to the 3.7.0 milestone May 10, 2024
@paolostivanin
Copy link
Owner

paolostivanin commented May 10, 2024

To-Do for v3.7.0:

  • use context menu for editing a row
  • use context menu for deleting a row
  • use context menu for showing the QR of a row

@paolostivanin
Copy link
Owner

paolostivanin commented Jun 27, 2024

Everything I could do on v3 has been done. For the more juicy parts (search, reorder, etc), you've gotta wait for v4 😄

@dw
Copy link
Author

dw commented Jun 27, 2024

Very exciting! Tried a source compile and things are looking good, though somehow triggered a SEGV on any Right Click -> Edit Row I tried. Maybe a library version issue? (This is debian 12)

Thread 1 "otpclient" received signal SIGSEGV, Segmentation fault.
0x000055555556d212 in edit_row_cb (simple=0x555555a036a0, parameter=0x5555556a2a70, user_data=0x1) at /home/dmw/src/OTPClient/src/gui/edit-row-cb.c:46
46	    edit_data->db_data = app_data->db_data;
(gdb) p app_data
$1 = (AppData *) 0x1
(gdb) bt
#0  0x000055555556d212 in edit_row_cb (simple=0x555555a036a0, parameter=0x5555556a2a70, user_data=0x1) at /home/dmw/src/OTPClient/src/gui/edit-row-cb.c:46
#1  0x00007ffff7f2a3b0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2  0x00007ffff7f3d076 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3  0x00007ffff7f43bf5 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4  0x00007ffff7f43dbf in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007ffff796c8a4 in gtk_widget_activate () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007ffff781f996 in gtk_menu_shell_activate_item () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#7  0x00007ffff781fcd1 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007ffff7690cb4 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007ffff7f2a5a9 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff7f4305e in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff7f43dbf in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff7969844 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff780783e in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ffff78092f6 in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00007ffff6e90815 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#16 0x00007ffff6eea7a2 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#17 0x00007ffff733c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff733ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff733cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff74fd65d in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#21 0x0000555555570833 in main (argc=1, argv=0x7fffffffe2b8) at /home/dmw/src/OTPClient/src/gui/main.c:25
(gdb) quit

edit: compiled with:

   56  cmake -DCMAKE_BUILD_TYPE=Debug   -DCMAKE_C_FLAGS_DEBUG="-g -O0"  . 

And manually source-installed cotp from your GitHub repo

@paolostivanin
Copy link
Owner

I still have to test the changes I made 😄 seems like no luck in getting everything working at the first try lol

@paolostivanin
Copy link
Owner

Now everything works fine, at least for me 😄 could you please try against latest master and let me know?

Thanks

@dw
Copy link
Author

dw commented Jun 28, 2024

Thank you, Edit Row works in latest master for me :) Thanks so much

paolostivanin added a commit that referenced this issue Jun 28, 2024
This commit moves:
- the deletion mode
- the edit row action
- the show row qr action
to a context menu that can be activated by right clicking on
the desired row. This partially fixes #359

This commit also introduces macros to help make the code more readable.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants