-
Notifications
You must be signed in to change notification settings - Fork 345
Ports tgui ticket panel from yogs #5906
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
Conversation
PELASE POOBERT I BEG OF YOU |
Marking as awaiting admin review, as I assume they'd want to review it first. |
@@ -94,15 +94,15 @@ | |||
VALUES (:type, :target_ckey, :admin_ckey, :text, [timestamp? ":timestamp" : "Now()"], :server, INET_ATON(:internet_address), :port, :round_id, :secret, :expiry, :note_severity, (SELECT `minutes` FROM [format_table_name("role_time")] WHERE `ckey` = :target_ckey AND `job` = 'Living')) | |||
"}, parameters) | |||
var/pm = "[key_name(usr)] has created a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""]: [text]" | |||
var/header = "[key_name_admin(usr)] has created a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""]" | |||
var/header = "[usr.key] has created a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't do this, as the use of key_name_admin
gives more info (or inserts *no key*
if there's no key attached, rather than simply leaving a blank space).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key_name_admin also adds html tags, which are then sanitized by tgui and displayed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use dangerouslySetInnerHTML
or decodeHtmlEntities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key_name_admin also adds html tags, which are then sanitized by tgui and displayed
Still, the way you have it leaves a blank space if there's no key attached - which can lead to confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can just do key_name, it does the same thing without the html tags
exportable_text += "[special_role_description]<br>" | ||
exportable_text += ADMIN_FULLMONTY_NONAME(subject) | ||
|
||
to_chat(src.owner, boxed_message(exportable_text), confidential = TRUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would highly recommend commenting out these lines of code, instead of removing them. It makes porting efforts easier.
message_admins(msg) | ||
var/msg = "[key_name(usr)] made [key_name(M)] drop everything!" | ||
log_admin(msg) | ||
message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] drop everything!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you reordering lines here, and in so many other places too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes the code a bit better, log_admin and admin_ticket_log getting the same message, w/o html tags, and then message_admins gets the tags, so I needed to move the definition of msg above the log_admin
// dat += "</html>" | ||
|
||
// usr << browse(dat.Join(), "window=ahelp[id];size=750x480") | ||
// MONKESTATION EDIT END |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little tip: DM supports /* */
for block comments. It's much easier to just use that, than to prepend //
onto every line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not that much easier than telling vs code to block comment, but I can see how it would make porting stuff easier, so I'll convert it to a block
@@ -808,7 +808,7 @@ | |||
message_admins("[key_name_admin(usr)] [msg] in [ADMIN_VERBOSEJMP(specificTarget)].") | |||
if (length(whoDyin)) | |||
for (var/mob/living/M in whoDyin) | |||
admin_ticket_log(M, "[key_name_admin(usr)] [msg]") | |||
admin_ticket_log(M, msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't do this, as this removes the user who launched the pod from the log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at my computer rn, but I'm pretty sure I'm grabbing usr in the New of the ticket log. I will check when I can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't necessarily be the same usr
who's launching the pod, though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
admin_ticket_log
doesn't pass a ckey, so /datum/ticket_log/New
will set the user
variable to get_fancy_key(usr)
which is the same usr
variable this call was passing to key_name_admin
@@ -1141,20 +1141,20 @@ | |||
if("remove") | |||
if(BP) | |||
BP.drop_limb() | |||
admin_ticket_log("[key_name_admin(usr)] has removed [src]'s [parse_zone(BP.body_zone)]") | |||
admin_ticket_log("[key_name(usr)] has removed [src]'s [parse_zone(BP.body_zone)]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we switching this from key_name_admin
to key_name
...?
interface/skin.dmf
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I recommend not changing the interface skin, and instead adding the "Tickets" button under the "Admin" tab, like we already have with "View Latest Ticket"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface button is convenient and works for players and admins, much easier than finding a verb every time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we already have a tab where ticket stuff can be found - where players and admins alike would expect it to be. There is no reason to put the new stuff in a different place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with discord verification, the tickets tab will become even more empty and obsolete because we're yoinking interviews. I think the tickets button is a nice addition.
Looks all good from an admin perspective. |
marking as do not merge until the code's thoroughly gone over and approved. it's okay to testmerge, tho |
ca7c87b
to
f30c516
Compare
cad5070
to
2fdcd12
Compare
if("Notes") | ||
browse_messages(target_ckey = ticket.initiator_ckey) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a ui act for notes but no button on the ui for it?
A quick guide for admins would be nice! Something like a question mark button in the top right of the window that sends something like: <div class="boxed_message"><b>TGUI Ticket Panel</b><br><span class="notice">
The new ticket interface takes a new approach to tickets; getting rid of the old tickets tab and giving it a new home as a button in the top right corner of the interface. You'll no longer have to refresh tickets to update them, since TGUI does that for you.<br><br></span>
<b>Rundown</b>
<br>
<span class="notice">
There are now 3 tabs at the top that act as a filter, each with 3 collapsible categories. "All", "My Tickets", "Unclaimed" and 3 categorys; namely Active, closed and resolved. All are self-explanatory.<br>
Tickets can now be claimed by an admin by pressing "Administer" on tickets, so less stepping on toes.<br>
Each ticket now has a chatbox that updates <i>live</i> as messages are sent.<br>
The ticket controls are pretty much the same compared to classic tickets.
</span>
</div> Can be achieved with
|
can we also have the ticket reply box be bigger? sometimes responses are long as hell and its annoying not being able to see the entire paragraph we gotta send |
fb511db
to
d101862
Compare
About The Pull Request
Ports yogs tgui ticket panel, plus a little bit of the rest of yog's ticket system that the panel relies on.
Why It's Good For The Game
Having to constantly click refresh is annoying




Changelog
🆑
add: Added tgui ticket panel
/:cl: