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

feat: fields and message expansion feature #320

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

Conversation

pamburus
Copy link
Owner

@pamburus pamburus commented Jun 29, 2024

Description

This pull request adds the ability to expand fields and messages.

  -x, --expansion <MODE>      Whether to expand fields and messages [env: HL_EXPANSION=] [default: medium] [possible values: never, inline, low, medium, high, always]
  • Expansion mode never completely disables field expansion, even if multiline fields are found.
  • Expansion mode inline expands only multi-line fields as-is (inline) without any prefixes or formatting.
  • Expansion mode low uses low expansion settings profile, which minimizes expansion.
  • Expansion mode medium uses medium expansion settings profile, which provides an optimal balance between readability and density.
  • Expansion mode high uses high expansion settings profile, which shifts the balance towards readability.
  • Expansion mode always expands every field regardless of its value and expands the message if it is multiline.

The default mode is now medium. To keep the old behavior, use the inline mode.

Demo

expansion

Copy link

codecov bot commented Jun 29, 2024

Codecov Report

Attention: Patch coverage is 98.30724% with 40 lines in your changes missing coverage. Please review.

Project coverage is 76.73%. Comparing base (b582b3e) to head (890e328).

Files Patch % Lines
src/app.rs 94.62% 17 Missing ⚠️
src/cli.rs 93.20% 7 Missing ⚠️
src/formatting.rs 99.55% 6 Missing ⚠️
src/model.rs 80.95% 4 Missing ⚠️
crate/heapopt/src/lib.rs 97.61% 3 Missing ⚠️
crate/mline/src/lib.rs 99.28% 2 Missing ⚠️
src/fmtx.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
+ Coverage   72.04%   76.73%   +4.68%     
==========================================
  Files          40       42       +2     
  Lines       10533    12484    +1951     
==========================================
+ Hits         7589     9580    +1991     
+ Misses       2944     2904      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pamburus pamburus marked this pull request as ready for review June 29, 2024 21:57
@pamburus pamburus changed the title new: Fields and message expansion feature feat: fields and message expansion feature Aug 13, 2024
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.

1 participant