Comments (6)
I remember you already submitted similar issue in v2.
In v3 I
- moved copy code button in code block title
- removed blured background
- added transparent bg instead, similar how to docusaurus does
What’s your proposition to fix?
from docs.
Possible options are
- hide completely
- collapse both buttons into an expandable context/dropdown menu
from docs.
hide completely
disagree, useful feature, especially on mobile
collapse both buttons into an expandable context/dropdown menu
I think it's too overcomplicated for only 2 actions
As an another idea we can do approach similar as GitHub do but we'll lose some 44px
for code-block content
from docs.
I rarely use the copy and line-break toggle on my phone, so I disagree that a context menu would be too complicated.
How often do people copy a code snippet on mobile, for me it makes most sense on a desktop where you want to run the example? It might be an acceptable trade-off to hide that button and only display the line break toggle.
The code area is already quite small due to all the vertical spacings, so the latter seems suboptimal.
Reducing the size of the buttons in the header and placing them next to each other could also be a possibility.
from docs.
How often do people copy a code snippet on mobile, for me it makes most sense on a desktop where you want to run the example? It might be an acceptable trade-off to hide that button and only display the line break toggle.
this is true, we already show Word wrap
button only on mobile, so we can hide Copy button
from mobile and put Word wrap
there
Will be more minimalistic too for mobile devices
The code area is already quite small due to all the vertical spacings, so the latter seems suboptimal.
true too
Reducing the size of the buttons in the header and placing them next to each other could also be a possibility.
We can try to see how it looks like, but I would stay with putting word wrap button on copy button place
Accepted to be fixed in Nextra directly!
from docs.
@n1ru4l I've just thought that github approach will be perfect since if code block doesn't contain filename, copy code button will be in code block and not in its filename (and covering issue will still persist), so we can leave copy-code for mobile for now (since github has it on mobile too)
from docs.
Related Issues (20)
- Bug: hmr not work HOT 1
- logo right click brand kit
- [NEW FEATURE] - @theguild/remark-mermaid to support mermaidConfig as parameter HOT 4
- ERR_PNPM_LINKING_FAILED Error: EAGAIN: resource temporarily unavailable, copyfile HOT 6
- Move Yoga versions into a drop down and bring versions to all websites HOT 1
- Bring changelog to all websites HOT 1
- Have a dropdown to get to other Guild libraries on each library website
- Configurable og-image
- Require meta > description on every page HOT 1
- Enforce titles shorter than X characters
- Detection of broken links, no longer available pages and new urls
- Visual regression testing
- Remove meta > application-name, apple-mobile-web-app-title
- SEO checker for basic things
- Configurable title suffix / prefix
- Configurable name + tagline of the library in the top bar
- Allow to overwrite/extend the footer
- Ability to hide search on specific pages
- Nextra's search shows duplicated results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.