Skip to content

feat: Add group_users mode#754

Merged
gtema merged 1 commit intomainfrom
tui
Nov 15, 2024
Merged

feat: Add group_users mode#754
gtema merged 1 commit intomainfrom
tui

Conversation

@gtema
Copy link
Owner

@gtema gtema commented Nov 15, 2024

  • add view for managing group users
  • sketch commands that would be available in individual identity modes

- add view for managing group users
- sketch commands that would be available in individual identity modes
@gtema gtema merged commit e084e89 into main Nov 15, 2024
@gtema-release-plz gtema-release-plz bot mentioned this pull request Nov 15, 2024
@gtema
Copy link
Owner Author

gtema commented Nov 15, 2024

@markus-hentsch with this PR merged you can better debug your backspace/del issue by running RUST_LOG=debug cargo r --bin ostui, pressing backspace/del (maybe few times) and then looking into ~/.local/share/openstack_tui/openstack_tui.log where you should see entries like:

2024-11-15T13:18:06.318268Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.457967Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.598215Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.933357Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:07.068271Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:07.223013Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received

If you do not have proper event for "Backspace" please let me know

@markus-hentsch
Copy link

@markus-hentsch with this PR merged you can better debug your backspace/del issue by running RUST_LOG=debug cargo r --bin ostui, pressing backspace/del (maybe few times) and then looking into ~/.local/share/openstack_tui/openstack_tui.log where you should see entries like:

2024-11-15T13:18:06.318268Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.457967Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.598215Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:06.933357Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:07.068271Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received
2024-11-15T13:18:07.223013Z DEBUG handle_key_event{key=KeyEvent { code: Delete, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:235: Key event received

If you do not have proper event for "Backspace" please let me know

I now tried QTerminal and Konsole, both Qt-based terminal emulators. The problem only happens in QTerminal but not in Konsole. Turns out that leaving QTerminal's behavior > emulation setting at "default" causes the issue but changing it to "linux" fixes the behavior for QTerminal. The setting "vt420pc" shows the same broken behavior so I assume it is what it defaults to.

Pressing Backspace in Konsole or QTerminal with behavior > emulation set to "linux":

2024-11-18T16:34:21.877812Z DEBUG handle_key_event{key=KeyEvent { code: Backspace, modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:249: Key event received

Pressing Backspace in QTerminal (with behavior > emulation set to "default" or "vt420pc"):

2024-11-18T16:35:12.257747Z DEBUG handle_key_event{key=KeyEvent { code: Char('h'), modifiers: KeyModifiers(CONTROL), kind: Press, state: KeyEventState(0x0) }}: openstack_tui/src/app.rs:249: Key event received

A bit of research made me realize that ctrl+h is the historical implementation of the Backspace behavior:

The key labeled "backspace" is a matter of contention. Technically, it ought to send ^H simply because that is the name of the ASCII control character. Others differ, because their expectations have been affected by the history of this feature [...]

(source)

Seems like all TUI interfaces that I used so far are simply compatible with this historical way of treating Backspace.
Your call if you want to implement support for this old-fashioned behavior :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants