Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bsodmike
Copy link

@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
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.

src/app/style.rs Outdated
@@ -1,8 +1,11 @@
use clap::ValueEnum;
use core::panic;
Copy link
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
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
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
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
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

src/app/style.rs Outdated Show resolved Hide resolved
@bsodmike
Copy link
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
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
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