code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Focus and comment labels #332

Open gurkerl83 opened 1 year ago

gurkerl83 commented 1 year ago

Just a quick question, is a combination of focus and a comment label possible? I thought when you focus, it would be very nice to activate the corresponding comment label so the code itself does not have to include any comments. Anyway, thx for the great library you have built!

pomber commented 1 year ago

what do you mean by "activate the comment label"?

gurkerl83 commented 1 year ago

When you hover over a link with the focus protocol set to line 3 it gets highlighted.

line 1   function adipiscing(...elit) {
line 2      // label something something
line 3      console.log("hover me")            => would be nice if the comment shows on the right side, 
                                                  not requiring a separate hover over line 3 
line 5      return elit.map((ipsum) => ipsum.sit)
line 6   }