lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Can we remove unused elements of the columns title map?


From: Vadim Zeitlin
Subject: Re: [lmi] Can we remove unused elements of the columns title map?
Date: Wed, 27 Sep 2017 19:19:17 +0200

On Wed, 27 Sep 2017 16:23:07 +0000 Greg Chicares <address@hidden> wrote:

GC> The headers are in a map indexed by column name. Those headers and that
GC> map remain the same, don't they? And we were just discussing whether
GC> some potential columns could be removed from that map, but we concluded
GC> that none should be removed.
GC> 
GC> Doesn't that just mean that there's nothing to do?

 Yes, sure, I could do nothing and so I'll revert the commit

https://github.com/vadz/lmi/commit/f6b09f929ab18fae4ca927f4986256f27dda9964

to actually achieve the goal of "doing nothing" by "doing something" first
and then "undoing it" later. Maybe I should have been more clear that I was
just looking for something better to do than doing nothing, but if it was
determined that having these unused labels isn't a problem, then this does
answer my question, thanks.


GC> It must be harder than s/_/\n/g or you wouldn't ask. But I don't
GC> understand why it's harder. Is it that the way those underscores
GC> were used was flaky, so that a simple character substitution wouldn't
GC> do the right thing? Is it the case that, more than a decade ago, we
GC> just added series of consecutive NBSPs, represented by underscores,
GC> until there were enough to make FOP decide to wrap to a new line?
GC> If so, is there anything we can do to make your task easier, like
GC> try to create a PDF with every possible column so that you can read
GC> the intended line-break positions from a printout instead of trying
GC> to figure out what some awful code does?

 This actually would be helpful, although I guess I could do it myself, at
least for the columns that can actually appear in the supplemental reports.
For now I just tried to break the headers in way that seemed logical to me,
see https://github.com/vadz/lmi/commit/f8121e1799af3ed02d379fbec30c98e1c2302af6
But if we must present not only the labels wording but also labels line
breaks, then this was almost certainly a wrong thing to do.

 So my new question is: is it important to preserve the same way or
wrapping labels as is used now?


GC> > Just to make it clear, I could -- although it will take some more
GC> > time -- implement this idea while exactly (modulo my mistakes)
GC> > preserving the current behaviour and without touching the existing
GC> > title map at all. Should I do this?
GC> 
GC> Now I'm really lost.

 Sorry, I should have been more explicit: what I was speaking about in the
last paragraph was an alternative implementation, completely different from
the way things are done now. And, to repeat, I could remove the title map
from ledger_evaluator.cpp (née ledger_xml_io.cpp) entirely but recreate it,
with all of its columns, in the new PDF code. Thinking more about this, it
won't make it any easier for you to review the changes however, so while I
still think this might be a good idea, it's probably better to postpone it
until later.


 For now the only (but important) question I still have is the one above,
about the importance of preserving exactly the same line breaks in the
column labels. Could you please let me know the answer to it?

 Thanks in advance,
VZ


reply via email to

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