Feature ideas

We take your ideas seriously! Read more on our prioritization process in our blog https://productmanagement.port.io/posts/managing-feature-ideas
Code Snippet widget
Within the guides on the Port documentation site, there is a UI component that can be used to display code snippets (offering line number display, syntax highlighting and a copy button for easy reuse). Backstage offers a code snippet component for use within their portal (also offering conditional line number display, language-specific syntax highlighting, a built-in copy button, and automatic dark mode support). Similar to these examples, we would like a code snippet widget (similar to the existing markdown widget, though with it's source as a markdown property on the current entity - similar to this feature request ) that includes the following: line number display (turn on/off with a widget property, default to on?) syntax highlighting (language specific, based on a language added to the markdown-based code block - something like ```js - when that annotation exists) built-in copy button (just like the snippets in the Port docs site) ----- Our intended use case centers around helping developers connect the dots in the software development lifecycle between "paved roads"/"golden paths" (fully templated project starting points) and finished product (pull requests leading to deployed code) - the ability to share reusable code snippets that both promote best practices and help give newer developers additional lift. We envision this overall functionality would include a blueprint with code snippet entities, a catalog page to allow users to search/filter/sort to find the snippet they are looking for (or to just browse through available snippets for inspiration), and then a code snippet entity page displaying an entity widget with details about the snippet (title, description, language, tags - this feature request would help with that piece a lot!, etc.) and this new code snippet widget allowing the developer to both see the snippet in a well-presented manner (line numbers, syntax highlighting, etc.) and use a built-in copy button to quickly and easily grab the snippet for pasting into their IDE. Looking towards day 2, we also hope to explore using Port's MCP server for direct IDE integration, allowing a user to try to find and pull in applicable snippets directly. I could also see applicability for some of the same functionality within rendered markdown files (automatically parsing and rendering code blocks with line numbers, syntax highlighting, and a built-in copy button within an imported markdown file - like where we pull in README.md files for repos and display them in a markdown tab on the repo entity page)...but that feels like a separate request.
0
Load More