mountetna / monoetna

mono-repository version of etna projects
GNU General Public License v2.0
1 stars 0 forks source link

"bug"-fix for timur-map reparent button - disable rather than hide #1284

Closed dtm2451 closed 6 months ago

dtm2451 commented 7 months ago

Another quick one, this PR just switches the reparent button behavior from starting out as hidden -> starting out as disabled (until after a magma request allows confirmation of whether the model can be moved).

Why? Both Saurabh and Dan separately thought the button was bugged when it didn't appear in certain cases. And we should know better than users =p. I think the 'shown, but disabled' behavior makes it a bit clearer that the action is known and either being checked for usability or deemed non-usable, rather than just being bugged out when not shown!

graft commented 7 months ago

Maybe add a tooltip if disabled explaining why it is disabled, like "Cannot reparent a model containing records"

dtm2451 commented 7 months ago

Updated the past tests for this new disabled behavior, but will need to wait til after Thanksgiving to add a test that the button stays disabled when a model has records.