Skip to content

Commit

Permalink
feat(ui): first dashboard view (#189)
Browse files Browse the repository at this point in the history
* feat(ui): init ui

* feat(ui): add lock file

* feat(ui): clean project

* feat(ui): add basic packages

* feat(ui): add font and colors

* feat(ui): add button component

* fix(ui): fix button component

* feat(ui): add arrow icons

* feat(ui): add tag component

* refactor(assets): move svg components to assets folder

* feat(ui): add tailwind-merge package

* feat(ui): increase scalability of existing components

* feat(ui): add social buttons

* refactor(ui): remove useless twmerge functions

* feat(ui): add new icons

* feat(ui): add navigation button component

* feat(ui): allow absolute import

* refactor(ui): clean folder structure

* refactor(ui): remove relative import

* feat(ui): add missing default color

* feat(ui): change order of variant prop

* feat(ui): add input component v1

* feat(ui): improve disabled input

* style(ui): add TODO comments

* feat(ui): export components interfaces

* fix(ui): add missing font weights

* refactor(ui): add default viewbox on SVGs

* feat(ui): add theme shadows

* feat(ui): add card component v1

* feat(ui): completing card component

* refactor(ui): improve button component

* refactor(ui): regroup classes in a single dictionnary

* feat(ui): add toggle component

* feat(ui): add new icons

* feat(ui): add icons to input component

* fix(ui): fix layout issues with input

* fix(ui): fix outline issues with input

* fix(ui): fix bugged toggle SVGs

* feat(ui): add theme backgrounds

* feat(ui): add new assets

* feat(ui): add basic navbar

* feat(ui): add profile picture component

* feat(ui): improve navbar

* fix(ui): fix some components layouts

* feat(ui): add defaultChecked props on toggle

* feat(ui): add layers page v1

* feat(ui): make layers page scrollable

* fix(ui): fix stuck chili on layers page

* feat(ui): increase card width

* fix(ui): change filters separator

* feat(ui): add basic dropdown component

* feat(ui): add box component

* feat(ui): add dropdown children logic

* feat(ui): add basic checkbox component

* feat(ui): add focus on checkbox

* refactor(ui): remove ugly code

* feat(ui): add missing tabindex

* feat(ui): add state dropdown children

* feat(ui): add repository dropdown children

* refactor(ui): move layers page in a folder

* fix(ui): fix blur on dropdown

* feat(ui): add support for escape on dropdown

* feat(ui): add support for escape on input

* fix(ui): fix missing support for escape on dropdown

* fix(ui): fix issues with keyboard on dropdown

* chore(ui): minor packages uprade

* feat(ui): add tanstack-table

* refactor(ui): make layers type shared

* feat(ui): add basic table component

* feat(ui): add hover on table

* feat(ui): add basic running and chili on table component

* refactor(ui): rename variable in table helper function

* feat(ui): add running icon on table

* fix(ui): change dark running outline on card

* refactor(ui): use shared type between cards and table

* fix(ui): fix some border issues on table

* feat(ui): add table to layers page

* fix(ui): fix responsive issue on table

* chore(ui): add comment on table

* feat(ui): add table separator

* chore(ui): clean whitespace on table

* feat(ui): add theme provider and context

* feat(ui): add dark mode support for layers page components

* feat(ui): add theme consumer to layers page

* feat(ui): add theme toggle component

* feat(ui): add system based initial value for theme

* fix(ui): fix scrolling issue with absolute element

* fix(ui): update dark shadow

* chore(ui): format tw strings

* fix(ui): fix conflicts between svg

* feat(ui): add filter by isPR state

* feat(ui): add focus on button

* feat(ui): add selected props on navigation button

* fix(ui): fix wrong focus css on buttons

* feat(ui): add state filter logic

* feat(ui): add repository filter logic

* feat(ui): connect state filter logic

* feat(ui): connect repository filter logic

* feat(ui): add search bar logic in repository filter

* feat(ui): add dynamic layers count

* feat(ui): add dockerfile

* chore(ui): comment unused stuff to build

* feat(ui): add layers search bar logic

* refactor(ui): use truncate tw class

* fix(ui): fix color bug in filters dropdown

* fix(ui): missing theme variant for chili asset

* fix(ui): prevent checkbox from shrinking

* feat(ui): add axios package

* feat(ui): add env file

* feat(ui): configure react-query

* feat(ui): add repositories client

* feat(ui): fetch repositories from API

* feat(ui): add layers client

* refactor(ui): migrate shared types in clients

* fix(ui): change wrong type for layer repository

* feat(ui): fetch layers from API

* feat(ui): add filters on fetched layers

* fix(ui): fix height of running panel in table

* feat(ui): animate sync icon

* feat(ui): add logic to refresh button

* feat(ui): add router

* fix(ui): fix default page

* fix(ui): add navlink in navbar

* feat(ui): add temporary pulls page

* fix(ui): new fix height of running panel in table

* fix(ui): add missing onclick social buttton

* feat(ui): add login page v1

* feat(ui): add isPR info on card

* fix(ui): invert color active button navbar

* refactor(ui): change PR toggle behaviour

* feat(ui): add isPR info on table

* feat(ui): add className props to social button

* feat(ui): improve login page and add dark version

* feat(ui): add background for login page

* refactor(ui): update login cover

* feat(ui): add cover on login page

* chore(ui): minor packages uprade

* refactor(ui): clean dockerfile

* feat(ui): add react-tooltip package

* feat(ui): add tooltip on card

* feat(ui): add tooltip on table

* feat(ui): add dark theme tooltip

* fix(ui): disable opacity on tooltip

* feat(ui): add favicon and manifests

* refactor(ui): remove some tooltips

* feat(ui): shorten table separators

---------

Co-authored-by: Marc-Antoine Godde <marcantoineg@padok.fr>
  • Loading branch information
Alan-pad and marcantoinegodde authored Nov 9, 2023
1 parent 511b84a commit 11b897c
Show file tree
Hide file tree
Showing 82 changed files with 5,667 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist/
node_modules/
.env
.env.template
.gitignore
Dockerfile
1 change: 1 addition & 0 deletions ui/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL="http://localhost:8000/api"
18 changes: 18 additions & 0 deletions ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
25 changes: 25 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
16 changes: 16 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:18 AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
ARG VITE_API_BASE_URL
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
RUN yarn build

FROM nginx:stable-alpine
WORKDIR /usr/share/nginx/html
COPY default.conf /etc/nginx/conf.d/default.conf
RUN rm -rf ./*
COPY --from=build /app/dist .
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
27 changes: 27 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
9 changes: 9 additions & 0 deletions ui/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
16 changes: 16 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Burrito</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
37 changes: 37 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "burrito-ui",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-table": "^8.10.7",
"axios": "^1.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.16.0",
"react-tooltip": "^5.21.6",
"tailwind-merge": "^1.14.0"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.16",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.3",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
6 changes: 6 additions & 0 deletions ui/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file added ui/public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/public/favicon.ico
Binary file not shown.
Loading

0 comments on commit 11b897c

Please sign in to comment.