• Stars
    star
    105
  • Rank 326,266 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

✨ An experimental reimagining of WordPress components

G2 ✌️

npm version CI Workflow

An experimental component system.

📚 Check out the Storybook

https://g2-components.xyz/?path=/story/

The project is a from-scratch reimagining of @wordpress/components to accommodate the ever-growing and ever-expressive needs of the Editor and the platform. The ultimate goal is to provide a first class workflow to empower developers and designers (both core and 3rd party) to create cohesive, robust, and delightful user interfaces.

These components (and their sub-systems) have been uniquely developed to meet the need of integrating seamless into Gutenberg and WordPress. The UI's native-like aesthetic also allows them to be easily customized used outside of the Editor - potentially for 3rd party WordPress plugins and beyond!

Table of Contents

Getting Started

Using @wp-g2/components

Run the following command to add @wp-g2/components to your project:

npm install @wp-g2/components @wordpress/i18n @wordpress/data @wordpress/icons @wordpress/is-shallow-equal

Development

Install all the dependencies by running:

yarn

Then, fire up the local dev environment (Storybook) by running:

yarn start

Goals

There are several core values that drive everything in this project:

  • Design + Developer Experience
  • Native support and considerations for a11y
  • Seamless integration into existing systems

Design + Developer Experience (DX)

Everything by way of workflows should recognize and prioritize design and developer experience - considering the folks working directly on the project, as well as folks using and modifying parts of the project. Having superior DX enables newer contributors and users to work with the project and it's systems.

Native support and considerations for a11y

Considerations for a11y should be inherent to the core system. This ensures that a11y works consistently throughout the entire project. Adding a11y on top often leads to inconsistencies, fragmentation,and regressions. This should be avoided. Implementation should feel mostly "invisible" at the component (code) layer.

Seamless integration into existing systems

Developers should be able to reliably use any/all parts of the system within existing projects (like Gutenberg, WordPress WP-Admin, or anything else) with minimal integration/build-system effort. The project's component should function and render perfectly out-of-the-box.

Ultimately, the goal of this project is to derive useful UI features and/or architecture patterns and workflows to improve the experience of WordPress Gutenberg.

Thinking in Systems

The primary strategy to achieving the goals outlined above is to craft the (many) moving parts using a series of systems.

To help visualize the various systems and mechanics at flow, I've illustrated a flow chart for an example <Alert /> component.

Like this one:

Screen Shot 2020-08-06 at 7 45 21 PM

Here it is!

IMG_0457

There are 4 main systems which are represented by a colour:

  • Systems (Yellow)
  • Context (Blue)
  • A11Y (Pink)
  • Animations (Green)

The arrows that link the topics/keywords are colour coded to match their respective system.

Click here for more details about the core systems in this project.

Start Prototyping

Start experiencing the new (experimental) G2 Components project with this starter kit!

We can start prototyping with G2 Components in 2 ways:

  1. CodeSandbox (Recommended)
  2. Create React App
  3. Gatsby
  4. Next.js

CodeSandbox

To get started with the CodeSandbox template, click on the link below:

https://codesandbox.io/s/g2-prototype-sandbox-8ose4?file=/src/App.js

Create React App

To get started with a Create React App experience, run the following code in your Terminal:

npx create-react-app my-app --template @wp-g2/cra-template-protokit

Gatsby

To get started with a Gatsby experience, run the following code in your Terminal:

npx gatsby new my-site https://github.com/itsjonq/gatsby-starter-g2

For more details, check out the Gatsby G2 starter.

Next.js

To get started with a Next.js experience, run the following code in your Terminal:

npx create-next-app my-site --use-npm --example "https://github.com/itsjonq/next-g2-starter"

For more details, check out the Next.js G2 starter.

Video Tutorial

Below is a video walkthrough for prototyping with CodeSandbox and Create React App:

https://www.loom.com/share/7b0527a36f284568a9f1e7c1ab10fa42

Open for Feedback

This project provides a space for in-depth research and experimentation. It is totally open for thoughts and feedback!

More Repositories

1

kreate

A tiny element creator plugin for jQuery.
JavaScript
81
star
2

hstack-vstack-css

CSS layout components that (basically) horizontally and vertically stack anything.
CSS
43
star
3

zero

📦 A zero config scripts library
JavaScript
18
star
4

gutenberg-theme-creator

Gutenberg Theme.json Creator
JavaScript
15
star
5

lil-b

Lil' B - A Bootstrap "Reset" Stylesheet
CSS
14
star
6

wordpress-design-guidelines

📚 WordPress: Design Guidelines
JavaScript
13
star
7

controls

🎛 A control panel for developing/prototyping React UI
JavaScript
11
star
8

dotfiles

Ma dotfiles <3
Shell
10
star
9

styled-view

✌️ UI Primitive for React, with CSS-in-JS support
JavaScript
10
star
10

gutenbook

An experimental Storybook-based Gutenberg block dev environment
JavaScript
9
star
11

mnm

The minimal Obsidian theme.
CSS
9
star
12

cyan

🐱 Cypress-like testing for React + JSDOM
JavaScript
8
star
13

stylis-plugin-css-variables

🔄 Transforms CSS variable into static values for non-supported browsers
JavaScript
8
star
14

dark-refined

🔸Refined: A series of VSCode themes based on Dark+
JavaScript
7
star
15

timberjack

An object-oriented Wordpress theme that utilizes the Timber plugin
JavaScript
7
star
16

resizey

🐡 Resizey: Resize event listeners on DOM Elements!
JavaScript
7
star
17

progress-kit

⏳ A Progress Component Toolkit for React
JavaScript
6
star
18

use-moxie

🔗 React hook that integrates with Moxie - an online REST API for prototyping.
JavaScript
6
star
19

sup

⭐️SUP: Simple task tracker
JavaScript
6
star
20

scrolley

🐹 Scrolley: Extra scroll event listeners for DOM Elements!
JavaScript
6
star
21

wp-gs

WordPress: Global Styles (Concept)
JavaScript
6
star
22

jonquach

🦄 Q: My personal site
JavaScript
5
star
23

is

💡 A tiny type checker for JavaScript
JavaScript
5
star
24

styled-providers

✨ Handy Providers for Emotion / Styled Components
JavaScript
5
star
25

wordpress-components-snippets

✂️ Handy code snippets for @wordpress/components
JavaScript
5
star
26

obsidian

My Obsidian workflow.
JavaScript
4
star
27

prestart

🔑 A tiny tool to make Javascript development a little more delightful
JavaScript
4
star
28

platform

📦 Platform: A native-like React component library
JavaScript
4
star
29

recolor

🎨 Recolor
JavaScript
3
star
30

dash-get

✊ Get: A tiny get function, similar to Lodash.get
TypeScript
3
star
31

react-viewport-frame

React Viewport Frame
JavaScript
3
star
32

gallereakit

Reakit x Next.js: (Unsplash) Gallery previewer
TypeScript
3
star
33

g2-status

G2 Component Development and Integration Status
JavaScript
3
star
34

remake

🦋 Remake: A simple generator from locally defined templates
JavaScript
3
star
35

use-state-reducer

🔽 use-state-reducer
JavaScript
3
star
36

is-style-prop-valid

🎒 Utilities for CSS style properties
JavaScript
3
star
37

rxs

Reactive CSS: Super fast dynamic CSS rules!
JavaScript
3
star
38

g2-prototypes

🔳 G2 Prototypes
JavaScript
3
star
39

use-enhanced-state

🔄 A collection of enhanced useState hooks for React.
TypeScript
2
star
40

wp-gs-editor-x

WP: Global Styles: Editor Experiments
JavaScript
2
star
41

carbon

Styled atoms and components
TypeScript
2
star
42

patterns

A collection of neato design patterns
2
star
43

workshop-practical-css-animations

Workshop: Practical CSS Animations
HTML
2
star
44

move

👟Move: A game where you keep moving to stay alive.
JavaScript
2
star
45

reuse

♻️ A collection of React hooks
TypeScript
2
star
46

casein

Casein: Writing Sass/CSS with Javascript
JavaScript
2
star
47

genki

Genki 🌈: CSS Unit Testing in Node
JavaScript
2
star
48

ccjs

A tiny JS code comment converter app
TypeScript
2
star
49

shadow-light

🔲 An experimental UI study in shadows and light
JavaScript
2
star
50

next-twind-tailwind

Getting Tailwind and Twind to work with Next.js (v10)
JavaScript
2
star
51

sass-pathfinder

A tiny includePath resolver for node-sass
JavaScript
2
star
52

use-patterns

Curated Gutenberg block patterns
CSS
2
star
53

stephen.log

🌈stephen.log: It's like console.log, but with Stephen.
JavaScript
2
star
54

next-g2-starter

A simple Next.js starter to get up and developing quickly with G2
JavaScript
2
star
55

react-pose-15

🕺React Pose animation library, for React 15
TypeScript
2
star
56

im-sans

Idea Machine Sans (shortened as IM Sans) is a custom font made by Q
2
star
57

react-boost

🚀 Boost: Handy dependencies for a React App!
1
star
58

react-select

React Select Component
TypeScript
1
star
59

modes

Modes: A modular design system for CSS
1
star
60

protokit-starter

Prototype Starter Kit for Create React App
HTML
1
star
61

nodoubles

NoDoubles: HOW FAST CAN YOU WENT!?
CSS
1
star
62

formit

🐇Formit: A speedy way to create HTML forms.
JavaScript
1
star
63

taro

The minimal purple Obsidian theme
CSS
1
star
64

magic-box

Experimental prototype of a base Gutenberg Block
JavaScript
1
star
65

90s

A collection of 90s inspired website I made for fun
HTML
1
star
66

gutenjump

Gutenberg Jump Search Prototype
CSS
1
star
67

champ

🏆 Champ: Captain, slugger, skip, ace... Get one of these names!
JavaScript
1
star
68

composer-css

An SCSS utility toolkit designed for scalable CSS and composition
CSS
1
star
69

outrunner

🕶Outrunner: A Radical VS Code Theme
JavaScript
1
star
70

YouTubeSearchRankChecker

A simple YouTube SEO tool that checks the search rank of videos.
CSS
1
star
71

ringtones

🔔Ringtones: A collection of custom ringtones made by me!
1
star
72

shadowplay

ShadowPlay: A tiny app for designing fancy shadows and glows.
JavaScript
1
star
73

zest

Zest: A light-weight DOM Javascript library.
JavaScript
1
star
74

feels

❤️ Feels: Simple feels tracker
JavaScript
1
star
75

wp-gs-specs

1
star
76

react-stacked

🥞 An enhanced React Portal library with a managed closing system
JavaScript
1
star
77

block-animations

JavaScript
1
star
78

wordpress-live-preview

Live Preview - Wordpress Plugin
JavaScript
1
star
79

design-experiments

CSS
1
star
80

chakra-customization

JavaScript
1
star
81

playful

▶️ Playful: A simple transition library for React (and routers!)
JavaScript
1
star
82

motion-text-block

Adding motion to text-based blocks in Gutenberg
JavaScript
1
star
83

npm-fix

📦NPM Fix: A quick way to reset npm dependencies in your project
JavaScript
1
star
84

mr-jekyll

Mr. Jekyll: A starter template for Jekyll
JavaScript
1
star
85

vs-plus-plus

Enhanced version of the default VS Code Dark/Light+ themes
1
star
86

helpscout-reports

HTML
1
star
87

youtubeViewCounter

YouTube View Counter
1
star
88

elm

🌳 Collection of handy React Elements
JavaScript
1
star
89

shpee

🕵️‍♀️Shpee: Spying on CSS style changes
JavaScript
1
star
90

depstep

Depstep 👻: A tiny deprecation utility for Javascript
JavaScript
1
star
91

gatsby-starter-g2

A simple Gatsby starter to get up and developing quickly with G2.
JavaScript
1
star
92

sass-maphacks

An Underscore/Lodash-like utility library for Sass maps
CSS
1
star
93

loescore

LOE Score
JavaScript
1
star