Page 1 of 1

Wider error notice boxes?

Posted: Fri Dec 04, 2020 1:15 am
by jan1i3
Intro
You can safely skip to the TL;DR. I just go over details and context.
Background
So with longer file names or bigger folder structures or function names, it's not uncommon to see error notice boxes like these:
Screenshot 2020-12-04 014858.png
Screenshot 2020-12-04 014858.png (35.61 KiB) Viewed 2277 times
where the lines start with:
  • __modname__/
  • 'function_name'
  • <__modname__/file name because the function doesn't have a name:line>
and it might also start with other parts of the lines, depending on how they are wrapped

i personally had a hard time reading those kinds of stack traces, so i made this tiny mod

data.lua:

Code: Select all

local styles = data.raw["gui-style"]["default"]

styles.notice_textbox.maximal_width = 450 * 2 -- double the previous width
where that same notice box then looks like this:
Screenshot 2020-12-04 015417.png
Screenshot 2020-12-04 015417.png (33.37 KiB) Viewed 2277 times
(this has a width of 690 right now, for the record)
Note
Yes this is a crafted error from a testing mod of mine, so not a "real world example". But i literally just have 1 actual mod which is too small to demonstrate what i mean, and imo this is still close enough to a real world example. I do work with my test mods after all, and i'm not the only one doing that.

And i know this might look minor especially with the debugger, but looking at screenshots of other people's errors in the discord i've especially noticed the difference to what i'm now used to - the wider boxes.
TL;DR / Question
i was wondering if i was the only one who likes looking at the wider box much more, because if there are a lot of people agreeing with me i would ask for this to be changed in the base game instead of me releasing that mod for the people who do care (which has the side effect of some other notice boxes potentially getting wider, but i couldn't find/think of one that would get stretched more)

And of course, as usual, i might be overlooking something.

Re: Wider error notice boxes?

Posted: Fri Dec 04, 2020 2:35 am
by robot256
I like it. Totally worth releasing IMO, to see if anyone can find a side effect and to show the devs that it works.

Re: Wider error notice boxes?

Posted: Fri Dec 04, 2020 2:51 am
by NotRexButCaesar
I like the wider box. Definitely much more readable and visually appealing.

Re: Wider error notice boxes?

Posted: Fri Dec 04, 2020 10:05 am
by eradicator
jan1i3 wrote:
Fri Dec 04, 2020 1:15 am
i was wondering if i was the only one who likes looking at the wider box much more,
Nope. Been doing almost exactly the same thing for ages in my local dev-only mod.

Code: Select all

data.raw["gui-style"].default .notice_textbox .width = 1920/2

Re: Wider error notice boxes?

Posted: Fri Dec 04, 2020 10:48 am
by PFQNiet
I'll just weigh in with my opinion: that box isn't there for us modders. It's there for players to copy the stack trace and send to us.

With debugadapter and VSCode you get immediate access to not only the line that broke, but a full stack trace, complete with variables (including up-values) and the global table. Everything you need to effectively debug.

So personally, I don't mind the extra width, although looking at images in this thread, yeah, I can see the benefit to making the box bigger. I just wouldn't use it myself either way.

Re: Wider error notice boxes?

Posted: Fri Dec 04, 2020 12:47 pm
by jan1i3
PFQNiet wrote:
Fri Dec 04, 2020 10:48 am
I'll just weigh in with my opinion: that box isn't there for us modders. It's there for players to copy the stack trace and send to us.

With debugadapter and VSCode you get immediate access to not only the line that broke, but a full stack trace, complete with variables (including up-values) and the global table. Everything you need to effectively debug.
I agree. It would only be for the cases where you do end up reading those errors and stack traces, where with the debugger that's very uncommon. But not everybody uses that either.
I don't really mind either way, it's more for other people.

Re: Wider error notice boxes?

Posted: Mon Dec 07, 2020 3:54 am
by jan1i3
Alright, well it's a mod now: https://mods.factorio.com/mod/WiderNoticeTextBoxes
It being a mod doesn't really achive what i was hoping for, but hey if people like it they can have it now.
If it changes in the game itself i'll just deprecate the mod.