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

Add example content "components" to pattern library #277

Open
james-nash opened this issue May 21, 2019 · 0 comments
Open

Add example content "components" to pattern library #277

james-nash opened this issue May 21, 2019 · 0 comments
Labels
🌟 enhancement TYPE: Indicates new feature requests ui CATEGORY: Anything related to the design or implementation of UI components and styles

Comments

@james-nash
Copy link

Is your feature request related to a problem? Please describe.
The context data we pass into our Nunjucks templates (via Pattern Lab or, soon, Fractal) works fine for plain text strings and basic data types. However, it is not well suited for blobs of HTML code.

And yet, in consuming projects like the website or GMS, it is not uncommon to render chunks of HTML (e.g. from markdown file) and then wrap them in Gravity components (e.g. the article-related components). I think it is therefore desirable to have examples of such HTML blobs within the pattern library so that we can:

  • Insert them into suitable Gravity components for more realistic sample/demo pages
  • Stress-test those components with content that is representstive of what Gravity consumers will have

Note: The section component is a kludgy way of doing something similar, but I'm proposing we remove that (#276).This issue is to produce some better replacement(s)

Describe the solution you'd like
Add some example "components" for things like:

  • HTML rendered from markdown (maybe have a few variants of this. e.g. long and short samples, ones with different max heading levels, simple/complex, etc.
  • HTML of syntax-highlighted code generated by something like Prism.js
  • Others?

We also need to find a way to make it clear that these are not actual components but just sample content. Maybe some naming convention and/or making them hidden (so they don't show up in the library's nav).

Note: It probably makes sense to wait until we migrate to Fractal before doing this - see #264

@james-nash james-nash added 🌟 enhancement TYPE: Indicates new feature requests ui CATEGORY: Anything related to the design or implementation of UI components and styles labels May 21, 2019
@james-nash james-nash added this to the Gravity NEXT milestone May 21, 2019
@james-nash james-nash removed this from the Gravity NEXT milestone Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement TYPE: Indicates new feature requests ui CATEGORY: Anything related to the design or implementation of UI components and styles
Projects
None yet
Development

No branches or pull requests

1 participant