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

explore: consolidate padding config, handle ByteStream, tweak naming+comments #12915

Merged
merged 5 commits into from
May 20, 2024

Conversation

rgwood
Copy link
Contributor

@rgwood rgwood commented May 20, 2024

Some minor changes to explore, continuing on my mission to simplify the command in preparation for a larger UX overhaul:

  1. Consolidate padding configuration. I don't think we need separate config points for the (optional) index column and regular data columns in the normal pager, they can share padding configuration. Likewise, in the binary viewer all 3 columns (index, data, ASCII) had their left+right padding configured independently.
  2. Update explore so we use the binary viewer for the new ByteStream type. cat foo.txt | into binary | explore was not using the binary viewer after the ByteStream changes.
  3. Tweak the naming of a few helper functions, add a comment

I've put the changes in separate commits to make them easier to review.

@rgwood rgwood requested a review from sholderbach May 20, 2024 16:21
Copy link
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for simplifying this. Having a tighter configuration with a few obvious knobs should make this more usable.

Haven't run it yet (so can't say much about the ByteStream stuff, cc @devyn , @IanManske )

crates/nu-explore/src/views/binary/binary_widget.rs Outdated Show resolved Hide resolved
rgwood and others added 2 commits May 20, 2024 09:50
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
@sholderbach sholderbach added configuration Issue related to nu's configuration pr:commands This PR changes our commands in some way labels May 20, 2024
@sholderbach sholderbach merged commit 6e050f5 into nushell:main May 20, 2024
15 checks passed
@devyn
Copy link
Contributor

devyn commented May 20, 2024

Seems to work, but I can't use page up and page down. I'm using:

open ~/.cargo/bin/nu | into binary | explore

@rgwood
Copy link
Contributor Author

rgwood commented May 20, 2024

@devyn I think that's a preexisting issue, I can't use page up/down in the binary viewer on an older version of Nushell either. I think there's a lot of stuff that isn't quite finished in the binary viewer :(

@hustcer hustcer added this to the v0.94.0 milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Issue related to nu's configuration pr:commands This PR changes our commands in some way
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants