Unibeautify / website

Webpage for Unibeautifier

Home Page:https://unibeautify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve Multi-Select Code Blocks

Glavin001 opened this issue · comments

From facebook/docusaurus#103 (comment)

Check out https://github.com/govau/platforms-alpha/blob/master/lib/shared/fileTabs.js

Thoughts on any improvements which can be made to our existing multi-select code blocks?
I don't think tabs will work, as @stevenzeck pointed out we have too many options to select, however, this plugin structure looks very promising and potentially more flexible and robust.

The tabs would go into the next row if it takes up too much space:

screen shot 2018-10-17 at 12 33 34 pm

We would also need to style it, modify the source to accept source code instead of the file.

I don't think tabs would work for us, there are some code blocks with many many languages. I like the select box we have no. Maybe use something like Select2 which supports searching? https://select2.org/searching

Should really build this into a proper plugin for Docusaurus instead of our hack.

Looks like Docusaurus has more official support builtin: https://docusaurus.io/docs/en/doc-markdown#language-specific-code-tabs
However, it uses tabs which is not idea.