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 7 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 96.59864% with 30 lines in your changes missing coverage. Please review.

Project coverage is 83.37%. Comparing base (c056f7a) to head (5e62dee).

Files with missing lines Patch % Lines
src/app.rs 94.62% 17 Missing ⚠️
src/cli.rs 93.20% 7 Missing ⚠️
crate/mline/src/lib.rs 99.28% 2 Missing ⚠️
src/model.rs 90.47% 2 Missing ⚠️
src/fmtx.rs 90.90% 1 Missing ⚠️
src/settings.rs 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
+ Coverage   80.59%   83.37%   +2.78%     
==========================================
  Files          41       42       +1     
  Lines       12028    13854    +1826     
==========================================
+ Hits         9694    11551    +1857     
+ Misses       2334     2303      -31     

☔ 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
@pamburus pamburus force-pushed the feature/expansion branch 2 times, most recently from 2261945 to df95c31 Compare December 21, 2024 19:27
@pamburus pamburus force-pushed the feature/expansion branch 2 times, most recently from 481cb5f to 926ce87 Compare January 13, 2025 21:44
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