Skip to content
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

Implement structure view toggle #1074

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Jan 11, 2025

This PR implements a toggleable structure view allowing users to toggle between the initial and relaxed structures in a single panel. Toggle controls are sensitive to the relaxation state (not relaxed, relaxing, relaxed):

  • Not relaxed: no toggle button
  • Relaxing: toggle button disabled until done, with responsive tooltip
  • Relaxed: active toggle button

Clicking the toggle button will update the title, toggle description, and structure view, info, and coordinates table.

image

@superstar54
Copy link
Member

Hi @edan-bainglass , thanks for the work, but I don't fully understand the PR's purpose from the description. Could you add a more detailed description of the functionality?

@edan-bainglass
Copy link
Member Author

Hi @edan-bainglass , thanks for the work, but I don't fully understand the PR's purpose from the description. Could you add a more detailed description of the functionality?

Is it clearer now?

@AndresOrtegaGuerrero
Copy link
Member

I believe we should address issue #530, as switching between images may not clearly reflect changes in the structure, or at least make those changes easy to distinguish.

@superstar54
Copy link
Member

switching between images may not clearly reflect changes in the structure, or at least make those changes easy to distinguish.

agree, it would be good to use animation of trajectory. Both nglview and weas-wdiget support animation.

@edan-bainglass
Copy link
Member Author

switching between images may not clearly reflect changes in the structure, or at least make those changes easy to distinguish.

agree, it would be good to use animation of trajectory. Both nglview and weas-wdiget support animation.

Sounds like a plan for the next release (future PR) 👍

@edan-bainglass edan-bainglass force-pushed the structure-view-toggle branch 2 times, most recently from ed961bc to a35c232 Compare January 12, 2025 06:55
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 94.93671% with 4 lines in your changes missing coverage. Please review.

Project coverage is 69.66%. Comparing base (f80ae9a) to head (1aba62b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...pp/result/components/viewer/structure/structure.py 88.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1074      +/-   ##
==========================================
+ Coverage   69.11%   69.66%   +0.55%     
==========================================
  Files         113      113              
  Lines        6764     6805      +41     
==========================================
+ Hits         4675     4741      +66     
+ Misses       2089     2064      -25     
Flag Coverage Δ
python-3.11 69.66% <94.93%> (+0.56%) ⬆️
python-3.9 69.68% <94.93%> (+0.55%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edan-bainglass
Copy link
Member Author

@AndresOrtegaGuerrero can we get this approved? 🙏

@AndresOrtegaGuerrero
Copy link
Member

AndresOrtegaGuerrero commented Jan 12, 2025

I would prefer focusing on resolving #530, I believe it is not intuitive for the user to observe any changes with the current approach.

@edan-bainglass
Copy link
Member Author

I would prefer focusing on resolving #530, I believe it is not intuitive for the user to observe any changes with the current approach.

This toggle feature was a request by Giovanni and Carlo. It is self-contained and does not take away from our ability to address #530 in the near future. Also, the text for the guide PR depends on this PR.

@AndresOrtegaGuerrero
Copy link
Member

AndresOrtegaGuerrero commented Jan 12, 2025

current approach.

This toggle feature was a request by Giovanni and Carlo. It is self-contained and does not take away from our ability to address #530 in the near future. Also, the text for the guide PR depends on this PR.

Sure, i would suggest you tag Carlo or Giovanni for some input on the visuals, from my side the current is fine.

@edan-bainglass
Copy link
Member Author

edan-bainglass commented Jan 13, 2025

current approach.

This toggle feature was a request by Giovanni and Carlo. It is self-contained and does not take away from our ability to address #530 in the near future. Also, the text for the guide PR depends on this PR.

Sure, i would suggest you tag Carlo or Giovanni for some input on the visuals, from my side the current is fine.

@cpignedoli @giovannipizzi can I get a presentation review? Is this what you had in mind?

structure_view.mp4

@giovannipizzi
Copy link
Member

Very good!

@edan-bainglass edan-bainglass merged commit be16785 into aiidalab:main Jan 13, 2025
8 checks 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.

4 participants