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

TGUIv4 - Core backend updates, TGchat, Asset cache updates #23726

Merged
merged 88 commits into from Jan 21, 2024
Merged

Conversation

S34NW
Copy link
Member

@S34NW S34NW commented Jan 5, 2024

What Does This PR Do

Compilation of the TGUIv4 upgrade project so far:
https://github.com/orgs/ParadiseSS13/projects/5/views/1
Key points:

  • Adds TGchat, a modern and seriously improved browser to replace goonchat.
    • Tab support with selectable "sources" of messages.
    • Jukebox feature present but not supported by DM code yet.
    • TGchat and BYOND share light/dark modes, chosen in TGchat settings, they can no longer be separately chosen.
    • Reliability layer implemented, so BYOND can't silently eat messages anymore.
  • Adds support for TS and TSX files.
  • Adds smart asset caching, with CDN support for asset hosting.
  • Updates core TGUI backend, including changes to the TGUI window API.
    • Breaking changes: You can no longer set window x and y values in DM, this must now be done in JS/TS.
    • Window pooling, the first TGUI window you open will open as normal, but will be extremely faster following that.
  • Node requirements bumped to 20 for people who build TGUI, due to updates to backend tooling.
  • Dependencies updated.
  • Support targeted at IE11, this means users with OS' older than Windows 7 Service Pack 1 (not inclusive) will no longer be able to properly play on paradise, as TGUI will be broken for them.

Second part of the project is still outstanding, that will come later and adds:

  • TGUI stat panels
  • TGUI say menu
  • Jukebox support

Why It's Good For The Game

TGUIv3, our current version, was replaced by TGUIv4 a mere two weeks after we ported it in 2020, so it is literally almost 4 years old.
TGUIv4 changes how assets work with TGUI, so you should no longer get blank TGUI screens due to asset corruption.
Goonchat is terrible and old and outdated.

Images of changes

TGUI itself has a massive array of small changes to how it looks, impossible to list them all here

TGchat is a bit easier, this is with the settings menu open.
image

Testing

Many screams to the sky by project members.

Current known outstanding issues from TM:
#23760

Changelog

🆑 S34NW, Aylong, Burza, cdui, DGamerL, Gaxeer, stylemistake, many other TG coders
add: TGchat replaces goonchat
tweak: TGUI windows will now re-open quickly after the first window is opened
fix: Fixed BYOND eating chat messages silently
fix: Fixed TGUI whitescreen issue
/:cl:

S34NW and others added 29 commits December 10, 2023 22:12
* tgui4.0

* bugfix for un-interaction

* fix for input not resetting on close

* NTOS restore

* fix all interfaces having scrollbars, fix colours

* bundle update

* dep bumps

* bumps the deps as much as possible

* button regression fix

* TGUI test map rev 1

* fix theme and some component regression

* fix login screen regression

* fixes regression with uplink cart

* bundle

* fix regressions

* fix the input issue, again

* regression fixes, stylesheet edition, hash restore

* fixes GPS BSOD

* draggable control regression

* dev server dep regression

* byondUI regression fix

* section regression fix

* fix secure storage weirdness

* Fixed mining vendor scrolling

* Arthri review pass 1

* mining vendor double-scroll

* fix for RPD, AirAlarm, and Radio

* arthri review pass 2

* arthri review pass 3

* sanitize var setting, fix colours, delete unused file

* adds CI to branch

* god damn AI making random changes

* I should remember to compile when changes are made

* fixes scrollbar issues

* fix camera console, fix flexGrow for sections

* CI fix

* nanomap fix

* Update code/modules/atmospherics/machinery/airalarm.dm

* restore margin

* style semicolon
* Initial commit

* Transferring the remaining windows to JS

* Resizing part 1

* Resizing part 2

* Some reverts and polish

* Forgot that

* undeployed nuke window size

---------

Co-authored-by: Aylong <alexanderkitsa@gmail.com>
* First state fixes

* Removes "force_open"
* Reduced Logging Changes

* setSharedState early return for non-interactive UI

* TGUI version bump to 4.1

* Fix sending updates for non-interactive UIs

* Scalablue UI Stylesheet Changes

* CSS Tgui Bundle

* JavaScript TGUI Style Changes

* Update tgui/packages/tgui/styles/base.scss

Co-authored-by: Aylong <69762909+Aylong220@users.noreply.github.com>

* Additional changes to Input and Button scalability

* TGUI logging proc update

* Indentation fix for logging proc

* Update code/__HELPERS/_logging.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* Additional log_tgui changes

---------

