-
Notifications
You must be signed in to change notification settings - Fork 418
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
Generator for asciidoc representation of all ECS fields #347
Conversation
@dedemorton Hey this uses the 3 column layout you were proposing in elastic/beats#9519. I'm doing so with a twist: we're packing a bit of information vertically, for each row:
I'm not in love with how exactly this first attempt looks, but I think it's a good start :-) cc @karenzone |
76c29f6
to
40dccec
Compare
Updated screenshots. Index page Notice Base is now first. Fieldset details page
|
@webmat I like the second layout is better (the table in the first iteration was a little confusing visually when you added the level and type info). It would be nice for the entries in the table to link to the full description under field details. @karenzone I pinged you about this in slack, but wanted to ask if you can make sure this content builds OK with the asciidoctor version of the doc build. tl;dr for @webmat: we're eventually migrating to asciidoctor, which is more restrictive than asciidoc. |
@dedemorton Yes, linking to the detail section was next on my TODO :-) As for the table, I agree the second is better. But I'm, still experimenting to find just the right way to integrate the level, I'm still not satisfied. So ideas are welcome there as well. I'm more than happy to build using both versions of the tooling, to make sure things will remain ok when we switch over. Just point me in the right direction :-) |
Actually since ECS now has short descriptions everywhere, 4 columns renders pretty good. My favourite below is "type last". I'm also attaching a bunch of 3-col experiments as a zip. I really prefer 4 cols. level last type last 3 columns |
HTTP is really cramped, though 🤔 |
Yah the overall layout of tables in really bad. Unfortunately the knobs for adjusting cell padding in asciidoc don't work with our doc build. I haven't tested on asciidoctor. I've been wanting a css change for quite awhile, but that's not happened yet. To build with asciidoctor, run the docker-based version of the doc build (build_docs instead of build_docs.pl) and include the --asciidoctor flag. Sometimes one problem can cause many messages, so don't lose hope. :-) Reach out to Nik E if you have questions about the asciidoctor build. |
I realize I haven't posted a full page rendering of the listing of field sets, yet. With the new short descriptions, the page looks great :-) Also, moving back to the layout initially proposed in #334, which has all of the information directly in the table (no need for details section below): |
Looking for ideas on how to best word the section about field reuses at the bottom of the fieldset detail page. Here's a screenshot of Input on the wording of this section is particularly welcome 😆 This gets the job done, but it's not concise. |
@ruflin As of now, this PR doesn't render footnotes yet. Only I wonder if we should drop this attribute altogether. If we need to flesh out details about a section, we should do it in the main description, I think. What do you think? |
@karenzone Your input would be welcome on how best to display information about field reuse. Where a field set is expected is currently two sentences (just like in the readme), whereas what's expected to be nested under a field set is a table. Should we do all sentences, no tables? Should we do two tables? Only one table, with an added column that explains which direction the reuse goes? See the screenshot above, where |
Ok, this is ready for final review, IMO. We can revisit how reusability is rendered as a separate PR. What we currently have there is functional, though. |
I skimmed through the code and looked at the docs locally. What is most important for me in this PR is that we have the docs in asciidocs and can iterate on top of it. There are a few things I would change but lets discuss it later as it's just about pages and formatting, not the general idea. |
This code generates both the index page for the fields section, and the detailed page for each fieldset. Also in this PR: - If `short` not set, copy `definition` to it - If `short` contains \n, fail. Beginning of an ECS linter. - Beef up the local file imports in tests. - autopep8 ignore E402, in order to leave local imports alone - Create generators/ecs_helpers.py, to start reusing functionality beween generators
…of all ECS fields (#347) (#392) This code generates both the index page for the fields section, and the detailed page for each fieldset. Also in this PR: - If `short` not set, copy `definition` to it - If `short` contains \n, fail. Beginning of an ECS linter. - Beef up the local file imports in tests. - autopep8 ignore E402, in order to leave local imports alone - Create generators/ecs_helpers.py, to start reusing functionality beween generators
This code generates both the index page for the fields section, and the detailed page for each fieldset.
TODO
short
description for fieldsets todescription
. Raise ifdescription
has newlines.How to visualize this PR
Via GitHub's rendering of asciidoc, in my branch
Or in the ECS repo
http://localhost:8000/ecs-fields.html 👀