ariadne icon indicating copy to clipboard operation
ariadne copied to clipboard

feat: Add full label printing support

Open TurtleArmyMc opened this issue 3 months ago • 5 comments

This adds a simple boolean to the Report builder to not collapse multiline diffs with ellipses.

TurtleArmyMc avatar Oct 10 '25 23:10 TurtleArmyMc

Thanks for the contribution! Would it be possible for you to expand a little on the motivation for this? I'd think that showing the full contents of a file would often not be a positive thing.

zesterer avatar Oct 27 '25 15:10 zesterer

The change doesn't show the full file, just the full span of the label. The motivation was that I wasn't happy with not being able to see the full context of short labels even when there wouldn't be any problem displaying the whole thing. I guess a better API here could be a maximum line count before ellipses kick in instead of just a boolean ellipses always/full label always. If you want I could give implementing that a show instead of having this PR merged.

TurtleArmyMc avatar Oct 29 '25 03:10 TurtleArmyMc

Made the tweaks and also implemented a maximum line count option for the config.

TurtleArmyMc avatar Oct 31 '25 02:10 TurtleArmyMc

Thanks! Looks like it needs a cargo fmt before merge, but I'm happy with this now.

zesterer avatar Nov 03 '25 11:11 zesterer

Oops. Fixed.

TurtleArmyMc avatar Nov 03 '25 22:11 TurtleArmyMc

In an unrelated change, I added the ability to specify the number of lines of context that appear around label ends. This seems to have produced some conflicts.

I'm also not entirely convinced that Config is the place to put this option, and it might be better suited to being attached to individual labels (since some are more important than others). What are your thoughts on this?

zesterer avatar Dec 09 '25 14:12 zesterer

I moved the collapse settings from the config to the individual label. If this looks good to you, I can also make a PR to do the same to make the number of contexts lines label specific as well.

TurtleArmyMc avatar Dec 20 '25 00:12 TurtleArmyMc