Co-authored-by: Aylong <69762909+Aylong220@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
…up assets (#23585)

* feat: add smart asset cache, add CDN support for assets, properly group assets

* fix: make tgui actually work

* fix: keeping local name for `tgui.bundle.js` and `tgui.bundle.css` for debug and dev server functioning

* fix: make `fontawesome` assets finally work

* fix: make proper identation for `if`

* fix: add `resolveAsset` to `NanoMap.js`

* refactor: update `claw_game` and `chess` to new asset framework

* refactor/tweak: don't use string concatenation for browser `content` and `head_content`, use list instead. Don't use `common.css` for paper UI, keep local name for stamp image assets, replace hard ref of browser to `atom` (rare case) to `UID`

* refactor: remove redundant debug logs

* refactor: remove space betwee `if` and `(`

* refactor: remove one more redundant log, properly reload UI resources

* rafactor: change names of asset files

* fix: adjust existing UIs to properly use assets

* fix: properly pass args to to `onclose` proc

* Update code/modules/asset_cache/transports/asset_transport.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* Update code/modules/asset_cache/transports/asset_transport.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
* tgchat

* Little cleanup

* Refactor Asset Delivery (Part 2)

* Little tweaks

* fix code styling issues

* fix file name duplications

* Browser window options fix @Gaxeer

* transfer valve fixes

* yarn berry initial

* vsc tasks

* yarn berry working

* node 20

* fix dev server (lol wrong yarn)

* bloody regressions

* fixes that damn scrolltracking bug

* Some tweaks and flexGrow deletions

It still doesn't work as it should, which makes me nervous

* remove unneeded deps

* 514 regression fix

* change stuff to not conflict with other servers

* name it as requested

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
…23677)

* Stack & UI's Refactor

Almost final, polish required

Stack & UI's Refactor (Part 1)

Stack & UI's Refactor (Part 2)

Stack & UI's Refactor (Part 3)

* Prettier

Maybe bad

* ClearChat & some tweaks

* Adds a Chat Reliability Layer tgstation/tgstation#79479

* Fix chat BSOD

tgstation/tgstation#79821

