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

Ultracompact Mode for Inspector (was RfC: Ultracompact Mode) [stacked on #2357] #2319

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

philtweir
Copy link
Contributor

@philtweir philtweir commented Jul 28, 2024

What does this PR do?

Adds an ultracompact mode for the inspector.

  • introduces a simplified inspector tab, with only previous-current-next commands as rows, in compact mode
  • allows navigation through session history within the inspector (so compact inspector view is still useful)

It also (see comments below):

  • makes compact into compactness, an enum (to better standardize across inspector/interactive)
  • makes the inspector only change on ultracompact mode, which is still compact+(height<8)
  • clippy's complexity limit wanted draw split up a little, so not sure if this is a reasonable minimal way to do so for now

TODO

  • additional tests, although keen for input on how best to do these
  • documentation (once configuration/semantics are aligned on)

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@@ -1280,8 +1428,8 @@ mod tests {
let no_preview = State::calc_preview_height(
&settings_preview_auto,
&results,
0 as usize,
0 as usize,
0_usize,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just noticing some of these came through from linting but are not related to the current PR - might be a rustfmt version/config difference, so shall I just revert in this PR?

Copy link
Member

@ellie ellie Aug 5, 2024

Choose a reason for hiding this comment

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

No, I think this is fine to include!

Fwiw just testing your changes but generally look good

@ellie
Copy link
Member

ellie commented Aug 5, 2024

Generally all good, thank you! Ultra-compact works nicely.

However the inspector might need some adjusting. I run compact mode all the time (as do some others), and it will likely become the default in the future. In compact mode, the inspector looks like this regardless of size

CleanShot 2024-08-05 at 14 38 03@2x

I think it would make sense to continue to show the stats/etc if the terminal is large enough, but I do really like the scrolling through history/session.

Do you think you'd be able to split the inspector changes into a separate PR? Other than those commits, I'm happy to merge this as-is

@philtweir
Copy link
Contributor Author

Yep, sure! Good point - thinking about your comment, I realise I haven't properly thought about that stylistically-compact vs limited-space difference, so could I suggest I do two new PRs, if that makes sense:

  • inspector in ultracompact mode (so compact and <8 lines), including the interactivity (as otherwise it's a bit redundant)
  • inspector in compact mode, to start the discussion about what would be useful in general to change/keep/rearrange when compact is on (as I think you & others would need to input first to make sure I go in a sensible direction)

@ellie
Copy link
Member

ellie commented Aug 5, 2024

That sounds good to me!

@philtweir
Copy link
Contributor Author

I have split out #2357 as requested, which this PR is now stacked on. It has been updated to:

  • make compact into compactness, an enum (to better standardize across inspector/interactive)
  • made the inspector only change on ultracompact mode, which is still compact+(height<8)
  • clippy's complexity limit wanted draw split up a little, so not sure if this is a reasonable minimal way to do so for now

The intention (as above) would be to open a comment/forum-post to work out behaviour for a new PR for the inspector in (non-ultra-) compact mode, but this PR no longer has any change to the inspector except in ultracompact mode.

@philtweir philtweir changed the title RfC: Ultracompact Mode Ultracompact Mode for Inspector (was RfC: Ultracompact Mode) [stacked on #2357] Aug 10, 2024
@philtweir philtweir marked this pull request as draft August 10, 2024 09:15
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