-
Notifications
You must be signed in to change notification settings - Fork 12
AccordionBox resizing #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Assigning to @jbphet for review of changes. |
I have a handful of comments:
Back to @jonathanolson for actions and discussion. |
Demo added.
Removed the unused properties, sorry about that!
Using self now.
Pendulum Lab uses it (the energy accordion box changes size on startup, since it's all attached through an AlignGroup). Demo also exists now. Plan to handle that Area Model TODO when doing more Area Model stuff (it's more than just that change).
I removed the comment for now, as it doesn't really help the current state of the code. It was basically saying "before we had to do X because Y was broken, but now Y works and now we don't have to do X" with a comment link. That doesn't really help anyone in the future looking at the code (it's just a normal addChild at the normal point), so I think removal of the comment is the right option. |
This issue made changes to AccordionBox and is still open. Labeling as "block-publication". |
The commits all look good, and I tested out the demo and it behaves as one would expect. Closing. |
In phetsims/least-squares-regression#103, we discovered that "resize: false" sets LayoutConstraint._enabled to false, and hence when the title changes size, it does not recenter. Is this a significant problem? Should something be done to address this? @pixelzoom @jbphet @jonathanolson |
Hard to say without a demo or a bit more information, but my initial thought is that yes, this seems like a problem. It sounds like the title won't correctly reposition when doing things like switching locales, which seems incorrect, and not at all the behavior that I'm generally going for when using |
You can see the problem in https://phet-dev.colorado.edu/html/least-squares-regression/1.2.0-rc.1/phet/least-squares-regression_all_phet.html?stringTest=dynamic if you use the arrows to extend the strings, the title in the top left accordion box is no longer center aligned. Paper trail is through phetsims/least-squares-regression#103 |
This issue was already discovered and under investigation in #890 (comment) |
I agree that this would be good to fix. But I don't have any input on priority, scheduling, or assignment. |
Per #290 and this coming up as a pain point two consecutive sims I've worked on, I'd like to add a
{ resize: true }
option to AccordionBox, so that it can handle content/title size changes (and potentially other changes) naturally. Default will be to{ resize: false }
for compatibility.The text was updated successfully, but these errors were encountered: