Users would be able to quickly navigate between specific implementations ("replace substring", "get last item of array", etc.) for a specific language, without having to scroll and visually parse for their targeted language every time they click a new snippet; allowing efficient/focused comparison & referencing.
This would be very useful for the following type of snippet/tag/file structure:
A toggle button for this feature would improve the relevance of user searches, allowing them to quickly show/hide languages depending on their current search context. Ideally it would be accessible in one click via the main interface, perhaps as an icon next to the "Filters" dropdown.
Auxiliary feature: the ability to discard the filter for the active snippet via a "Filter ✖️" chip next to the "Collapse/Expand" button, while retaining the functionality of the global toggle when a new snippet is selected.
It would be very useful to allow multiple languages to be filtered at the same time.
For example, it would allow users to reference a new/unfamiliar language against a language they are already comfortable with. They could set a filter to show only .java and .py files, so that only Java & Python examples are visible while navigating snippets.
Currently, languages can only be filtered via the sidebar, and language filters cannot be combined with tag filters. The proposed feature would be most effective if both language & tag filters could be used simultaneously.
Some possible solutions:
- [A] Add a "Languages" section to the "Filters" dropdown.
- [B.1] Allow shorthand filters in the "Search" bar. e.g. #some-tag @some-language
- [B.2] Autocompletion would make the shorthand filters even more efficient.
IMO B would be a more efficient workflow, and could potentially replace the need for a "Labels" section in the "Filters" dropdown.
For example; a user needs to brush up on the string replacement differences between Java & Python, so they type "replace #string-manipulation @java @python" and proceed to click through the displayed snippets. They can easily modify the query, tags, or languages by quickly typing to add/overwrite them (especially w/ B.2); without the need to click between the search query bar & multiple sections of the "Filter" dropdown.
Please sign in to leave a comment.