manim icon indicating copy to clipboard operation
manim copied to clipboard

Small touch ups before fixing bugs with tip rendering

Open josiest opened this issue 1 month ago • 0 comments

Overview: What does this pull request change?

  • tip_style parameter in TipableVMobject constructor now defaults to None instead of a mutable dict
  • Fixed a typo in TipableVMobject.assign_tip_attr method name
  • Added some TODOs to outline my plan to fix some issues with how TipableVMobject adds new tips

Motivation and Explanation: Why and how do your changes improve the library?

Just a few touch ups I thought I'd make a pull request for:

  1. The TipableVMobject constructor's tip_style parameter had a mutable default argument (see here for why this is likely not what the original author of this constructor intended)
  • Not sure if this causes any bugs rn, but it could very well in the future. Better to nip in the bud and change it since I caught it
  • I just implemented the standard fix: pass None as default argument instead, and default the attribute to an empty dict if given None
  1. TipableVMobject.asign_tip_attr has a typo in the method name. Seems to only be used in one place so it's an easy fix
  2. After working on a custom tip shape, I ran into a few unexpected behaviors. I've posted an in-depth analysis in this thread.
  • While the TipableVMobject class isn't broken, these issues cause hiccups and unexpected behavior when developing new tip shapes.
  • I've outlined in some TODO comments how I believe these issues can be fixed with minimal changes to existing code. I fully intend to fix these issues myself, but I thought it might be useful to merge into upstream to share my progress in case life gets in the way.

Links to added or changed documentation pages

Further Information and Comments

Reviewer Checklist

  • [ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • [ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • [ ] If applicable: newly added functions and classes are tested

josiest avatar Dec 05 '25 00:12 josiest