Code Snippet enhancements
See original GitHub issueDetailed description
Describe in detail the issue you’re having. Is this a feature request (new component, new icon), a bug, or a general issue?
Feature request.
Is this issue related to a specific component?
Code Snippet.
What did you expect to happen? What happened instead? What would you like to see changed?
Feedback from Adam Lankford & Co.
- Would be nice to fix the scroll bar on the terminal snippet (horizontal scroll, can it be vertical)?
- Some teams are interested in using the “light” code snippet, but have the sizing be similar to the Terminal snippet. Can we remove the
max-height
on the light code block?
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
Containers / Kubernetes.
Issue Analytics
- State:
- Created 6 years ago
- Comments:38 (38 by maintainers)
Top Results From Across the Web
Code Snippets - MadCap Flare's Online Help
You can create and insert code into documentation in dozens of languages. The syntax is automatically highlighted according to the language, similar to...
Read more >Rush Snippets - Key Features and New Enhancements ...
Rush Snippets adds missing dependent imports to the top of the file, if needed, to support the code in the expanding code snippet....
Read more >Using Source Editor Enhancements in Visual Studio*
Code snippet insertion lets you insert a prototype construct (such as DO , WHILE , or MODULE ) from a list. Use the...
Read more >Enhancements to your code review workflow
Enhancements to your code review workflow ... They also now support Markdown and rich content, like code snippets.
Read more >Feature enhancement for snippets: copy existing snippet
This can be helpful when you want to use an existing snippet as a starting point for a new one, or when you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Final Designs
The final designs for the code snippet revamp include:
All of the following designs should use Plex Mono
Terminal Snippet
Functions the same as the previous terminal snippet (can only scroll horizontally), just getting a visual update.
height:56px;
width: 600px
border: solid 1px #DFE3E6
(ui-03)background-color: #fff
(ui-01)Code Snippet
height:56px;
width: 250px
border: solid 1px #DFE3E6
(ui-03)background-color: #fff
(ui-01)Inline Code (new)
height: 22px;
width: varies based on content
background-color: F4F7FB;
corner-radius: 4px;
padding: 0 4px;
Important Notes
Percentage is definitely possible, and it would be relative to the parent element’s font size 👍
Honestly the only two requirements I look for are:
For the line break stuff, it’s definitely not bad to break a line. Typically editors support this as an option in their editor. If someone has the line wrap option on, then some character on screen represents that the line has wrapped.
For example the carriage return character (might have to open it up to view the character):
Option 4 for inline 👍 Really only because the blocks don’t touch when the line above or below has a code snippet as well, and visually it seems like the smaller font is more inline than the larger ones.