Bug - Fixed Combat Menu Buttons (custom buttons?) broken

Boesbert

Member
I don't know the proper terminology, I mean the buttons at the top of the combat frame (within the relay browser, myself using Version 76.0.3809.87 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)). A week ago or so, their order got all jumbled up. And between yesterday (using version 19473) and today (using version 19475) all automatic line breaks are gone from that field, making some buttons not easily accessible anymore. I tried going back to version 19473 but without success, it looks the same (screenshot provided). Please advise if this is a bug or if some preference or data file of mine most likely got corrupted and needs fixing.
 

Attachments

  • buttons.png
    buttons.png
    12.2 KB · Views: 51

Veracity

Developer
Staff member
We call those "Stationary Buttons", since they are in a fixed location at the top of the combat frame.

They still work for me on OS X.

Did you update Java recently?

buttons.png
 

Boesbert

Member
Did you update Java recently?

View attachment 9562

I did on August 1.

openjdk-11-jre-headless (11.0.3+7-1ubuntu2~18.04.1, 11.0.4+11-1ubuntu2~18.04.3) Upgraded at Do. Aug. 1 06:59:27 2019
openjdk-11-jre (11.0.3+7-1ubuntu2~18.04.1, 11.0.4+11-1ubuntu2~18.04.3) Upgraded at Do. Aug. 1 06:59:27 2019

edit: I guess that roughly tracks with when the first jumbled-up stationary button menu appeared, but the line breaks disappearing definitively happened after the most recent rollover to me.
 
Last edited:

Veracity

Developer
Staff member
KoLmafia does not put line breaks into rows of buttons. All the buttons are in a row and it is 100% up to your browser to wrap them to fit.

I guess I need to ask: have you changed or upgraded your browser? Changed anything at all in browser settings?
 

Boesbert

Member
KoLmafia does not put line breaks into rows of buttons. All the buttons are in a row and it is 100% up to your browser to wrap them to fit.

I guess I need to ask: have you changed or upgraded your browser? Changed anything at all in browser settings?

I did not change any settings but yes, I have been regularly upgrading Chromium (and there have been several upgrades recently).

I just checked with Firefox and the problem does not appear there. I guess I might have to switch again...
 

Veracity

Developer
Staff member
Ideally, we'd like to generate html/javascript which renders the same on all browsers.

Looking at your screen shot and mine, it looks like the surrounding frames are not quite the same. Presumably a Browser difference.

Can you do this for me, please.

Go to Preferences/Extra Debugging
Check "Log decorated responses in debug log"
In gCLI, "debug on"
In relay browser (Chromium) start a fight.
- verify that the buttons are not wrapping as expected.
In gCLI "debug off"

In the DEBUG log, find the following two things:

- The text returned by KoL for the fight request
- The text as modified by KoLmafia which included the stationary buttons which is sent to the browser.

I'd like to see if there is something different being sent from KoL than what I get. I am using "Google Chrome" now, because Firefox has issues for me.
And I'd like to see if the KoLmafia-"decorated" text is different, somehow.
 

Boesbert

Member
In the DEBUG log, find the following two things:

- The text returned by KoL for the fight request
- The text as modified by KoLmafia which included the stationary buttons which is sent to the browser.

This part is surprisingly difficult for me since I am not exactly sure where the beginning and end of those things are in this wall of text.
 

Veracity

Developer
Staff member
OK, fair enough.

If you turned on and off debugging as I suggested, your DEBUG file should be fairly small. Just attach the whole thing.

(If you run Guide, it will probably include some extra requests/responses. I can deal with that.)
 

Veracity

Developer
Staff member
I didn't respond, although I should have, since I looked at your debug log.

The HTML it creates for me is identical to the HTML it creates for you.
I am currently using Chrome on my Mac as my Relay Browser, and the stationary buttons continue to render perfectly for me.
You are using Linux, no? So "Chromium" for you is not exactly the same as "Chrome" for me, although I expect they have similar technology inside.
But, sometime recently, "Chromium" stopped doing line wrapping the way it used to.

Sorry to say, since this is not easily controllable, but this is a bug in your browser, rather than KoLmafia; the valid HTML that KoLmafia produces for Stationary Buttons has not changed for years - but your browser has changed how it renders it.

Don't know what to suggest. But, this is not a KoLmafia bug.
 

daisygirl

New member
I developed the same problem yesterday after a Chrome update. I found some posts in the Chrome support center mentioning rendering problems that started immediately after updating to the version I have currently (76.0.3809.132, Windows). Back to Firefox, then. Thought I'd mention it in case anyone else is suddenly seeing this.
 

Boesbert

Member
Yeah, I switched back to Firefox as well (which has its own problems). If you could, please post a link to some centralized discussion of this problem where the Chromium developers are most likely to see it.

Also, thanks to Veracity for getting to the bottom of this.
 

xKiv

Active member
I also noticed this yesterday, which was probably the first day I played after the last chrome update (on linux) (an update that I don't remember accepting, even though all updates on my system should be going through manual acceptance). I gave it a cursory look in developer console and saw what looks like very suspicious default css (I am not an expert, but it seems to me that they are forcing flexbox on all form elements without consent). Looks like "be evil" in action once again.
(firefox is still sane in this manner, for now - and all the quantum updating that happened since I last played in firefox actually made it not nearly as slow as it used to be ; or maybe that's just having to use webextensions instead of old addons)
 

xmccx

New member
and my turn today,

i've added a couple of lines into mafia/relay/stationarybuttons.1.css and my buttons no longer scroll, in chrome 77.0.3865.75 at least.

#btnwrap{
//width: 100%;
display: flex;
flex-wrap: wrap;
}
 

Boesbert

Member
and my turn today,

i've added a couple of lines into mafia/relay/stationarybuttons.1.css and my buttons no longer scroll, in chrome 77.0.3865.75 at least.

#btnwrap{
//width: 100%;
display: flex;
flex-wrap: wrap;
}

I tried this for a while... and it worked... and then it stopped working? :confused:
I think it might have gotten broken by the LOV tunnel enemies? I dunno, I need to test this further.
 

Veracity

Developer
Staff member
(I tried that and it not work for me on Chrome on my Mac. Had it worked, I would have tried it with other browsers and eventually submitted it.)
 

xmccx

New member
hrm, can't explain.
fought a regular fight in each of chrome, ff, and edge, had fight buttons wrapping ok
fought first lov fight in chrome, 2nd in ff, 3rd in edge, buttons good in all 3.
(note didn't try fights in ff or edge w/out the change though)
don't have access to a mac or linux env atm to test other css possibles (safari does need something slightly diff for flex, but that still doesn't explain chrome on mac failing).
thanks for trying, sorry it's not a global solution, whilst it works for me, i'll use it, when it stops 'cause of future browser rendering changes, i'll try and find another way :)
 

Veracity

Developer
Staff member
We use stationarybuttons.1.css versioned like that specifically so we can update it without forcing people to reload.
I put the change into stationarybuttons.2.css, told KoLmafia that was the version we are now using, and tested on Chrome, Firefox, and Safari.
It worked on all of them.

So, even though this is Chrome being buggy, we can work around it.

Revision 19563.
 
Top