Empty spans are taking up space when there is Pali and no English

In DN32, the content after 2. The Second Recitation Section is empty space.

1 Like

Do you mean this space:

It’s just the entire previous text repeated.

Oh… Are you on FireFox? I think this is some odd browser bug. I think it’s been reported before. Maybe solved? Maybe it’s back?

yeah, that space shouldn’t be there.

I’m going to split this into its own thread since it’s a code problem, not a typo.

2 Likes

Yes, that space. I tried Safari and DuckDuckGo.

So are you on a Mac laptop/desktop? And you tested in Safari and DDG (which I believe is Chromium under the hood) and got the same result?

Could you let us know which version of Safari you are using?

1 Like

Yes, a MacBook Pro laptop, Safari Version 17.6 (19618.3.11.11.5)
I tried Google Chrome also, same result.

Oh, yes, it looks that way for me on Chrome too.

My recollection was that this was a problem previously on just one browser, probably not Chrome. So maybe this is a new thing that’s spread.

@HongDa?

@Pasanna you have a great memory for these things. Does this ring a bell?

2 Likes

This might be intentional? I recall seeing something similar with long sidenotes in screenshots earlier in the bug thread, like in this post

I might be mistaken, but either you’d have some empty space or there could be some overlap and other misalignment. Out of those options the empty space is the only legible one

Oh nevermind, I see the second screenshot is just English and no side-by-side - yea that doesn’t seem right. I can reproduce that on Chrome 143.0.7499.192 for Android and Chrome Version 143.0.7499.194 (Official Build) (x86_64) on macOS

Quite literally empty <span>s in the inspector:

When I disable the margin-left: 2em on the .verse-line .translation CSS, it’s fixed:

So that line of CSS might need to be conditional or something - would need to look at the code more closely (here’s the line of CSS for reference), but figure I’d give a first pass look on it while I’m here.

Thanks for that diagnosis. It’s tricky to handle the CSS well given all the different configurations. If you have a specific suggestion we’ll try it out, otherwise it might be a while before we get to it.

Thanks for your response Bhante :folded_hands:
I’m a recent volunteer contributor (Sr Staff SWE by profession, long-time volunteer FOSS maintainer and contributor in various ecosystems - see the links in my profile if curious), so the diagnosis is as much for me to look at later as for any other volunteer or staff/HongDa :slightly_smiling_face:

And yes I’ve seen all the variations of how Bilara pages render in the code, I just mentioned all the complexities to a friend earlier today too :sweat_smile:

Conditionally (not) rendering the CSS is one option, but it’s often less complicated to just not render the HTML at all if it will be empty/invisible anyway. But I’d have to look closely at the component tree to see what’s best; at that point I might make a PR if I figure it out.
I’m working on a few other things in the codebase (mainly properly configuring and automating linters to catch bugs and format style automatically), so leaving on the TODO list for now.

And as Ven. Snowbird mentioned, this might be a past bug too, so would want to check some history and/or write a regression test for this case specifically too

1 Like

I can’t recall this one. It looks like Anton is onto it. Lmk if y’all need any help.

2 Likes