Commit Graph
32 Commits
Author SHA1 Message Date
ce84f93a90 [MIRROR] Dropdowns v2 [MDB IGNORE] (#20997)
* Dropdowns v2 (#75164)

## About The Pull Request

Complete rewrite of dropdowns to use popper elements that are injected
at the body level.
This means they are now horribly overcomplicated and also suck a lot
less

![2023-05-04_06-57-12](https://user-images.githubusercontent.com/5194834/236229806-2f676e7b-d6c5-427a-af2f-520d883be790.gif)
Also ported `Icon` to typescript for a reason that didn't end up making
it in the PR

## Why It's Good For The Game

![image](https://user-images.githubusercontent.com/5194834/236226086-35ec2009-e9a9-404b-9b52-3ab8de0a0ae6.png)

![image](https://user-images.githubusercontent.com/5194834/236226573-880c0380-0f70-41c7-90c6-d51ba4238561.png)

## Changelog
🆑
add: good tgui dropdowns
del: tgui dropdown suck
qol: tgui dropdowns suck less
balance: buffed tgui dropdowns
/🆑

* Dropdowns v2

---------

Co-authored-by: Rob Bailey <actioninja@criticalaction.net>
2023-05-08 03:19:57 +01:00
861db9f912 [MIRROR] TGUI Button iconPosition prop documentation [MDB IGNORE] (#17730)
* TGUI Button iconPosition prop documentation (#71489)

## About The Pull Request

documents the `iconPosition` tgui button prop from 55109

## Why It's Good For The Game

people can know it exists

## Changelog

no

* TGUI Button iconPosition prop documentation

Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2022-11-24 22:12:20 +00:00
c5b034540c [MIRROR] LabeledList Kitchen Sink [MDB IGNORE] (#15928)
* LabeledList Kitchen Sink (#69532)

Looks like I've documented most of the labeledlist props in my previous PR so there is pretty much nothing else to do here except className.

Why It's Good For The Game

More examples for newer coders.

* LabeledList Kitchen Sink

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
2022-08-31 09:34:15 -07:00
3653a3dd99 [MIRROR] Lets LabeledList.Item's label wrap if they want. Docs the rest of the props. [MDB IGNORE] (#15887)
* Lets LabeledList.Item's label wrap if they want. Docs the rest of the props. (#69459)

* Adds wrap toggle

* Documentation

* Less ambiguity

* Lets LabeledList.Item's label wrap if they want. Docs the rest of the props.

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
2022-08-28 12:13:40 -04:00
259c30097e [MIRROR] tgui: API improvements + docs [MDB IGNORE] (#12862)
* tgui: API improvements + docs

* fix

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-04-19 18:58:13 +01:00
8f2b8fe146 [MIRROR] Brings back button vertical alignment prop [MDB IGNORE] (#11835)
* Brings back button vertical alignment prop (#65054)

poggers??

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Brings back button vertical alignment prop

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2022-03-03 18:32:27 -05:00
0d32fe63d6 [MIRROR] Revert "Vertical alignment for tgui button content" [MDB IGNORE] (#9246)
* Revert "Vertical alignment for tgui button content (#62525)" (#62584)

This reverts commit 8e526a575a.

* Revert "Vertical alignment for tgui button content"

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
2021-11-04 19:53:17 -04:00
9bfc20324e [MIRROR] Vertical alignment for tgui button content [MDB IGNORE] (#9237)
* Vertical alignment for tgui button content (#62525)

Adds a verticalAlign prop for buttons that will wrap the content and icons in it in a flexbox and center/flex-end them. Made this an optional prop so it doesn't break browsers with bricked flexboxes.

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Vertical alignment for tgui button content

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-11-04 07:02:22 -04:00
2c7b7558c7 [MIRROR] HFR frontend rework [MDB IGNORE] (#9026)
* HFR frontend rework (#61737)

This makes the interface much more usable, and tries to help introduce the concepts involved in a very complicated system. The current interface is a bit clunky to use, and does not offer much guidance as to what actions are possible, or what the implications of taking them might be. You can't see the readouts at the same time you're tweaking the controls. Many failure states are not warned about, or even made clear when they're actively happening. To this end, this PR provides many very helpful qol changes, listed in the changelog below.

* HFR frontend rework

Co-authored-by: esainane <esainane+github@gmail.com>
2021-10-25 13:59:57 -04:00
771b8e501d [MIRROR] tgui: Add new and disambiguate old gas colors (#8280)
* tgui: Add new and disambiguate old gas colors (#61381)

This PR adds color mappings for new gases, and disambiguates color mappings for old gases where multiple gases used one color - many used red, or purple.

Most of these have been around for a while, but were missing color mappings in interfaces.

This mainly affects the HFR gas list interface.

* tgui: Add new and disambiguate old gas colors

Co-authored-by: esainane <esainane+github@gmail.com>
2021-09-19 21:43:38 +01:00
fdecb4a99e [MIRROR] Adds preserveWhitespace tgui Box property (#6054)
* Adds preserveWhitespace tgui Box property (#59383)

* Adds preserveWhitespace tgui Box property

* Update Box.tsx

* Update Box.tsx

* Update ExodroneConsole.tsx

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Adds preserveWhitespace tgui Box property

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-06-01 14:44:44 +12:00
ea9aed5554 [MIRROR] Replace alert usage with tgui_alert (#5815)
* Replace alert usage with tgui_alert

* a

* Update observer.dm

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-21 00:06:09 +01:00
5bd679b017 [MIRROR] Popper Tooltips 2 (they don't crash this time) (#5762)
* Popper Tooltips 2 (they don't crash this time) (#58980)

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Popper Tooltips 2 (they don't crash this time)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-05-17 22:44:56 +01:00
42943ce811 [MIRROR] Revert "Switch tgui tooltips to popper.js" (#4556)
* Revert "Switch tgui tooltips to popper.js" (#58078)

* Revert "Switch tgui tooltips to popper.js (#57992)"

This reverts commit 206c8215de.

* Revert "Fix Tooltip documentation (#58013)"

This reverts commit e692b05a99.

* Revert "Switch tgui tooltips to popper.js"

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-03-31 18:23:42 +01:00
8cf44d5112 [MIRROR] Fix new Tooltip documentation (#4479)
* Fix Tooltip documentation (#58013)

* Fix new Tooltip documentation

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-28 13:51:31 +01:00
879a906dcf [MIRROR] Switch tgui tooltips to popper.js (#4465)
* Switch tgui tooltips to popper.js (#57992)

* Preliminary popper support

* Switch tooltips to popper.js

* Documentation, change DEFAULT_PLACEMENT

* Switch tgui tooltips to popper.js

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-28 03:01:40 +01:00
cede532f69 [MIRROR] Nuke Window resizable and improve drag code (#3239)
* Nuke Window resizable and improve drag code (#56727)

* Nuke Window resizable and improve drag code

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-02-09 15:06:40 +00:00
e7573ea80f [MIRROR] Fix ExoFab UI and Section bugs, improve Tabs, upgrade deps (#3213)
* Fix ExoFab UI and Section bugs, improve Tabs, upgrade deps (#56721)

    Fixes #56237
    Unblocks #56704

Besides fixing the above mentioned issue with ExoFab UI, I fixed a few tgui component bugs and added a few improvements. Not really atomizable, sorry.
Section changes

    level property is now gone, section level is automatically calculated.
    Nested sections automatically become transparent.
    Nested sections are now properly incapsulated and won't inherit properties of parent sections.
        This allows using nested non-scrollable sections, while parent is, for example, scrollable.

Tabs changes

    Tabs without a parent section will pretend they are a section (and will look as such, with dark background).
    Top corners of tabs are a bit rounded to make it look more like a tab.
    Background color for selected and hovered tabs (previously it was just an underline).
    2px margin around the tabs, to make them stand out a bit from the section background.

Two new props:

    fill - Same as <Section fill>
    fluid - Tabs use full width of the container.

scrollable property was not implemented because it's a bit complicated (requires converting it into a class, registering its scrollable node with tgui, etc). If you need scrollable, just wrap tabs with a Section like a good man.

* Fix ExoFab UI and Section bugs, improve Tabs, upgrade deps

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-02-08 23:49:17 +00:00
ef6481e253 Missed PR mirrors from tgstation (https://github.com/tgstation/tgstation/pull/55373 and https://github.com/tgstation/tgstation/pull/56080) (#2759)
* Mirror of tgstation's Common Build Tooling (#55373)

* tgui 4.3 (#56080)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-01-18 07:42:54 +01:00
35aaa84a84 [MIRROR] Filterrific! (#2233)
* Filterrific!

* a

Co-authored-by: Rob Bailey <actioninja@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-19 06:29:54 +01:00
5d3d16ca13 [MIRROR] New TGUI component: the round gauge + initial uses of it (#1957)
* New TGUI component: the round gauge + initial uses of it

* aaa

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-11-30 18:51:58 +00:00
91773c46da [MIRROR] Interview System / Soft Panic Bunker (#1458)
* Interview System / Soft Panic Bunker

* a

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-26 08:32:37 +01:00
de597a98ec [MIRROR] tgui icon stacking (#1181)
* tgui: Icon Stacking (#54212)

* adds icon stacking to tgui

* Docmentation for Icon.Stack, added classnames to icon, Added a component that can stack child icons.

Co-authored-by: Style Mistake <stylemistake@ gmail.com>

* Cosmetic 1

* Cosmetic 2

Co-authored-by: Style Mistake <stylemistake@ gmail.com>

* tgui icon stacking

Co-authored-by: ThePotato <10260415+ThePotato97@users.noreply.github.com>
Co-authored-by: Style Mistake <stylemistake@ gmail.com>
2020-10-07 15:57:06 +02:00
ebaf0bf6b3 [MIRROR] Changes confirmMessage to confirmContent in tgui documentation (#812)
* It's not confirmMessage, it's confirmContent (#53752)

* Changes confirmMessage to confirmContent in tgui documentation

Co-authored-by: ThePotato97 <10260415+ThePotato97@users.noreply.github.com>
2020-09-16 01:28:21 +01:00
d2778728a5 [MIRROR] Removes "availible" mispellings in codebase (#427)
* Removes "availible" mispellings in codebase (#53046)

* AVAILABLE

* Rebuild tgui

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>

* Removes "availible" mispellings in codebase

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-19 20:14:11 -04:00
d9b246cca9 [MIRROR] tgchat (#342)
* 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.

* tgchat

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-14 23:30:16 +02:00
Aleksej KomarovandGitHub 0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02:00
5ae305ec9f Resolve issues with incorrect usage of a/an (#51095)
Co-authored-by: NewSta <spessman-007@users.noreply.github.com>
2020-05-25 01:34:34 +08:00
Aleksej KomarovandGitHub 5ba866b190 tgui: Better Canister (#50692)
* tgui: Better Canister

* Rebuild tgui
2020-04-27 08:35:06 +03:00
Aleksej KomarovandGitHub d86c667901 tgui: Fix Crafting, Tweak Box Units (#50577)
* Fix PersonalCrafting

* Half em units for margin/padding, full em unit for everything else.

* Update docs

* Opsie

* Rebuild tgui

* Let's pretend that IE10 is IE8

Closes #50588

* Assert dominance
2020-04-20 23:24:19 -07:00
Aleksej Komarov 2979838c38 Fixes, Reworks, New Tabs and General Misery 2020-04-19 19:38:55 +03:00
Aleksej Komarov 184a0f53ce Update the docs
Update the docs

Fix some bugs in README
2020-04-19 19:38:53 +03:00