lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Truncated variables in mustache templates


From: Vadim Zeitlin
Subject: Re: [lmi] Truncated variables in mustache templates
Date: Wed, 25 Oct 2017 22:56:49 +0200

On Wed, 25 Oct 2017 18:37:19 +0000 Greg Chicares <address@hidden> wrote:

GC> A side benefit of replacing XSL-FO with mustache templates is that
GC> it makes questionable aspects of the underlying design easier to see
GC> and to reconsider.

 Absolutely. But I just hope we could still sequence the changes and do the
non-XSL-FO code merge first and then change it to behave better. I don't
say it just because I'm anxious to see this code merged (although I am),
but also because I think things risk becoming hopelessly confused if we try
to do everything at once and it would be really nice if we could have 2
logical steps instead: (1) replace XSL-FO with the new code and (2) change
the new code.

 BTW, if you're feeling really adventurous/confident with Git, you could
perfectly well create another branch for your changes to XSL-FO code
containing commits changing the behaviour. But you do risk having conflicts
with your other changes and so it would arguably be simpler to just keep a
list of things to be changed and actually do these changes after the
direct-pdf-gen branch merge.

GC> (Both implementations seem to do the same thing;

 This was my goal at this stage and while I tried hard to check everything
I did, I'm still afraid of having inadvertently changed something -- but if
I did, and you notice it, please be assured that it was a mistake and not
done intentionally.

[...]
GC> Truncating the insured's and corporation's names is probably just a
GC> regrettable necessity.

 I'm not really sure, we could just wrap this stuff inside an HTML table
cell. Of course, it risks looking a bit ugly, but OTOH it wouldn't lose any
contents which I'd naïvely consider to be more important than appearing
nice... Also, if we do need to truncate it, it would arguably make more
sense to truncate the text to the given width, rather than the given number
of characters: the first 6 characters of "WWWWWW Corporation" and "iiiiii
n. d. Vidual" have very different lengths, after all. Again, I didn't
change this because my goal was preserving the existing behaviour, but IMHO
it should be done at some later time.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]