Skip to content

Commit

Permalink
Rock the UI Away - Removes VueUI and adds TGUI (Aurorastation#16509)
Browse files Browse the repository at this point in the history
* tgui the beginning

* binaries and the like

* Bring in the last of it

* Example radio UI

* delete example

* NTOS Main Menu, start on manifest, tgui states

* tasks.json

* gunnery ui pt 1

* okay

* fix everything

* scss update

* oops

* manifest gigablast

* downloader part 1

* download prt 2

* NTOSDownloader final

* mfw committing to_worlds

* gunnery console pt2

* i cooked

* targeting (finished)

* one vueui down

* voting ui almost done

* MY MIND FEELS LIKE AN ARCH ENEMYYYY

* voting ui down

* photocopier

* ntos config + download fixes

* photocopier 2

* refactor define

* NTOS client manager + fixes

* fax machine final (it also uses toner now)

* marching forwards... left behind...

* ntnrc part 1

* canister

* add quotes

* portable pumps pt1 + more backgrounds

* oops

* finish the portable pump

* freezers

so I'll keep on pushing forward... you haven't seen the last of me... oooooooh...

* doors ui pt1

* finish doors UI (forgive me wildkins it's a bit of shitcode)

* vitals monitor, make things use labeled lists, new backgrounds

* mais j'envoyé aucun mayday...

* maglock pt1

* pour ça je me suis perdu...

* infrared

* fix that

* prox sensor pt1

* prox sensor

* signaler (this was actually pretty hard)

* atmos control pt1

* atmos control pt1.1

* atmos pt 2

* fuel injector

* multitool UI

* jammer

* list viewer

* APC

* portgen

* targeting console updates + SMES ui

* new themes, shield generator

* supermatter

* Add ore detector and (shitty) NTNet Relay

* orderterminal pt1

* orderterminal pt2

* smartfridge

* Add (air-)tank GUI update ore detector size

* Adds Transfer Valves

* Add AtmoScrubber

* analyzer pt1

* weapons analyzer pt2

* bodyscanner pt1

* bodyscanner pt2

* fix this shitcode

* seed storage

* appearance changer

* appearance changer final

* sleeper pt1

* sleeper

* gps

* vehicles

* chem dispenser

* lily request

* holopad

* tgui modules pt1

* ppanel

* damage menu

* fixes

* im here too now

* follow menu, search bars

* quikpay

* quikpay fixes

* circuit printer

* ppanel

* ppanel updates

* pai

* turret controls (i want to kill myself)

* tweak

* remove the boardgame

* guntracker

* implant tracker

* penal mechs

come close to me, come close to me

* chem codex

* pai radio

* doorjack

* pai directives

* signaler removal, sensors

* ghost spawner

* spawnpoint

* fixes

* teleporter

* one more to the chopping block

* account database

* remove divider

* scanner, atmos

* latejoin ui pt1

* latejoin

* records pt1

* RECORDS UI DONE

* delete interpreter & records

* CHAT FUCKING CLIENT

* data updates

* fix some things

* final UI, log

* basic nanoui fix

* antag panel

* remove vueui

* atm update

* vending update

* warrants, cameras

* ntmonitor

* time comes for all

* preserve this legacy

* bring that back (oops)

* rcon, ui auto update for computer UIs, remove rcon computers

* alarm monitoring (a bit broke and also todo: add custom alarm monitoring programs to a few consoles)

* A LIKE SUPREME

* a

* power monitor

* lights on

* fuck this code, fuck nanoui modules, and fuck nanoui

* LEAVE IT OH SO FAR BEHIND

* fix alarm monitoring for synths

* I SAW IN YOU WHAT LIFE WAS MISSING

* comms console

* idcard and record updates

* turn the light on

* arcade

* pt2

* news browser

* static

* crusher

* f

* COULD I JUST SLEIGH THE GOLD FROM THE BALLS? I'M SO FRUSTRATED OH COULD YOU TELL? IF I HEAR ONE MORE VUEUI OR ONE NANOUI I'M GONNA LOSE IT SO LET ME GOOOOOOOOOOOOOOOOO

* codeowners & suit sensors

* html ui style removal

* make lint happy

* resist and disorder

* i slowly get up and turn off the noise, already fed up...

* pleaseeeeeeeeeeeeeee

* THE CREDIT LARP IS NECESSARY

* i hold the keys

* RISE UP

* fix that?

* harry's suggestions xoxo

* runtime fix pt2

* You are the only thing that I still care about

* adds build workflow

* Update update_tgui.yml

* adds some needed steps

* ATM

* misc fixes and tweaks

* fixes 2

* make newscasters usable and fix use power on freezers

* turret control is clearer

---------

Co-authored-by: John Wildkins <john.wildkins@gmail.com>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
Co-authored-by: Werner <Arrow768@users.noreply.github.com>
Co-authored-by: Geeves <ggrobler447@gmail.com>
Co-authored-by: harryob <me@harryob.live>
  • Loading branch information
7 people authored Jun 25, 2023
1 parent 4ce7ba1 commit 31956c7
Show file tree
Hide file tree
Showing 1,119 changed files with 81,793 additions and 44,844 deletions.
38 changes: 0 additions & 38 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,6 @@ steps:
image: aurorastation/dm-buildimage:latest
commands:
- /opt/dreamchecker
- name: "Restore NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
restore: true
- name: "Vue - Lint and Compile"
image: node:10-buster
commands:
- cd vueui
- npm install
- (npm run lint | tee lint.log)
- grep "No lint errors found!" lint.log
- npm run build
- name: "Rebuild NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
rebuild: true
---
kind: pipeline
type: docker
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
/code/__defines/organs.dm @NonQueueingMatt
/code/modules/organs/ @NonQueueingMatt

# VueUI, it would be @Karolis2011 but no repo write access
/code/modules/vueui/ @NonQueueingMatt
/vueui/ @NonQueueingMatt
/code/__defines/vueui.dm @NonQueueingMatt
# UIs. Wildkins or Matt.
/tgui/ @JohnWildkins
code/__defines/tgui.dm @JohnWildkins
code/modules/tgui @JohnWildkins

# Tools, often binary in nature, let arrow and alb know
/tools/ @Arrow768 @Alberyk
Expand Down
12 changes: 2 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,12 @@ All tables for the database should be prefixed according to the following list:
# HTML UI Standards

### UI conversion policy
Due to our current situation with 5 different HTML UI systems we are now enforcing a policy that all new UIs should be made using the VueUi UI system. This policy also applies to editing existing UIs, with the following exceptions:
Due to our current situation with 5 different HTML UI systems we are now enforcing a policy that all new UIs should be made using the TGUI system. This policy also applies to editing existing UIs, with the following exceptions:

1. Modification is security / severe bug fix.
0. It is typo fix.
0. Touched UI file is too large.
0. VueUi can't accommodate that type of UI.
0. TGUI can't accommodate that type of UI.

### Responsiveness
All new UIs must be responsive, that means that when parameters change in game world, UI data must update as quickly as possible to reflect that change. If change is time dependant, then client side time approximation should be used.

### Conditional usage policy
If you need to use conditional rendering inside UI, then try to put conditional statements on elements you want to hide, then try using `<template>` to apply condition to multiple components.

For conditional rendering try to prefer to use `v-show` attribute when change is expected to be often occurring. Use `v-if` when you need `v-else` and switch is expected expected not often.

### Reusability
If there is segment of UI that is used multiple times with different content, then we strongly encourage making of new component. If that component is general or may be reused globally, then it should be made in to global component (placed in `vui` folder), else it should be made in to UI specific component that must be placed in folder inside `view` folder.
40 changes: 40 additions & 0 deletions .github/workflows/update_tgui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Build TGUI"
on:
push:
branches:
- master
paths:
- tgui/**

jobs:
update-tgui:
concurrency: tgui
runs-on: ubuntu-22.04
steps:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update TGUI
run: |
chmod +x tools/bootstrap/node
tools/bootstrap/node tools/build/build.js tgui
- name: Commit
run: |
git pull origin master
git config --local user.email "action@github.com"
git config --local user.name "AuroraBuildBot"
git add --force tgui/public/*
git commit -m "Automatic TGUI compile [ci skip]" -a || true
- name: "Push"
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA || secrets.GITHUB_TOKEN }}
51 changes: 0 additions & 51 deletions .github/workflows/vueui.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# We don't want prettier to run on anything outside of the TGUI folder, so we have to do this.
/*

# We want it to run into the TGUI folder, however.
!/tgui
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
- $HOME/flyway-${FLYWAY_BUILD}
- vueui/dist
- $HOME/rust_g-${RUST_G_VERSION}

addons:
Expand Down Expand Up @@ -72,8 +71,6 @@ jobs:
- pip install --user -r ./tools/requirements.txt
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
- chmod +x ./vueui/install
- ./vueui/install
- chmod +x ./scripts/install-spaceman-dmm.sh
- ./scripts/install-spaceman-dmm.sh dreamchecker
- chmod +x ./scripts/rust_g.sh
Expand All @@ -84,9 +81,6 @@ jobs:
- (! grep -E "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm)
- (! grep -r --include=\*.dm '#define UIDEBUG' ./)
- (! grep -r --include=\*.dm 'to_chat(.*,\s*link(' ./)
- (cd vueui && (npm run lint | tee lint.log))
- grep "No lint errors found!" vueui/lint.log
- (cd vueui && npm run build)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -eq ${MACRO_COUNT} ])
- (num=`grep -EIr '\\\\(he|him|his|she|hers|He|His|She|himself|herself)\b' code | wc -l`; echo "$num gender-based escapes (expecting ${GENDER_COUNT} or less)"; [ $num -eq ${GENDER_COUNT} ])
- (num=`grep -r --include \*.dm -oh to_world\( . | wc -w`; echo "$num to_worlds (expecting ${TO_WORLD_COUNT})"; [ $num -eq ${TO_WORLD_COUNT} ])
Expand Down
4 changes: 4 additions & 0 deletions .versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ export BYOND_MINOR=1589
export RUST_G_VERSION=v1.2.0+a4
export FLYWAY_BUILD=9.9.0
export SPACEMAN_DMM_VERSION=suite-1.7.3

#node version
export NODE_VERSION=14
export NODE_VERSION_PRECISE=14.16.1
24 changes: 15 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "byond",
"request": "launch",
"name": "Launch DreamSeeker",
"preLaunchTask": "dm: build - ${command:CurrentDME}",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
}
]
"configurations": [
{
"type": "byond",
"request": "launch",
"name": "Launch with build",
"preLaunchTask": "dm: build - aurorastation.dme",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
},
{
"type": "byond",
"request": "launch",
"name": "Launch WITHOUT BUILD",
"dmb": "${workspaceFolder}/${command:CurrentDMB}",
}
]
}
42 changes: 42 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"eslint.nodePath": "./tgui/.yarn/sdks",
"eslint.workingDirectories": ["./tgui"],
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js",
"typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"gitlens.advanced.blame.customArguments": ["-w"],
"[javascript]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[scss]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
69 changes: 67 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,71 @@
"dependsOn": [
"dreamchecker"
]
}
]
},
{
"type": "shell",
"command": "bin/tgui-build",
"windows": {
"command": ".\\bin\\tgui-build.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: build"
},
{
"type": "shell",
"command": "bin/tgui-dev",
"windows": {
"command": ".\\bin\\tgui-dev.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: dev server"
},
{
"type": "shell",
"command": "bin/tgui-bench",
"windows": {
"command": ".\\bin\\tgui-bench.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: bench"
},
{
"type": "shell",
"command": "bin/tgui-sonar",
"windows": {
"command": ".\\bin\\tgui-sonar.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: sonar"
},
{
"type": "shell",
"command": "bin/tgfont",
"windows": {
"command": ".\\bin\\tgfont.cmd"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: rebuild tgfont"
}
]
}
7 changes: 7 additions & 0 deletions SQL/migrate/V080__tgui.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--
-- Adds tgui prefs
--

ALTER TABLE `ss13_player_preferences` ADD COLUMN `tgui_fancy` INT(1) NOT NULL DEFAULT 1 AFTER `html_UI_style`;
ALTER TABLE `ss13_player_preferences` ADD COLUMN `tgui_lock` INT(1) NOT NULL DEFAULT 0 AFTER `tgui_fancy`;
ALTER TABLE `ss13_player_preferences` DROP COLUMN `html_UI_style`;
Loading

0 comments on commit 31956c7

Please sign in to comment.