Skip to content

Add "rev" detail to default view of keys#246

Open
bsodmike wants to merge 4 commits intoorhun:masterfrom
bsodmike:v0.11.0_add_rev_toplevel
Open

Add "rev" detail to default view of keys#246
bsodmike wants to merge 4 commits intoorhun:masterfrom
bsodmike:v0.11.0_add_rev_toplevel

Conversation

@bsodmike
Copy link
Copy Markdown

@bsodmike bsodmike commented Jul 28, 2024

Description

Brief POC wip to learn the internals and add "rev" detail to the top level view of keys

Motivation and Context

This helps to quickly visualise what has and has not been revoked. Ideally I plan to add a default filtering option to hide revoked keys,

How Has This Been Tested?

Manually, tests need updating.

Output (if appropriate):

You should see (rev) at the top-level view of keys.

Screenshot 2024-07-28 at 17 51 12

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Outstanding tasks:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bsodmike bsodmike requested a review from orhun as a code owner July 28, 2024 12:20
Copy link
Copy Markdown
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of adding (rev) to the beginning of the entries, we can change the style for preserving the alignment.

Comment thread src/app/style.rs Outdated
@@ -1,8 +1,11 @@
use clap::ValueEnum;
use core::panic;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to import stuff from core.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this, I was using panic for dumb testing. How can I enable tracing logging to STDOUT btw?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUST_LOG=trace cargo r doesn't help as the TUI takes over STDOUT

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a logging widget in the TUI: https://github.com/orhun/gpg-tui?tab=readme-ov-file#show-logs

You can also save logs to a file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! That's just neat

Comment thread src/app/style.rs Outdated
@bsodmike
Copy link
Copy Markdown
Author

bsodmike commented Jul 29, 2024

Maybe instead of adding (rev) to the beginning of the entries, we can change the style for preserving the alignment.

Any suggestions on changing the style? This is better as it means the tests will have far less breakage (we won't need to revise it)

@orhun
Copy link
Copy Markdown
Owner

orhun commented Jul 29, 2024

Maybe the revoked/invalid/etc keys can be gray or italic, indicating that they are not available. What do you think?

@bsodmike
Copy link
Copy Markdown
Author

That's a good idea!!

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