-
Notifications
You must be signed in to change notification settings - Fork 3
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
Integrate with StructureManagerWidget from AiiDAlab-Widget-Base. #22
base: main
Are you sure you want to change the base?
Integrate with StructureManagerWidget from AiiDAlab-Widget-Base. #22
Conversation
5f4722c
to
d5776fb
Compare
@yakutovicha now the viewer should update when updating the atoms. Please try. |
Add tests: - generate documentation - pure python test using pytest - notebook test using yarn and playwright, check the official document from ipywidgets
Add tests: - generate documentation - pure python test using pytest - notebook test using yarn and playwright, check the official document from ipywidgets
eafb7af
to
d3846a3
Compare
weas and weas-widget are separate repos, but if we want to debug/develop a new feature of weas for the widget, using bundling makes the development more convenient. The js code was moved to the `js` folder, run `npm run build-watch` will bundle these assets into the `src/weas_widget/static` folder, and watch the changes. ## Use local weas If we want to use the weas package, then clone the weas repo, and the two repo folders are in the same level. ## Use release weas version If we want to use the release version from unpkg ## Publish Python package - Use the release version - run `npm run build` - python -m build - twine upload dist/*
f2b59f9
to
dd5159c
Compare
viewer.cameraSetting = {"direction": [0, 2, 1], "zoom": 0.8}
5390c05
to
43d39f7
Compare
7119b9f
to
f1acf57
Compare
f1acf57
to
0f90bc3
Compare
0f90bc3
to
52f5b7d
Compare
js/widget.css
Outdated
select { | ||
color: black !important; /* Or any color that provides better contrast */ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will restyle all select
elements on the entire page (probably not what you want, especially if others use sliders like ipywidgets
). To scope these styles to just elements added by this widget, I'd recommend adding a class to the root el
in render and applying a selector for select
here:
function render({ model, el }) {
/* ... */
el.classList.add("weas-widget");
el.appendChild(...);
}
.weas-widget > select {
color: black;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sorry, just passing by as I saw a mention of anywidget. Had a look at PRs to see the api usage. Feel free to ignore my unsolicited suggestion!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manzt , thank you so much for taking the time to review and offer your suggestion! I've implemented the changes based on your advice. Your insight was incredibly helpful, and I appreciate it. If you have any more suggestions or feedback not only for this PR, but the widget, please feel free to share.
619a418
to
504f042
Compare
No description provided.