Skip to content

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

@codecov
Copy link

codecov bot commented Jun 29, 2024

Codecov Report

❌ 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).
⚠️ Report is 366 commits behind head on master.

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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
@pamburus pamburus marked this pull request as draft September 14, 2025 04:46
@pamburus pamburus added the enhancement New feature or request label Oct 5, 2025
@zx8
Copy link

zx8 commented Oct 17, 2025

This feature looks incredible! Is there any ETA on it landing?

Keep up the great work.

@pamburus
Copy link
Owner Author

@zx8
Thanks! There is no ETA on this yet.
I thought this feature was almost ready, but it turned out to be more complex than I initially expected, and some of the decisions made here are quite controversial. There are unneeded complications in the codebase, as well as new, subtle bugs.
I decided to postpone it a bit because I hope to finish another huge refactoring soon. That will help make the implementation of this feature less messy.
I will probably split this feature into two parts. I am also thinking about delivering less heuristic-based code in the first batch, since it is the most controversial and complicated to implement, and it requires a lot of advanced configuration for fine-tuning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants