Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Multi-Select Code Blocks #196

Open
Glavin001 opened this issue Oct 17, 2018 · 4 comments · May be fixed by #211
Open

Improve Multi-Select Code Blocks #196

Glavin001 opened this issue Oct 17, 2018 · 4 comments · May be fixed by #211

Comments

@Glavin001
Copy link
Member

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.

@Glavin001 Glavin001 changed the title Improve Code Tabs Improve Multi-Select Code Blocks Oct 17, 2018
@stevenzeck
Copy link
Contributor

stevenzeck commented Oct 17, 2018

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.

@Glavin001
Copy link
Member Author

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

@stevenzeck
Copy link
Contributor

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

@Glavin001
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants