Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Dev Docs: Reformat RPC/REST Tables To 2 Lines Per Entry #757
Conversation
|
Forgot to add: full HTML preview here: http://dg1.dtrt.org/en/developer-reference#addmultisigaddress |
harding
added
the
Dev Docs
label
Feb 19, 2015
|
@harding I don't know how this would look like, but it's probably possible to allow the page expand more vertically while keeping tags confined to 600px, without re-organizing tables and losing a 11% of browsers compatibility according to caniuse.com, in case you want to explore this idea. Or otherwise, I'm pretty sure your current layout could be achieved with some workaround around tables. If you'd ask me, I think the "Name Type Presence" rows should have a border. |
|
Bah, you're probably right. I'll see if I can do it another way using basic HTML tables. |
harding
closed this
Feb 20, 2015
|
@harding Beside using HTML directly, isn't there a way to use the "colspan" attribute with markdown? There is also the possibility of generating a separate table for the description, and style it to make it look like a single row of the table it is following. I didn't test it but I think there's good chances this might work. |
|
@saivann I've searched, but AFAICT there is no way to use colspan with Kramdown Markdown or even my favorite Markdown, Pandoc. What I've done for re-imagining this commit is create YAML-powered inline templates that replace the RPC/REST tables, e.g.:
That YAML gets fed to the file named Right now all I'm trying to do is recreate the current layout perfectly so an HTML diff of the site shows zero changes. I'll PR that (hopefully today) and, if there's agreement, we can merge it. After that, I can create |
|
@harding Sounds very interesting! |
harding commentedFeb 19, 2015
This replaces Markdown-created tables with lists that are converted into tables by CSS. A key feature is that each entry now occupies two lines of the table, giving each field more space for improvement (or allowing us to add extra fields later on). Here's an example:
@jonasschnelli you may want to review regarding your issue #723
@darioteixeira you may want to review regarding the ongoing discussion in pull #753
This uses CSS flexbox, which is apparently supported by all recent browsers, and most browsers that people use: http://caniuse.com/#search=flexbox
I tested it works on:
It did not work for me on:
Looking at the table linked above, in my opinion, I think it's reasonable to expect developers to use one of the supported browsers.
For Reference
Here's the sed script that converted all of the files. (I did have to manually change parts of _includes/helpers/vars.md and change one character in the REST get_block.md file. Everything else was automatic.)