exercism / exercism

Crowd-sourced code mentorship. Practice having thoughtful conversations about code.
https://exercism.org
7.36k stars 1.04k forks source link

No solutions visible in Firefox Reader view #6422

Open habere-et-dispertire opened 2 years ago

habere-et-dispertire commented 2 years ago

Firefox has a reader view for removing some of the administrative detritus. Solutions are not visible in this mode.

github-actions[bot] commented 2 years ago

Hi and welcome to Exercism! :wave:

Thanks for opening an issue :slightly_smiling_face:

SleeplessByte commented 2 years ago

@habere-et-dispertire assuming you use this to either "read" the page or have the page spoken to you, what would you like the solutions to read out? I'll make sure I'll help the team get the correct markup in place.

habere-et-dispertire commented 2 years ago

Firefox reader view is a common workaround for printing that first removes a lot of unnecessary content for the print medium. I was using it for this purpose.

If a solution has multiple iterations, then only the currently selected iteration is printed. I was hoping that Firefox reader view would expose all the iterations, but instead it shows none.

habere-et-dispertire commented 2 years ago

If a print stylesheet is an option, please consider that code syntax highlighting serves different purposes when reading or writing code. Colour syntax highlighting is useful for writing code, but gets in the way when reading it. Textbooks typically render code with a different set of conventions for the printed page.

SleeplessByte commented 2 years ago

Understood. It will not expose all the iterations because they are actually not loaded (until you click the link). It not showing up at all is imo a bug, or at least something we should attempt to fix.

A print stylesheet is an option; I think we can even attempt to load a "print" variant of the syntax highlighting.

P.S. I use Chrome Mobile "Reader View" all the time, and I think it does the same thing you describe. I use it to remove all distractions.

habere-et-dispertire commented 2 years ago

Please also see issue 520.


Here's a monochrome highlight style which seems suitable for printing. It uses pandoc's automatic rendering from a fenced code section.

Notice also how using a typeface with understanding of common programming operators can harness ligatures to improve legibility. Point in case, the numeric equality operator == (two equals signs):

is-achilles-min

SleeplessByte commented 2 years ago

Yes, ligatures are great for this.

habere-et-dispertire commented 2 years ago

Just to over communicate and clarify, I think that a print stylesheet would be well suited to not only printouts, but to viewing solutions on screen. Colour syntax highlighting is geared towards editing.

SleeplessByte commented 2 years ago

I think that's very much a "personal preference". In my opinion, the better solution would to be able to select in what cases you (as a user) would see which type of styling.

habere-et-dispertire commented 2 years ago

Yes and for some reason it seems to get heated fast (see the comments section under Linus Åkesson's article: A case against syntax highlighting.

So a personal preference here sounds sound. A will not argue beyond for a default against prevailing views to the contrary.

SleeplessByte commented 2 years ago

Oh yeah. I don't see the point in replicating that here. You pointed out that it matters to you and the impact on the ease for you to consume the content. I think that, up to a reasonable point, should be enough to consider this change 🤗.

I'll let you know if I have more questions about this but i think your examples are very clear.