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

Upgrade documentation and examples #120

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
2efbd50
Migrate to latest Storybook version
aaronzshey Jul 26, 2024
f8f26ac
Merge pull request #3 from aaronzshey/dev
aaronzshey Jul 26, 2024
47b3aa8
Update README.md
aaronzshey Jul 26, 2024
31e8dda
Update README.md
aaronzshey Jul 26, 2024
cd864c8
Update README.md
aaronzshey Jul 26, 2024
9951733
Upgrade jest libraries, remove babel deps (migrated to SWC)
aaronzshey Jul 26, 2024
7bacab8
Merge pull request #5 from aaronzshey/dev
aaronzshey Jul 26, 2024
119e7d5
bump react-use and remove fs-events dep
aaronzshey Jul 26, 2024
c89c655
Merge pull request #6 from aaronzshey/dev
aaronzshey Jul 26, 2024
82f8f60
Updating stories
aaronzshey Jul 27, 2024
27861c0
Merge pull request #9 from aaronzshey/dev
aaronzshey Jul 27, 2024
27330c1
Update README.md
aaronzshey Jul 27, 2024
a1a6ff6
disable stories, update chromatic config
aaronzshey Jul 27, 2024
a6e78d5
update template story:
aaronzshey Jul 28, 2024
f9a9782
way of life is broken
aaronzshey Jul 28, 2024
06063f7
update gitignore
aaronzshey Jul 28, 2024
b7ed763
bump github actions yml
aaronzshey Jul 28, 2024
9f564d6
leaked chromatic token
aaronzshey Jul 31, 2024
a230aaa
Merge pull request #13 from aaronzshey/dev
aaronzshey Jul 31, 2024
699c1da
Update package.json
aaronzshey Jul 31, 2024
dd7e21c
upgrade ci
aaronzshey Aug 1, 2024
18733fc
fix path
aaronzshey Aug 1, 2024
a59c2f9
Merge pull request #14 from aaronzshey/dev
aaronzshey Aug 1, 2024
bf539df
Added ring test and sort function
aaronzshey Aug 1, 2024
bc00b80
upgrade tests
aaronzshey Aug 2, 2024
9fc7f01
satisfy codefactor
aaronzshey Aug 2, 2024
371d50d
Merge pull request #15 from aaronzshey/dev
aaronzshey Aug 2, 2024
bbcd8b9
migrate from react-test-renderer to @testing-library/react
aaronzshey Aug 2, 2024
bb3c6e9
update tests
aaronzshey Aug 2, 2024
a830956
Merge pull request #17 from aaronzshey/dev
aaronzshey Aug 3, 2024
0fe77c2
Update README
aaronzshey Aug 3, 2024
ffd0e4c
Update README.md
aaronzshey Aug 3, 2024
1ac6448
Merge pull request #19 from aaronzshey/dev
aaronzshey Aug 3, 2024
d9dbd11
fixed way of life story
aaronzshey Aug 3, 2024
0ba77ca
satisfy codefactor
aaronzshey Aug 3, 2024
d199bfe
?
aaronzshey Aug 3, 2024
0f1368e
cleaning up
aaronzshey Aug 3, 2024
10c8940
revert fillId comment, update ui tests
aaronzshey Aug 3, 2024
ca93b81
satisfy jest warning
aaronzshey Aug 3, 2024
c5027e6
update jest snapshots
aaronzshey Aug 3, 2024
ea20761
Merge pull request #21 from aaronzshey/dev
aaronzshey Aug 3, 2024
2ce2c61
worked a little on custom-grid
aaronzshey Aug 3, 2024
6420938
remove basic-grid css in favor of react props
aaronzshey Aug 3, 2024
6280ea2
pattern isn't working, thinking about refactor
aaronzshey Aug 3, 2024
1d03e94
making progress
aaronzshey Aug 4, 2024
460060e
updated custom-grid story
aaronzshey Aug 4, 2024
09c809c
fixed the mysterious error
aaronzshey Aug 4, 2024
5567016
delete prettierrc and satisfy codefactor
aaronzshey Aug 4, 2024
2b1cead
Merge pull request #26 from aaronzshey/dev
aaronzshey Aug 4, 2024
051e5cd
fixed pattern-swap story
aaronzshey Aug 4, 2024
30e17dc
Merge pull request #27 from aaronzshey/dev
aaronzshey Aug 4, 2024
9fcc238
update package.json
aaronzshey Aug 4, 2024
9f725c9
Merge branch 'dev' of github.com:aaronzshey/react-hexgrid into dev
aaronzshey Aug 4, 2024
11d6fd4
Merge pull request #28 from aaronzshey/dev
aaronzshey Aug 4, 2024
436f9e0
update coordinates story
aaronzshey Aug 4, 2024
33244b5
Merge pull request #29 from aaronzshey/dev
aaronzshey Aug 4, 2024
5617f2e
Update package.json
aaronzshey Aug 9, 2024
27115d6
Merge pull request #32 from aaronzshey/ts-patch
aaronzshey Aug 9, 2024
7fff680
working on fixing examples
aaronzshey Aug 9, 2024
80c23bd
Merge branch 'dev' of github.com:aaronzshey/react-hexgrid into dev
aaronzshey Aug 9, 2024
35d3c35
Merge pull request #33 from aaronzshey/dev
aaronzshey Aug 9, 2024
e83f35a
???
aaronzshey Aug 9, 2024
405978c
Merge pull request #34 from aaronzshey/dev
aaronzshey Aug 9, 2024
a3eaad2
updated one example
aaronzshey Aug 10, 2024
4bbab36
disabled way of life
aaronzshey Aug 10, 2024
a976e07
not motivated at all
aaronzshey Aug 11, 2024
4b66d28
confused
aaronzshey Aug 11, 2024
49035aa
confused
aaronzshey Aug 11, 2024
0bff83e
update
aaronzshey Aug 11, 2024
e33e0b1
worked more on docs
aaronzshey Aug 12, 2024
c8eafa3
fixed example
aaronzshey Aug 13, 2024
176fbbc
some updates
aaronzshey Aug 14, 2024
41b2840
worked on docs
aaronzshey Aug 17, 2024
07ef66f
added a lot of stories
aaronzshey Aug 29, 2024
035dafd
added more stories
aaronzshey Sep 3, 2024
d1b022d
bump
aaronzshey Sep 18, 2024
4e3e2b0
fixed drag and drop
aaronzshey Sep 23, 2024
e283dc0
after much bloodshed, drag and drop is done
aaronzshey Oct 3, 2024
d914fcd
wrapping up docs for now
aaronzshey Oct 9, 2024
b901a5e
disabling path story for now
aaronzshey Oct 9, 2024
99de620
no layout works!
aaronzshey Oct 9, 2024
f2d40a5
finally no layout!
aaronzshey Oct 9, 2024
71f12ca
Merge pull request #41 from aaronzshey/dev
aaronzshey Oct 9, 2024
f1f26e2
Delete .github/workflows/node.js.yml
aaronzshey Oct 9, 2024
c49c5d3
Merge pull request #42 from aaronzshey/dev
aaronzshey Oct 9, 2024
93bc1af
first test build!
aaronzshey Oct 9, 2024
d3c8ce1
first test build!
aaronzshey Oct 9, 2024
cd34ee2
index.d.ts was in the wrong place
aaronzshey Oct 9, 2024
6296e17
needed to add types field
aaronzshey Oct 9, 2024
8d7a27a
fixed type field in package.json
aaronzshey Oct 9, 2024
4505b61
refreshed typescript build
aaronzshey Oct 9, 2024
492069f
Update package.json
aaronzshey Oct 9, 2024
56e15e4
Update package.json
aaronzshey Oct 9, 2024
97189e6
fix error to generate d.ts files
aaronzshey Oct 9, 2024
b551d9e
re enable classnames
aaronzshey Oct 10, 2024
76e8ca4
forgot to build
aaronzshey Oct 10, 2024
56cede7
enable radius param
aaronzshey Oct 10, 2024
8021f58
added hero images
aaronzshey Oct 16, 2024
bab2cf7
added hero image and made it work
aaronzshey Oct 17, 2024
ff0cb88
hero image complete
aaronzshey Oct 26, 2024
85b47f5
resolve storybook build error
aaronzshey Oct 26, 2024
f50218c
configure action to install modules for hero
aaronzshey Oct 26, 2024
5fed457
update styling
aaronzshey Nov 2, 2024
73faa35
update styling for docs
aaronzshey Nov 2, 2024
2396f59
Merge pull request #50 from aaronzshey/dev
aaronzshey Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .github/workflows/chromatic.yml

# Workflow name
name: "Chromatic Publish"

# Event for the workflow
on: push

# List of jobs
jobs:
test:
name: Publish Storybook to Chromatic
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- run: npm ci
- run: cd docs/Hero && npm ci
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken,
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ coverage/
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules/

# Babel compiled sources
lib/
# lib/

# UMD distribution
dist/
Expand All @@ -39,3 +36,8 @@ dist/
nbproject
.idea
.node_history

# storybook files
storybook-static

node_modules
10 changes: 0 additions & 10 deletions .prettierrc.json

This file was deleted.

Binary file added .storybook/SauceCodeProNerdFontMono-Black.ttf
Binary file not shown.
73 changes: 73 additions & 0 deletions .storybook/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[draggable] {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
-moz-user-drag: element;
-webkit-user-drag: element;
-khtml-user-drag: element;
user-drag: element;
}

@font-face {
font-family: 'SauceCodePro Nerd Font';
src: local("./SauceCodeProNerdFontMono-Black.ttf");
format: ('truetype');
}

* {
font-family: "SauceCodePro Nerd Font", serif;
}

svg g.tutorial {
stroke: black;
stroke-width: 0.01em;
fill: transparent;
}

svg g.h:hover {
fill: #61dbfb;
transition: fill .1s;
}

svg g:hover text {
fill-opacity: 1;
transition: fill .1s;
}

svg g.q .hexagon {
fill: #61fbf5;
transition: fill .1s;
}

svg g.r .hexagon {
fill: #fb618e;
transition: fill .1s;
}

svg g.s .hexagon {
fill: #fbce61;
transition: fill .1s;
}

svg g.active .hexagon {
fill: #61dbfb;
transition: fill .1s;
}


svg g text {
font-size: 0.17em;
fill: white;
fill-opacity: 0.7;
transition: fill-opacity .1s;
}

svg path {
stroke: #fb61db;
stroke-width: 0.2em;
stroke-opacity: 0.9;
stroke-linecap: round;
stroke-linejoin: round;
transition: .1s;
}
23 changes: 0 additions & 23 deletions .storybook/main.js

This file was deleted.

34 changes: 34 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: [
"../docs/GettingStarted/1. Introduction.mdx",
"../docs/GettingStarted/2. YourFirstApp.mdx",
"../docs/GettingStarted/3. UsingGenerators.mdx",
"../docs/GettingStarted/4. UsingLayout.mdx",
"../docs/GettingStarted/5. UsingPattern.mdx",
"../docs/GettingStarted/6. UsingPath.mdx",
"../docs/GettingStarted/7. UsingEvents.mdx",
//"../docs/AdvancedExamples/1. DraggingAndDropping.mdx",
"../docs/AdvancedExamples/1. UsingHooks.mdx",
"../src/**/*.stories.tsx",
"../docs/Hero/Hero.stories.tsx",
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-webpack5-compiler-swc",
"@chromatic-com/storybook",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
typescript: {
reactDocgen: "react-docgen-typescript",
},
};
export default config;


9 changes: 0 additions & 9 deletions .storybook/preview.js

This file was deleted.

14 changes: 14 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Preview } from "@storybook/react";

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

![Downloads](https://img.shields.io/npm/dt/react-hexgrid.svg)
![npm version](https://img.shields.io/npm/v/react-hexgrid.svg)
![dependencies Status](https://img.shields.io/librariesio/github/hellenic/react-hexgrid)
[![Live demo](https://img.shields.io/badge/live-demo-brightgreen.svg?style=flat-square)](https://hellenic.github.io/react-hexgrid/examples/)
![Dependencies Status](https://img.shields.io/librariesio/github/hellenic/react-hexgrid)
[![Live demo](https://img.shields.io/badge/live-demo-brightgreen.svg)](https://hellenic.github.io/react-hexgrid/examples/)
![License](https://img.shields.io/npm/l/react-hexgrid.svg)
[![CodeFactor](https://www.codefactor.io/repository/github/aaronzshey/react-hexgrid/badge)](https://www.codefactor.io/repository/github/aaronzshey/react-hexgrid)
[![Jest Status](https://img.shields.io/github/actions/workflow/status/aaronzshey/react-hexgrid/node.js.yml?style=flat&logo=jest&label=%20&labelColor=%2398435c)](https://github.com/aaronzshey/react-hexgrid/actions/workflows/node.js.yml)[![Chromatic UI Tests Status](https://img.shields.io/github/actions/workflow/status/aaronzshey/react-hexgrid/chromatic.yml?style=flat&logo=chromatic&label=%20&labelColor=white)](https://github.com/aaronzshey/react-hexgrid/actions/workflows/chromatic.yml)

[![Storybook Permalink](https://raw.githubusercontent.com/storybookjs/brand/master/badge/badge-storybook.svg)](https://main--66a5393443e58f4dc4f0ca6b.chromatic.com/?path=/story/pathfinding--default)

React components to build interactive hexagon grids. This library uses SVG and allows you to create fully customizable and scalable interactive hexagon grids with a simple api.

Expand Down
7 changes: 0 additions & 7 deletions babel.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"onlyChanged": true,
"projectId": "Project:66a5393443e58f4dc4f0ca6b",
"zip": true
}
9 changes: 9 additions & 0 deletions docs/APIDocumentation/Hexagon.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {ArgTypes, Meta} from '@storybook/blocks';

import * as HexagonComponentStory from '../../src/Hexagon/Hexagon.stories.tsx';

<Meta title="API Documentation/Hexagon"/>

# Hexagon

<ArgTypes of={HexagonComponentStory.Primary}/>
Empty file added docs/APIDocumentation/Types.mdx
Empty file.
Loading