Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834923 - Wiki forces full selection of commands
Summary: Wiki forces full selection of commands
Status: RESOLVED FIXED
Alias: None
Product: Websites
Classification: Unclassified
Component: Wiki (show other bugs)
Hardware: All Linux
: Normal minor with 1 vote (vote)
Assignee: Gentoo Wiki Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 19:05 UTC by Eduardo Bray
Modified: 2022-08-05 04:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Bray 2022-03-10 19:05:33 UTC
The Wiki is forcing the full selection of all the documented commands with "user-select: all". There are a lot of reason why a user should want to partially select the text but currently that can't be done without some annoying workarounds.

Reproducible: Always

Steps to Reproduce:
1. Open any wiki article with a command line of text.
   E.g. https://wiki.gentoo.org/wiki/Zsh
2. Try to select just the command without the path or any section of the text.
   E.g. Just select the package name of this command:
   root # emerge --ask app-shells/gentoo-zsh-completions
Actual Results:  
Forces the selection to all the text or none.

Expected Results:  
Allow users to select what they want and don't force it to only do a full or none selection.

An alternatives might be to restore the normal selection behavior after the text is full selected; or restore the behavior and simply add a button to copy the command text.

Thanks
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-26 21:28:27 UTC
ping.

Related:
[21:27:05]  <ano> don't think it's great idea to add "user-select: all" css property to every cmd in handbook, now cmd parts cannot be selected/copied
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-29 22:46:01 UTC
maffblaster: ping, could you take a look?
Comment 3 Matthew Marchese Gentoo Infrastructure gentoo-dev 2022-08-05 04:04:59 UTC
This has been resolved as of this change:

https://wiki.gentoo.org/index.php?title=Template%3AGenericCmd%2FLine&type=revision&diff=1081069&oldid=1046741

My attempt here was to enable a single click selection on the block level command template. It is a compromise for those who wish to avoid javascript (NoScript users) and who want to easily select the whole "command" with a single click.

I think a better solution for all will be to use a javascript library (such as clipboard.js) for a one-click copy to clipboard feature.