* WebPack 5 (Didn't work)

I hate this shit

* Yarn 3.6.4

* make it all work

* revert snowflake fix

* Stories

* adds TS support

* re-enable test and prettier

* update yarn sdk's

* Fix some box regression

* ping/reply

* Fixes regressions and some things

* Zebra and Fix chat button transfer

+rebuild

* make VSC use the proper local typescript lib

* Popper Tooltips tgstation/tgstation#58980

* Popper Tooltips performancy fixes

* Dropdown v2 tgstation/tgstation#75164

Without Icon.tsx

* BB test map

* run build

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
* Codeword highlighting for TGUIv4

* null safeties

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
…ixes (#23722)

* TGUI 4.3 fixes

Newscaster fix + inline-blocks

* Be gone Box

* Mod Chat -> Mentor Chat

* Some warning filters

* Rebuild

* Delete tgui-common.bundle.js

* please work

* try it like this

* 4.3.1

* 4.3.2

* fix

* i forgot to build

* 4.4.0

* give me more diff details please so I can fix you

* its not binary pls git

* test without svgs

* removes an un-needed SVG file

* inlined SVGs test

* fix code styling

* comment these

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
* Initial commit

* bundle rebuild

* Fixes Radio Sizing

* Updates Radio sizing to fix wrapping issues

* fix dev server

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally label Jan 5, 2024
@SteelSlayer SteelSlayer removed the Merge Conflict This PR is merge conflicted label Jan 14, 2024
Copy link
Contributor

@Sirryan2002 Sirryan2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first few files

code/__DEFINES/misc_defines.dm Outdated Show resolved Hide resolved
code/__HELPERS/type2type.dm Outdated Show resolved Hide resolved
code/__HELPERS/assets.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SSchat.dm Show resolved Hide resolved
code/controllers/subsystem/SSping.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SSping.dm Outdated Show resolved Hide resolved
Copy link
Contributor

@Sirryan2002 Sirryan2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

158/781 files

code/controllers/subsystem/SSticker.dm Show resolved Hide resolved
code/controllers/subsystem/SSticker.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/non_firing/SSassets.dm Outdated Show resolved Hide resolved
code/datums/browser.dm Outdated Show resolved Hide resolved
code/game/machinery/autolathe.dm Show resolved Hide resolved
code/modules/asset_cache/asset_cache_client.dm Outdated Show resolved Hide resolved
code/modules/asset_cache/asset_cache_item.dm Show resolved Hide resolved
code/modules/asset_cache/asset_list.dm Show resolved Hide resolved
code/modules/asset_cache/asset_list.dm Outdated Show resolved Hide resolved
Copy link
Contributor

@Sirryan2002 Sirryan2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

255 / 781 files

code/controllers/subsystem/SStgui.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SStgui.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SStgui.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SStgui.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SStgui.dm Outdated Show resolved Hide resolved
code/modules/asset_cache/transports/webroot_transport.dm Outdated Show resolved Hide resolved
code/modules/atmospherics/machinery/airalarm.dm Outdated Show resolved Hide resolved
icons/obj/chemical.dmi Outdated Show resolved Hide resolved
tgui/.gitignore Show resolved Hide resolved
S34NW and others added 2 commits January 19, 2024 13:47
* Little themes tweaks

* NTOS chat theme

* Update tgui-panel.bundle.js

* Capitalize themes

* Paradise theme v1.0

* Little StationTraitsPanel cleanup

* Update member_content.dmi

* NoCapitalize

* Rebuild

* Delete Paradise.scss

* Create paradise.scss

* Forgot

* Rewritten Security Records Console

For Jesus fucking christ...

* Vending and Wires sizes tweaks

* ThermoMachine

* Syndicate Theme

* Little darker

* Rewritten Medical Records Console

* PDA Nanobank fix

* Syndicate Theme Darker

* Rebuild TGUI

* Wires section grow fix
icons/paradise.png Outdated Show resolved Hide resolved
Copy link
Contributor

@warriorstar-orion warriorstar-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TM speaks for itself, all I can really find are nits, but haven't moved onto the JS yet.

return GLOB.always_state

/datum/controller/subsystem/changelog/ui_interact(mob/user, datum/tgui/ui = null)
ui = SStgui.try_update_ui(user, src, ui)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SStgui.try_update_ui, if(!ui), ui = new, ui.open() dance shows up a lot. While there's some subtle differences between implementations I feel like this could be generalized.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify? You want to roll this behaviour into the base declaration and cut down on the repeated stuff?

code/__HELPERS/assets.dm Outdated Show resolved Hide resolved
code/__HELPERS/iconprocs.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SSchat.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/SSping.dm Outdated Show resolved Hide resolved
code/modules/client/client_procs.dm Outdated Show resolved Hide resolved
code/datums/wires/wires.dm Outdated Show resolved Hide resolved
code/modules/asset_cache/assets/asset_chem_master.dm Outdated Show resolved Hide resolved
S34NW and others added 7 commits January 21, 2024 10:14
* Fixes ERT Manager silenced message function

* Adjusts progress bar on ExosuitFabricator

* Sets Dropdown selected to align left

* Removes the use of self_state select interfaces

* Exosuit Fabricator style adjustments

* fix sextractor UI

* remove empty tochat string

* fix human air alarm interactions

* fix modals

* add F12/IEChooser

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Copy link
Member

@farie82 farie82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably more improvements to be made. But lets get this merged to drop the freeze.

@farie82 farie82 merged commit 22fbd9a into master Jan 21, 2024
11 checks passed
Legendaxe added a commit to ss220club/Paradise-SS220 that referenced this pull request Jan 22, 2024
## Что этот PR делает
Даже не пытайтесь открыть изменённые файлы, это пиздец...

## Почему это хорошо для игры
TGUI 4.4 - ParadiseSS13#23726

## Тестирование
Был тестмерж на оффах
Был тестмерж у нас

## Changelog

:cl: S34NW, Aylong, Burza, cdui, DGamerL, Gaxeer, stylemistake, и другие
TG кодеры
add: TGUI 4.4, TGchat, Умный кэш ассетов, перелопачивание тонны
интерфейсов и куча сумасшедней работы в коллабе с оффами. Теперь все
открытые интерфейсы будут открываться мгновенно (или почти мгновенно
если интерфейс тяжёлый), белое окно должно быть только в том случае,
если вы открываете интерфейс впервые, и то не факт что оно будет.
wip: Мы знаем что хайлайты (подсветка текста) в чате не работают с
кириллицей, к сожалению, быстрого фикса нет, терпим.
/:cl:
@S34NW S34NW deleted the TGUIv4 branch March 5, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Configuration Change This PR changes the game configuration files. Please run via the host. Large PR This PR will lag you if you try to review it Sprites This PR modifies the game sprites Testmerge Requested This PR has a pending testmerge request TGUI Upgrade Project A task from the TGUI upgrade project TGUI This PR modifies TGUI, will conflict
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet