Git Product home page Git Product logo

catalog's People

Contributors

adintegra avatar amytych avatar austinsc avatar benjazehr avatar bldng avatar blowery avatar ddanielbee avatar dependabot[bot] avatar equinusocio avatar greenkeeperio-bot avatar grossbart avatar janwaechter avatar jstcki avatar lucguillemot avatar mattfelten avatar mhintz avatar piotrf avatar sorosora avatar tbroadley avatar torford avatar tpreusse avatar werehamster avatar wiederkehr 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  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  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

catalog's Issues

Remove page styles and scripts?

It's not clear to me why we should keep them. If someone wants to add custom CSS and scripts, they should do so in the HTML file.

What do you think @naehrstoff?

Margin-left for lists

List should be indented by a margin on the left side.
This is true for text in specimens as well as outside.

screen shot 2015-02-19 at 16 56 47

screen shot 2015-02-19 at 16 57 48

Add arbitrary classes to specimen content

@PiotrF and I were discussing that it'd be useful to add arbitrary classes to specimens. The particular use-case is that we need to simulate a body class each specimen is wrapped in. Currently we can do two things:

  • <body class="my-body-class"> in the document where Catalog runs. This might break Catalog's own styles though.
  • Manually wrapping each specimen's code in <div class="my-body-class">...</div>. This seems more "correct" but it's tedious and it adds noise to the specimen's source view.

We've already discussed something similar in #5.

Ideally, we could write:

```html|dark,my-class
…
```

which would output

<div class"cg-Specimen-Html-content cg-Specimen-Html-content--dark my-class"></div>

The way to decide if this particular class should be namespaced or not would be to check against the defined modifiers (plus run-script).

I don't feel super-excited about this approach. Ultimately I still think, all specimens should be iframed dynamically, so we can encapsulate their styles properly.

Document Catalog options

Documentation is currently only available by inspecting the example page. The available configuration options should be better documented.

Column layout

It would be nice to have a responsive 3-column layout with arbitrary content

Specimen Overview Page

The Specimen Overview page should list all specimens with a short description and a link to the specimen's doc page.

Linking to a Catalog page part

Currently, because we use hash history this isn't possible. We could switch to pushState-style routing but that would require a server which supports that.

Generate several specimens of the same code snippet but with different modifiers

In order to efficiently test various modifiers of a component without duplicating code all the time, it would be nice to be able to specify a list of modifier classes and then generate all variations.

<a class="button">…</a>
<a class="button button--important">…</a>
<a class="button button--large">…</a>
<a class="button button--important button--large">…</a>

The last example shows that it might be interesting to specify a list of lists of modifiers.

Creating React components for this and passing in different properties could be a solution. Those components could then be toString()ed to output “real” HTML. Let's see.

Write documentation for 2.0

  • Standalone vs. npm (Designers vs. Developers)
  • How to use the npm module
  • Update catalog configuration docs
  • Remove style test (at least from built docs)
  • Catalog React components
  • Add Image specimen srcset example
  • Document page styles, scripts, imports
  • Catalog configuration for imported markdown files with webpack
  • Review intro text
  • Consolidate terminology (properties vs. keys vs. options etc.)

Later

  • Theming

Specimen Documentation

All specimen documentation pages should follow the same structure:

  • A brief description
  • Markdown API (options & JSON configuration)
  • React API (don't worry right now)
  • Examples with copy-n-pasteable code snippets

Define component configuration options via lang parameter

We need to define which code blocks should be converted to iframes. The only built-in possibility of marked for this is the lang parameter of code blocks.

For example:

```component
<a class="btn">...
```

```component-small
<a class="btn">...
```

Replace code block language overloading with React components

Instead of overloading the code block language parameter with specimen types, change the Markdown renderer to accept React components. With this in place, we can include specimens as JSX React components, clarifying intent and simplifying configuration/extension possibilities.

To help with this endeavor, we might switch to Remarkable as a Markdown renderer. There is the React Remarkable plugin that in theory should support this out of the box:

<Markdown>
  # Catalog example

  > A short introduction

  ## A card

  This card shows a specimen:

  <HtmlSpecimen>
    <button class="button">Button</button>
  </HtmlSpecimen>

  More content follows
</Markdown>

Per-page style injection

Allow user to specify per-page styles that are injected into the page or iframe. This is currently possible for global styles:

Catalog({
  title: "Catalog",
  styles: ["docs/example.css"]
})

Catalog CLI

What about turning Catalog into a CLI tool and/or Node module.

That would have several benefits:

  • Potential integration of a development server with hot module replacement
  • No need for index.html
  • Routes and navigation menu could be auto-generated through directory tree
  • Wrapping Markdown files into React components could be done by simply concatenating, solving the problem we'd have with #21.
  • Build to static site = better performance
  • Catalog on the server = potential integration of an editor

Allow nesting pages in sidebar

Catalog should accept a nested page structure and display that in the sidebar. Nested groups should be collapsed by default.

sidebar-nesting

HTML Project Redesign

  • Separate actions (new window, download) and source code tabs
  • Code block style similar to code specimen
  • Rename to "Iframe"?

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.