prevent drawing separators on starting lines of fields #17

Merged
HEL merged 1 commits from rajayonin/rivet-typst:fix-consecutive-ranges into dev 2025-11-28 11:37:43 +00:00
Contributor

On non-consecutive ranges, we were drawing the starting line on top of the separator, which lead to some visual glitches in some viewers (e.g. Chrome).

before
after

On non-consecutive ranges, we were drawing the starting line _on top_ of the separator, which lead to some visual glitches in some viewers (e.g. Chrome). ![before](/attachments/032b58f6-84c8-4670-8f4f-4450cdbe96e0) ![after](/attachments/cba7a173-9ba5-48df-ae0e-54fd08f76abb)
rajayonin added 1 commit 2025-11-20 09:06:13 +00:00
On non-consecutive ranges, we were drawing the starting line _on top_ of
the separator, which lead to some visual glitches in some viewers.
HEL requested changes 2025-11-21 14:02:58 +00:00
Dismissed
src/renderer.typ Outdated
@@ -392,1 +392,4 @@
range-boundaries.push(start-i)
range-boundaries.push(end-i)
}
range-boundaries.dedup()
Owner

Not really useful since we're only checking if an index is in the list later on (line 431/434)

Also, dedup doesn't modify the array in place so the result should be reassigned to the variable

range-boundaries = range-boundaries.dedup()
Not really useful since we're only checking if an index is in the list later on (line 431/434) Also, `dedup` doesn't modify the array in place so the result should be reassigned to the variable ```typst range-boundaries = range-boundaries.dedup() ```
Author
Contributor

Not really useful since we're only checking if an index is in the list later on (line 431/434)

What do you suggest we do instead?

> Not really useful since we're only checking if an index is in the list later on (line 431/434) What do you suggest we do instead?
Owner

It seems like removing duplicates is not really necessary because the only time we read from the list is to check whether it contains particular indices. I'd suggest not calling dedup at all

It seems like removing duplicates is not really necessary because the only time we read from the list is to check whether it contains particular indices. I'd suggest not calling `dedup` at all
Author
Contributor

Ok, done.

Ok, done.
rajayonin marked this conversation as resolved
HEL added the
bug
label 2025-11-21 14:03:33 +00:00
rajayonin added 1 commit 2025-11-24 08:17:53 +00:00
rajayonin force-pushed fix-consecutive-ranges from 3a0331f33b to b6f2fd99b8 2025-11-25 08:02:59 +00:00 Compare
HEL approved these changes 2025-11-28 11:37:33 +00:00
HEL merged commit df7899ee4b into dev 2025-11-28 11:37:43 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HEL/rivet-typst#17
No description provided.