Codebox theme

Discuss issues and requests related with the forum software
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

21 Apr 2019, 22:07

Oouu... True. I just checked, the css classes are still correctly to builtin, string, etc.
But the prism.css stylesheet is wrong...
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

21 Apr 2019, 22:23

Okay updated.
https://autohotkey.com/boards/assets/prism/light/prism.css

Code: Select all

.token.builtin {
	color: #290e90;
}
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Codebox theme

24 Apr 2019, 17:44

Not a theme issue as such, but SendLevel is not highlighted as a builtin.

Code: Select all

SendLevel 1
SendInput stuff
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Codebox theme

25 May 2019, 01:48

Not that I don't like green, but I still think there's not enough differentiation between strings and not strings.

I'm not sure what .token.selector means exactly, but some commands and control flow statements use it:

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
There are a bunch of keywords that get replaced with highlighted links to documentation in the wrong context, and common context-sensitive keywords that don't get highlighted. I think it's better to not highlight than to highlight incorrectly. The irrelevant links are probably worse (more misleading).

Code: Select all

MsgBox All is not right, if read between lines.
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

01 Jun 2019, 18:11

I had done an update for prism.js, but it seems like they broke the regex selectors again. What colours should strings or functions be? I can add in some manually changes; to include the SendLevel, and tweak the colours a little bit.
blueish for functions and green for strings (that's what this "Coy" theme seems to do) or the other way around? something like that?

I am not sure what token.keywords are supposed to be either, so I've disable the linking for those for now...
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Codebox theme

02 Jun 2019, 00:15

In the documentation, built-in functions and commands seem to be the same blue as links. Since they are links, and the most useful part of the code to auto-link, that makes sense. Strings there are dark red (including unquoted strings for commands), but I don't care what colour they are as long as they're not the same as functions or other common keywords or identifiers.

token.keywords seem to be keywords used in unquoted command or directive args, like Loop Read, if between/is/not, maybe #Warn All, or sub-commands. The links wouldn't work too well since they aren't "primary" keywords like command names (i.e. they aren't in the documentation index). In the documentation, I think they are either not specifically highlighted, or are highlighted as part of the command name (with the "control flow" colour).
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

03 Jun 2019, 15:41

Alright, thanks lexikos. looking into in later today. :+1:

EDIT:Added SendLevel and updated colours.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Codebox theme

05 Jun 2019, 03:26

how come some functions show up bold? is it so u can distinguish between built in and user defined functions?

format() shows up bold
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

05 Jun 2019, 08:51

Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Codebox theme

05 Jun 2019, 14:26

joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up?
idk, probably not. are you responsible for how tokens are identified or is that something prism.js's team has to fix?

there are also some discrepancies regarding instance methods, look at some of the snippets in this thread
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=65049
gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Codebox theme

05 Jun 2019, 15:32

Fyi, there seems to be some problem with multi-line comments, if a single-line comment with ; is part of it, prematurely ending the grey syntax colouring.

Code: Select all

/*
function(){
	msgbox
}

function2(){
	; msgbox
}
msgbox
*/
User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

05 Jun 2019, 18:44

darn... this is all from the prism code... and they update often.. especially for ahk .. :/
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: Codebox theme

10 Jun 2019, 08:58

lexikos wrote:
25 May 2019, 01:48

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...
Some functions are blue and bold, like that user-defined func quoted from lex above, and the redirect link fails naturally

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Codebox theme

12 Jun 2019, 12:00

I took the bold style from the docs... it looks like user-defined funcs are bold. I have removed the linking for user-funcs.
What else do you think should change? :think:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 36 guests