iliana

pure of heart and dumb of ass

computer toucher (derogatory); recreational bureaucrat; longer intro


ktiiy, full-stacked shitpost development engineer, and crow appreciator


get shrdled, idiot


see also:


blog / RSS
iliana.fyi/
email me
iliana@buttslol.net

vogon
@vogon

really not sure how they managed to screw up displaying text, but they did


iliana
@iliana

this post finally made me go and look a little closer at what's going on. i have been pissed off at the new github code viewer for weeks, because it has two very bad features:

  1. if i click the code, it creates a blinking cursor
  2. if i click the code, it jumps the page around for no fucking reason
  3. if i select code, it usually jumps the page around and removes my selection for no fucking reason

so it turns out the code view is two parts: a <textarea> which is used to select the text and get events to understand what the user is clicking/selecting, and what i can only describe as a "character canvas", because it is filled with thousands of empty <span> elements that specify the styling rules, along with a data-code-text="b" attribute and a ::before rule that specifies content: attr(data-code-text), thus making this styled version completely unselectable. i think the styled character canvas is positioned on top of the textarea, which explains all the bizarre font rendering issues i keep seeing.

i have learned all this because i was hopeful that getting rid of the <textarea> which drives all the things that drive me insane would make the website normal, but, no, unfortunately, there is a sea of tens of thousands of deliberately-unselectable single-character spans littering the DOM instead.

github drives me up the wall and i wish i could stop using it. unfortunately i am employed at a company that is using a lot of its value-add that would be hard to replace with another system. shit fucking sucks!


You must log in to comment.

in reply to @vogon's post:

although, this particular bug is making me realize something horrifying: the code selection is implemented in a <textarea> that is overlaid on top of the highlighted code

maybe a quick userstyle can restore my sanity