Commit Graph

9 Commits

Author SHA1 Message Date
AnturK
7fef33c459 Adds easy to extend custom svg font. (#57717)
Just throw in svgs into tgui/packages/tgfont/icons directory and you can use them in tgui with tg- prefix.

Co-authored-by: Style Mistake <stylemistake@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-18 15:20:59 +02:00
Aleksej Komarov
d9836946d7 Revert "Flush queue in preloading part of tgui_panel" - Part 2 (#57665) 2021-03-12 10:58:49 +02:00
tralezab
f23c5ec806 Revert "Flush queue in preloading part of tgui_panel" (#57649)
* Revert "Flush queue in preloading part of tgui_panel (#57432)"

This reverts commit 47c9f38e48.

* Update tgui_panel.dm

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-03-12 10:47:01 +02:00
Aleksej Komarov
47c9f38e48 Flush queue in preloading part of tgui_panel (#57432)
* Flush queue in preloading part of tgui_panel

* Update tgui_panel.dm

* Compiles
2021-03-04 21:25:54 +01:00
Aleksej Komarov
21d5a65346 Fix a number of build issues (#57251)
* Fix finding of dreamseeker instances and not die on cache copy failures

* Upgrade dependencies, resolve webpack dependencies explicitly

* Preload tgui asset to fix reloading of a not yet sent tgui asset

* Rewrite node bootstrap and DM build task

* Redundant array accessor

* Add install-state.gz to tgui build dependencies

* Update build.js

* Use a proper dmlang vscode var
2021-02-28 14:24:34 +01:00
Aleksej Komarov
a6e60e47e7 tgui 4.3 (#56080) 2021-01-16 19:54:31 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Rob Bailey
7446e460f1 fix fix chat (#54517)
Makes fix chat more robust as well as giving a more visible method to fix it.

Stand in while I investigate methods to hopefully make this unneeded.
2020-10-23 08:50:04 +03:00
Aleksej Komarov
0e1b20e6db tgchat (#52426)
Replaces goonchat with a tgui based chat panel

    Fixes #52898
    Fixes #52663

It is as fast as goonchat was (if not faster in certain circumstances), and is very extensible. It has all the necessary code for sorting messages into categories, which means that one of the next features will be multiple tab support.

Additional features that you will get with tgchat right now:
    Massively faster server-side performance compared to goonchat, especially if batching multiple messages to one client.
    Message persistence across rounds and reconnects. (All messages are stored client-side in IndexedDB)
    More robust scroll tracking. If you scroll up, it will not change the scroll position on new messages like goonchat did.
    Multiple message combining. (Currently set to combine up to 5 messages over last 5 seconds).
    If using the highlighting feature, it highlights the whole message as well as the matching word.
    "Now playing" widget, with preview of the song title, a knob for adjusting the volume and a stop button.

Architecture is as following:
```
to_chat() -+
           |
        SSchat
   (queue, batching)
           |
  window.send_message()
           |
           v
+-------------+
| tgui-panel  |
|+-----------+|
|| tgchat    ||
|+-----------+|
+-------------+
```

Subsystem is basically goonchat, but without all the garbage that slows the servers down (string concatenation, double urlencoding, sanitizing, etc). Now, instead of all that, it's being slowed down by json_encode in /datum/tgui_window/proc/send_message, which IMO is completely worth it, and allows sending various templates and widgets to tgchat.

/datum/tgui_window abstracts the whole window away from you, establishes a nice message-passing interface between DM and JS, with two message queues on each side, automatically loads js/css assets for you, basically does everything. You as a developer only have to worry about sending/receiving messages and write javascript.

tgui-panel is a slimmed down version of tgui, and functions as a container for various widgets, and tgchat is one of them. It of course can be expanded with more stuff.

It's also a separate entry point and a JS bundle, so it's not bloating the main tgui bundle, and is currently sitting at about 230kB.
2020-08-14 13:21:40 +12:00