interactivethings / catalog Goto Github PK
View Code? Open in Web Editor NEWCreate living style guides using Markdown or React
Home Page: https://www.catalog.style/
License: BSD 3-Clause "New" or "Revised" License
Create living style guides using Markdown or React
Home Page: https://www.catalog.style/
License: BSD 3-Clause "New" or "Revised" License
Provide multiple versions of an image. Probably should just use srcset
Almost done. Still needs cleanup.
The built files shouldn't be committed to the master branch
For pages with not enough content it's placed right after it instead of at the bottom of the viewport.
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?
Project specimens' iframes should not contain any padding, the content should go right to the edge of the iframe.
@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.<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.
catalog
is already taken on npm.
😁
Documentation is currently only available by inspecting the example page. The available configuration options should be better documented.
# Example Markdown
This <a href="#">link</a> is not converted correctly.
This & and this → are not converted correctly.
Currently we use Ramda, lodash and sprout. We should remove all but one or all of them.
It would be nice to have a responsive 3-column layout with arbitrary content
Optimize menu for small screens, remove all horizontal padding from cards to test components full-bleed on small screens
The Specimen Overview page should list all specimens with a short description and a link to the specimen's doc page.
Catalog should be usable in an existing React app to document components
Maybe with https://github.com/davidjbradshaw/iframe-resizer
Also, we should allow defining the size explicitly.
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.
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.
srcset
exampleAll specimen documentation pages should follow the same structure:
The styles
config should be optional.
This will make it easier to integrate in existing React apps
Hot reloading and all the rest. Also make
should start the server instead of producing a build.
Icons are currently implemented as a specimen, but don't do anything. Finish this.
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">...
```
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>
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"]
})
Set .babelrc to "stage": 2
and fix everything until it works again.
What about turning Catalog into a CLI tool and/or Node module.
That would have several benefits:
index.html
Allow use of different background colors, similar to the HTML specimen
Strongly leaning to CSS modules in conjunction with Postcss-JS
Highlight page navigation as soon as the whole button is hovered.
I.e. remove all CoffeeScript code.
It should be possible to create UI specimens without links
Preferably mdast. Make sure it supports HTML.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.