TalmudLab/daf-renderer

Ambiguous Exception Names

Closed this issue · 10 comments

The two new CSS classes, "exception1" and "exception2", should be renamed. What do they correspond to and what triggers them?

I'm too tired to explain right now, ill explain tomorrow.

lmk!

I use them here:
image

In short, when we are working with one of the edge cases:
image
We have to modify the start-spacers to let one side text extend out all the way while pushing the other text all the way down into the "mid-spacer" region. In order to be able to modify the start spacers in the edge case, while not affecting the normal case, I created these two exception variables whose default values are 0, except when there is an edge case in which case the values become 1 (when inner is the smallest one then exception1 is True while exception2 is False and vice versa for outer being smallest).

As reference, we need to add a margin bottom to one of the start spacers in the edge case, otherwise the texts will look like they are together:
image

I was trying to think of a descriptive name for the variables, but they are literally switches. When we are in an edge case they allow one of the start spacers to have a margin bottom, otherwise it makes sure they don't have a margin bottom.

There is definelty a simpler way to manage that, but I wasn't able to think about what it would be.

For further reference, we turn those values on and off in style-manager:
image
And their default values in the css:
image

Should I go through the other values I introduced as well?

Thanks for the explanation!!

Regarding the other values, innerPadding and outerPadding make sense, but I think innerStart and outerStart should be innerStartWidth and outerStartWidth.

Regardng exception1 and exception2 (effectively booleans, so we can name them like Booleans) I like hasExtraBottomInner and hasExtraBottomOuter or something along those lines.

That makes sense.

Are you gonna update it in the main branch?

Sure, give me a bit