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

As a documentation writer, I want to run CLI-renderer to convert patch saved to an SVG image #13

Open
5 tasks
nkrkv opened this issue Jun 14, 2016 · 0 comments

Comments

@nkrkv
Copy link
Member

nkrkv commented Jun 14, 2016

As a documentation author, I want a command-line utility that given a path to patch JSON would provide rendered SVG file.

Patch figures are massively used for end-user documentation. It’s a pain to have a long toolset to produce that images.

The better idea is to keep example mini-patches as JSONs along with documentation source files and get them rendered automatically on documentation build.

This would also guarantee that we’ll get 1:1 visual experience between IDE and HTML docs.

Produced SVG’s must be correctly rendered by supported browsers.

Acceptance criteria

  • I can xodc render /path/to/project/patch-to-render/patch.xodp and result SVG well be rendered to stdout
  • xodc render can understand paths of shorter form /path/to/project/patch-to-render/ and /path/to/project/patch-to-render as well
  • xodc render can take --output or -o argument to output to file rather than stdout
  • Dimensions of the output are determined by bounding box of patch contents
  • The resulting SVG alone is rendered correctly in Chrome and Firefox

How to implement

  • Implement an additional build step of xod-client that would produce a single CSS for patch rendering
  • Make a ReadOnlyPatch React container that is similar to existing Patch but doesn’t attach all interactive stuff
  • In the implementation of render subcommand use that container and invoke method to render it to an SVG string
  • Inline CSS required into the SVG string
  • Output the SVG string
@nkrkv nkrkv changed the title CLI-renderer of patches to SVG As a documentation writer, I want to run CLI-renderer to convert patch saved to an SVG image Jun 21, 2016
@nkrkv nkrkv removed the enhancement label Jun 21, 2016
@nkrkv nkrkv added the t:feat label Jul 26, 2016
@nkrkv nkrkv added this to the Sprint #25 milestone Sep 6, 2017
@nkrkv nkrkv removed this from the Sprint #25 milestone Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants