Code Monkey home page Code Monkey logo

victory-docs's Introduction

victory documentation site (DEPRECATED)

Code related to publishing docs for Victory has been moved into the main repo. Please see: https://github.com/FormidableLabs/victory/tree/main/docs

Getting Started

To install and run the docs site locally:

yarn install
yarn start

Note that paths in local development are based on a root of "/" but be careful when defining relative and absolute paths inline or doing url parsing, as the production output root will be "open-source/victory." Links in markdown files are currently handled with a link helper that prefixes relative paths with "/open-source/victory", so links like "/docs/victory-area" will work as expected in development and production. When adding links elsewhere, use createPath from src/helpers/path-helpers to ensure the path is correctly prefixed.

Want to see if you're ready to :shipit:?

To build the staging build output and serve it with the canonical path it'll have when built as a lander for formidable.com:

#builds and serves staging content at localhost:3000/open-source/victory
yarn stage-and-serve

This step is important for validating that both the basePath used by the static HTML output and the basename used by the client-side router are working as expected.

Ready to Publish?

Currently this package is consumed as a dependency of formidable.com, so deploying docs changes required publishing. To publish to NPM run

This package must be published with [email protected]

npm version <newversion | major | minor | patch> (see Versioning notes below)
git push origin master && git push --tags
npm publish

Ready to Deploy?

OSS landers are deployed by the formidable.com package. To deploy, open a PR on formidable.com that updates the version of victory-docs to the new version. You will be able to see your changes on staging before merging to deploy.

Versioning Notes

For a reliable systems of releases, victory-docs should aim for versioning along these lines:

  • Patch: Typos, missing assets, broken styles, very minor copyedits.
  • Minor: Add a new page, significantly change styles.
  • Major: Rearchitect how the lander works, remove pages, or something else huge.

victory-docs's People

Contributors

amyboyd avatar angelanicholas avatar bmathews avatar boygirl avatar brittanyirl avatar carloskelly13 avatar chrisbolin avatar ddunc avatar dependabot[bot] avatar derekmaffett avatar ebrillhart avatar exogen avatar greenkeeper[bot] avatar ianwsperber avatar jeremypeters avatar jonathanchu avatar kylecesmat avatar maddles avatar mindjuice avatar ngoknows avatar paulathevalley avatar rawrmonstar avatar ryan-roemer avatar scotmatson avatar scottianstewart avatar slate71 avatar stefvhuynh avatar treyhoover avatar wgolledge avatar wsparsons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

victory-docs's Issues

Add a way to switch themes on every component playground

Maybe this is another dropdown?

from @boygirl : Ecology takes a dropdowns prop takes an array of name, options objects, and then whichever thing is selected ends up on context, this.context.[name]: { selectedOption }
<Ecolgoy dropdowns={[{name: "theme", options: [null, VictoryTheme.material], selected: 0}]} />

[Docs] Write up an in-depth quickstart guide

From @david-davidson on December 23, 2015 18:38

We have great per-component docs right now, but it'd be nice to have an equally great high-level overview that walks through the dev process from npm install through rendering a composed chart.

  • We could start with a look at our (arbitrary) data and a screenshot of the desired outcome.
  • Next, we'd walk through the installation process: npm install, etc.
  • Step by step, we'd build out the chart components (with a screenshot at every major step) until we have what we want!

If we wanted to get real fancy, we could even put the sample chart in a standalone repo and, after every major step, link to a diff of the relevant commit(s).

(Note that this could also replace the current contents of /docs [a.k.a. "Getting started"] in the docs site.)

Copied from original issue: FormidableLabs/victory#124

An extraneous Style component is getting rendered

An extraneous <style> tag is getting rendered along with the docs component:
screen shot 2016-06-16 at 3 31 04 pm
(Both 260 and 292 are VictoryTheme, and 293 is media queries)

Removing <Style rules={theme}/> tag in the /docs/victory-component/docs.js component in favor of /docs/app.js will resolve the duplication and still keep styled docs when running builder run docs-dev locally.

There are several places to remove:

  • victory-chart/docs/victory-area/docs.js
  • victory-chart/docs/victory-axis/docs.js
  • victory-chart/docs/victory-bar/docs.js
  • victory-chart/docs/victory-chart/docs.js
  • victory-chart/docs/victory-line/docs.js
  • victory-chart/docs/victory-scatter/docs.js
  • victory-core/docs/victory-animation/docs.js
  • victory-core/docs/victory-label/docs.js
  • victory-pie/docs/docs.js

Add “visual punch”

Directive from boss: Homepage is too minimalist, needs higher information density.

Here is the planned redesign:
homepage

Some optional questions to answer:

  • What does it make you think of?
  • How does it make you feel?
  • Is it engaging?
  • Does it resonate with you?

Make Recipes Bigger

Is it possible to reflow charting components for wider screens, so that they are larger for wider screens, and stay just as small and readable for narrow screens?

Could this be achieved by adding flex properties to the parent <svg>? (i dunno!)

Homepage: Replace image with Chart, Decrease whitespace

A chart needs to be at the top of the page. Decrease the spacing between each heading.

Change github & gitter icons to buttons/links with text.

Add comments to the playgrounds to indicate they are editable. Eventually, add back the "live preview" and "editable source" to the playgrounds.

Add an external link icon to Ecology

Context: Each Victory Component has its own <Docs /> component that runs <Ecology /> on the repo’s latest README.md.

Question: Is it possible to determine whether the link leaves or stays on the documentation site and add the appropriate icon?

e.g.
screen shot 2016-04-06 at 11 27 47 am

Add a Showcase section to the About page

  • Showcase page should live in the About page, formidable.com/open-source/victory/about
  • In the repo, it should be a new component at src/screens/about/components/showcase.js
  • For each app/usage, there should be:
    • a screenshot
    • the name of the company that uses it
    • one or two sentences that provide context: who is using it, how are they using it, and what they are using it for (or whatever context makes the most sense)
  • Finally, there should be a link to the showcase on the homepage. Somewhere. Maybe the logos stay on the homepage and there’s a call to action to the showcase. Maybe the showcase link needs to be farther up on the page. I'm not clear on this part yet.

Include composed example without VictoryChart wrapping in landing page docs

From @coopy on February 5, 2016 19:33

The existing example in victory-examples is an important piece of documentation, as it shows users how to compose standalone VictoryLine and VictoryAxis components in an svg tag, while maintaining control over domain and scale.

Let's clean up the victory-examples repo and add it as a part of victory.formidable.com under e.g. "composing charts from standalone components".

Copied from original issue: FormidableLabs/victory#196

Homepage iteration

Goal: Make Victory look robust and fully-featured—this is not a toy.

Tasks:

  • Keep the current first chart
  • Directly underneath the first chart, add 2 or 3 complicated charts: Economist chart and LiveChart, perhaps a third to demonstrate how much Victory can actually do
  • Rework the typography to be skimmable and easily readable

Make this repo public again

In the process of setting up automatic deployment, this repo was made private. However, it should (and can) be made public again!

This may require reconfiguring travis’s encrypted environment key that access the formidable.com server.

Instructions for Travis

To hookup travis, first, convert the SSH key to .pem format:

openssl rsa -in id_rsa -out deploy_static.pem

Then, encrypt the key with the travis gem, which will generate encrypted environment variables on travis. It will modify the .travis.yml file to add the decryption step, and any comments/formatting will be lost. (Note: encrypted environment variables are not available for pull requests from forks.)

gem install travis
travis encrypt-file ~/.ssh/deploy_static.pem --add

Make sure the .travis.yml configuration file does not preserve any of the filepath, e.g. ~/.ssh/ from the example above.

Add more content to Victory

As discussion with Marketing, Victory could improve with a more robust Getting Started Guide or a Troubleshooting/FAQ Guide.

Unlike the other documentation, Getting Started Guide lives in this repo. If there's a more visible place for these guides to be seen in one of the victory repos, I'm happy if things get moved around 🎷 just do it.

/cc @kenwheeler @ebrillhart

Reshuffle homepage

Changes to the homepage:

  • Ditch "Try it" text.
  • Ditch editor's note about component playground.
  • Ditch "Benefits" header.

FRIENDLY

  • Move first example under Friendly heading.

FLEXIBLE

  • Economist chart should go under Flexible. Fixed height for code block since it's long—code will scroll.
  • Put style & data in variables beneath the Victory code.
  • Copy should update to reflect the deeply customizable aspect.

COMPOSABLE

  • 3rd chart to be selected by @boygirl, should be simpler than Flexible example.

Add fourth heading:
RESPONSIVE & HYBRID (title TBD)

  • React-Native capable.

Github & Gitter:

  • Repeat near npm install & keep it below as well under LEARN MORE
  • Maybe top are small github & gitter logos/icons?

LEARN MORE

  • Change github & gitter links to super obvious, big buttons.

Unable to npm link ecology

Ran into this issue trying to work on FormidableLabs/formidable-landers#23.

Basically, victory-docs requires componentry from victory-chart where ecology is used. In order to test why the flashing occurs in victory-docs, I wanted to npm-link my local ecology repo. victory-docs must be built built to observe the issue as we are using SSR. When I then ran builder run build-static, I receive an error about multiple instances of babel-polyfill.

Steps to reproduce:

  • npm link ecology
  • builder run build-static (not an issue with builder run dev)

Dump:

[builder:proc:start] Command: webpack --config node_modules/builder-docs-archetype/config/webpack/webpack.config.static.js --progress --bail
 95% emit

Error: only one instance of babel-polyfill is allowed
    at Object.<anonymous> (main:135:29064)
    at Object.<anonymous> (main:135:29521)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
    at Object.e.(anonymous function).Object.(anonymous function).writable (main:135:26235)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
    at Object.e.__esModule.default (main:135:26053)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
[builder:proc:end:1] Command: webpack --config node_modules/builder-docs-archetype/config/webpack/webpack.config.static.js --progress --bail
[builder:builder-core:end:36271] Task: run webpack-static, Error: Command failed: webpack --config node_modules/builder-docs-archetype/config/webpack/webpack.config.static.js --progress --bail
 48[builder:proc:end:1] Command: builder run clean-static && builder run update-project && builder run webpack-static && builder run copy-assets
[builder:builder-core:end:36261] Task: run build-static, Error: Command failed: builder run clean-static && builder run update-project && builder run webpack-static && builder run copy-assets
 95% emit

Error: only one instance of babel-polyfill is allowed
    at Object.<anonymous> (main:135:29064)
    at Object.<anonymous> (main:135:29521)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
    at Object.e.(anonymous function).Object.(anonymous function).writable (main:135:26235)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
    at Object.e.__esModule.default (main:135:26053)
    at Object.<anonymous> (main:1:640)
    at t (main:1:352)
[builder:proc:end:1] Command: webpack --config node_modules/builder-docs-archetype/config/webpack/webpack.config.static.js --progress --bail
[builder:builder-core:end:36271] Task: run webpack-static, Error: Command failed: webpack --config node_modules/builder-docs-archetype/config/webpack/webpack.config.static.js --progress --bail
 48% 64/102 build modules

cc: @coopy @ryan-roemer @exogen

Docs on webpack builds with Victory

From @knowbody on January 3, 2016 17:51

Write a comprehensive guide of how to build Victory components in your project with webpack the "right" way considering:

  • Source Maps
  • Overall build composition
  • Pointing to lib/ vs. src/
  • Dependency management and flattening for things like lodash, React, et.c

This should go in the main victory README.

Copied from original issue: FormidableLabs/victory#145

Theme and Theme Park Docs Improvements

Now that we merged #96, we can (should!) do a few things:

  • VictoryTheme Docs: link to Theme Park
  • Theme Park: link to VictoryTheme Docs
  • Theme Park: rename "default" -> "grayscale"
  • Theme Park: use the "grayscale" source instead of importing
  • Theme Park: break into smaller files for comprehension

cc @paulathevalley and @ebrillhart

Add a Theme page to victory-docs

Add a page to showcase the ability to theme Victory components. Ideally, there would be a playground with the theme object and a dropdown to change between themes. In the meantime, there could be a playground per theme until component-playground can support adding a dropdown to toggle the themes.

Victory themes live in victory-core, so if the route followed suit, it would be http://formidable.com/open-source/victory/docs/victory-theme
...since themes are little different from everything else, I could reason behind using a different route, for example, http://formidable.com/open-source/victory/themes/

Create an About Victory Page

  • The about page should live at formidable.com/open-source/victory/about
  • In the repo, it should be a new component at src/screens/about/index.js
  • The page should contain:
    1. Showcase (with an anchor tag so we can link to it directly: formidable.com/open-source/victory/about#showcase)
    2. Origin of Victory story (including photos of the OG Formidable(s)?)
    3. Top 5? 8? contributors pulled from Github
    4. Formidable’s story

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.