slate
slate copied to clipboard
Slate docs site has bad UX
Problem There are multiple UX problems at docs website, for example lets take this page: https://docs.slatejs.org/walkthroughs/01-installing-slate
There are some code listings, but it's not possible to copy selection from code, it's only possible to copy the whole codeblock using the button, which is often unconvenient because you rarely need the whole listing, thus it requires pasting code into some intermediate buffer zone, selecting only part of code you need and copypasting from there.
There are links, like GitHub link, but it's not possible to open them in new tab using default shortcut (Command+Click on MacOS, for example). It's only possible to open in new tab if your right-click and select "Open Link in New Tab".
Solution Enable copying only selection from code and make links work with default shortcuts as expected.
Alternatives Not sure about alternatives.
Context There is enough context I think, please let me know if anything is missing.
These are the problems of the gitbook.com site generator. ~~Keyboard shortcuts do not work on sites generated by it~~. These problems have persisted for years.
~~You can copy text selected on their sites through the context menu.~~
I just use the docs markdown as rendered by the github itself. For example the page you have linked is perfectly usable here: https://github.com/ianstormtaylor/slate/blob/main/docs/walkthroughs/01-installing-slate.md.
EDIT: I was wrong. The issue is not the keyboard shortcuts. The issue is that there is a series of bugs when copying multiple blocks of texts.
There are some code listings, but it's not possible to copy selection from code, it's only possible to copy the whole codeblock using the button, which is often unconvenient because you rarely need the whole listing, thus it requires pasting code into some intermediate buffer zone, selecting only part of code you need and copypasting from there.
Copying a part of the code works for me in Chrome on MacOS, but not in Firefox on MacOS. I tried copying a part of a code block in Firefox from another website using GitBook, and it didn't work. So it seems like it's a general GitBook problem, but their public GitHub repo is deprecated.
There are links, like GitHub link, but it's not possible to open them in new tab using default shortcut (Command+Click on MacOS, for example). It's only possible to open in new tab if your right-click and select "Open Link in New Tab".
All links open in new tab with Command+Click for me, in both Chrome and Firefox on MacOS.