Skip to content

Conversation

@p3rcypj
Copy link

@p3rcypj p3rcypj commented May 23, 2025

📌 References

📝 Implementation

Previously MolecularStructure.tsx was helding all the logic for PdbeMolstar plugin. We previously made an effort to extract the state into two useHooks -> usePdbPlugin() and usePluginRef(). But that effort wasn't enough as there is a lot of complexity still being held. Due to that complexity, when refined models feature was added, two bugs appeared:

  • Refined models not added on init (also applying to overlay items, referring to other pdbs and emdbs at the same time)
  • And not updating the MolstarStateRef causing to repeatedly load several instances of the model (duplications)
  • Nullable filenames external urls

This PR is a mid-refactor. It's a mid effort of extracting and moving some complexity out and improving readability while solving these mentioned bugs. And this PR isn't even the correct boilerplate of the refactor itself.

@adrianq adrianq merged commit f37c5ff into feature/refined-models Jun 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants