Skip to content

Commit

Permalink
Open source Share UI 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed May 3, 2024
0 parents commit 47a02e5
Show file tree
Hide file tree
Showing 170 changed files with 43,266 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Problem

Describe the problem this PR intend to solve

## Solution

Describe the solution this PR takes to solve the problem and any alternative approach considered

## Caveats/Notes

Issues that address things you didn't get to or general notes
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run ui-core-install
- run: npm run ui-core-check-css
- run: npm run build
- run: npm test
- run: npm run review
- run: npx prettier --check .
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
elm-stuff
.DS_Store
public/bundle.js
node_modules
dist
.unisonHistory

# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

# Local Netlify folder
.netlify
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
elm-stuff
public/bundle.js
node_modules
dist
.unison
.netlify
# apparently prettier adds a newline to all files and this clashes with
# autogenerated Elm JSON files:
# https://github.com/prettier/prettier/issues/6360
elm-git.json
elm.json
review/suppressed/*.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2022-2024, Unison Computing, public benefit corp and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Unison Share UI

[![CI](https://github.com/unisoncomputing/unison-share-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/unisoncomputing/unison-share-ui/actions/workflows/ci.yml)

## Running Development Server

Prerequisites: `node v20` or higher.

1. Start [`Share API`](https://github.com/unisoncomputing/share-api)
2. Make sure the latest dependencies are installed with by running `npm
install`.
3. Start the dev server with: `API_URL="<SHARE API URL>" npm start`

Note that Share API hosts on `http://localhost:5424` be default, so its
likely what you'll run with, but you can always see the URL when starting
Share API.

4. Visit `http://localhost:1234` in a browser.

## Dependencies

This depends on the [ui-core package](https://github.com/unisonweb/ui-core) via
[elm-git-install](https://github.com/robinheghan/elm-git-install). That package
includes both the Unison design system, and a core set of components for
working with and rendering Unison definitions and
namespaces.

## Bumping [ui-core package](https://github.com/unisonweb/ui-core)

The UI Core dependency can be updated to its latest version with this command:

```bash
npm run ui-core-update
```

To install a specific sha:

```bash
npm run ui-core-install -- [SOME_UI_CORE_SHA]
```
8 changes: 8 additions & 0 deletions elm-git.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"git-dependencies": {
"direct": {
"https://github.com/unisonweb/ui-core": "45d0fd3e7c78c45d9713959a4a4b1e5e0b8f8e24"
},
"indirect": {}
}
}
55 changes: 55 additions & 0 deletions elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"type": "application",
"source-directories": [
"elm-stuff/gitdeps/github.com/unisonweb/ui-core/src",
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"NoRedInk/elm-json-decode-pipeline": "1.0.1",
"NoRedInk/elm-simple-fuzzy": "1.0.3",
"avh4/elm-color": "1.0.0",
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/parser": "1.1.0",
"elm/regex": "1.0.0",
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.3",
"elm-community/html-extra": "3.4.0",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.7.0",
"elm-community/list-split": "1.0.3",
"elm-community/maybe-extra": "5.3.0",
"elm-community/string-extra": "4.0.1",
"elm-explorations/markdown": "1.0.0",
"j-maas/elm-ordered-containers": "1.0.0",
"justinmimbs/time-extra": "1.1.1",
"krisajenkins/remotedata": "6.0.1",
"mgold/elm-nonempty-list": "4.2.0",
"noahzgordon/elm-color-extra": "1.0.2",
"rtfeldman/elm-iso8601-date-strings": "1.1.4",
"ryan-haskell/date-format": "1.0.0",
"stoeffel/set-extra": "1.2.3",
"wernerdegroot/listzipper": "4.0.0"
},
"indirect": {
"elm/bytes": "1.0.8",
"elm/file": "1.0.5",
"elm/random": "1.0.0",
"fredcy/elm-parseint": "2.0.1",
"justinmimbs/date": "4.0.1"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "2.1.1"
},
"indirect": {}
}
}
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Loading

0 comments on commit 47a02e5

Please sign in to comment.