From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <twoerner@gmail.com>
Cc: <docs@lists.yoctoproject.org>
Subject: Re: [docs] [PATCH 02/10] docs: copy only the command from a console block
Date: Tue, 22 Sep 2026 17:16:04 +0200 [thread overview]
Message-ID: <DLLY04OEWY1F.21S0XIICXWBJ5@bootlin.com> (raw)
In-Reply-To: <arKTSMPTOXE2QkTU@localhost.localdomain>
Hi,
On Tue Sep 22, 2026 at 4:40 PM CEST, Trevor Woerner via lists.yoctoproject.org wrote:
[...]
>> > diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
>> > index f9e067239b8e..1a439e9faf69 100644
>> > --- a/documentation/sphinx-static/theme_overrides.css
>> > +++ b/documentation/sphinx-static/theme_overrides.css
>> > @@ -107,6 +107,15 @@ section#welcome-to-the-yocto-project-documentation p.caption {
>> > display: none;
>> > }
>> >
>> > +/* Sphinx already excludes the prompt from a selection; do the same for the
>> > + output, so selecting a session block gives what the copy button gives */
>> > +.highlight span.go {
>> > + user-select: none;
>> > + -webkit-user-select: none;
>> > + -moz-user-select: none;
>> > + -ms-user-select: none;
>> > +}
>>
>> This only works if the code-block uses the "console" lexer, though. Maybe say
>> that in the comment.
>>
>> But I think we don't want that. Copying outputs might be useful in some cases.
>> And I trust the reader to be conscious enough to only select the command, not
>> the output of the command (it's still nice not having the prompt selectable
>> though).
>>
>> I know this doesn't reflect 100% what the copy-button does but at least there's
>> still the option to copy the output.
>
> My preference would be that when the user copies, they only get the
> command; my guess is that's what they need, because they want to try the
> commands themselves. The output is something they might look at, but not
> necessarily copy.
>
> But I can see a case where they might want the output too. So I'm okay
> with changing the behaviour if that's what you'd prefer: it is one
> setting and one CSS rule, and both methods would then give the command
> plus its output, with the prompt stripped in each case.
>
> I have a much stronger opinion that the copybutton and mouse-selection
> should work the same, regardless of which way we decide they should work.
> First off, I don't think readers are going to really notice there are two
> ways to copy. But if they do notice, I think they would be surprised to
> find they worked differently.
I really think having two different ways of copying is a non-issue here... So
I'll stick with my first suggestion which is to let the user copy the output if
they want to, but have the copy button copy the command only.
Antonin
next prev parent reply other threads:[~2026-09-22 15:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 2:03 [PATCH 00/10] docs: editorial repairs to the examples Trevor Woerner
2026-09-22 2:03 ` [PATCH 01/10] docs: give the root prompts a preamble Trevor Woerner
2026-09-22 2:03 ` [PATCH 02/10] docs: copy only the command from a console block Trevor Woerner
2026-09-22 12:20 ` [docs] " Antonin Godard
2026-09-22 14:40 ` Trevor Woerner
2026-09-22 15:16 ` Antonin Godard [this message]
2026-09-22 2:03 ` [PATCH 03/10] docs: show a prompt on commands the reader is meant to type Trevor Woerner
2026-09-22 12:19 ` [docs] " Antonin Godard
2026-09-22 14:23 ` Trevor Woerner
2026-09-22 2:03 ` [PATCH 04/10] docs: write an elided passage as a comment Trevor Woerner
2026-09-22 2:03 ` [PATCH 05/10] docs: mark the placeholders in examples Trevor Woerner
2026-09-22 2:03 ` [PATCH 06/10] docs: remove real accounts from the examples Trevor Woerner
2026-09-22 2:03 ` [PATCH 07/10] kernel-dev: give each example block one thing to hold Trevor Woerner
2026-09-22 12:19 ` [docs] " Antonin Godard
2026-09-22 2:03 ` [PATCH 08/10] ref-manual: put the ARCHIVER_MODE comments on their own lines Trevor Woerner
2026-09-22 2:03 ` [PATCH 09/10] ref-manual: drop "partition" as a wic kickstart command Trevor Woerner
2026-09-22 12:19 ` [docs] " Antonin Godard
2026-09-22 2:03 ` [PATCH 10/10] dev-manual: indent a list continuation so the code block ends Trevor Woerner
2026-09-22 12:19 ` [docs] " Antonin Godard
2026-09-22 12:19 ` [docs] [PATCH 00/10] docs: editorial repairs to the examples Antonin Godard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DLLY04OEWY1F.21S0XIICXWBJ5@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=twoerner@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.