Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681384yI am impressed, and horrified, all at the same time.
@SortOfTested we have "standards" to up hold π€·βοΈ -
dotnope314y"Hey, the user clicked the button! What should I do?"
"Well, it depends. Was the button...*gray* by any chance?" -
what if you want to change the style of color used for disabled buttons?
is this the type of situation that separation of concerns comes into play for? -
Aedath1504yI've seen some legacy code where button background color is used as a flag in code. As in if button background is green, execute x, and if yellow, execute y and so on.
Today I have encountered some interesting piece of code:
In order to make a button disabled, the text of that button is assigned a grey color.
And in the click handler, there is a check if the color of the text of that button is grey, then return from it and do nothing.
That might be the ugliest hack that I had ever encountered π
rant