-
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
Small Tweaks #69
Small Tweaks #69
Conversation
…es, and added a general DynamicWidgetTrait
Fixed in eec4fb2 |
The extended templating content is good, but long, and buried. Maybe we move it to one of:
Each of the above have various drawbacks from a maintenance perspective, of course. |
"""Ensure behaviors are not unwittingly being put in the wrong order.""" | ||
behaviors: Tuple[Behavior, ...] = proposal.value | ||
|
||
# TODO: Investigate making ordering a Behavior class variable |
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.
yerp, rather than adding this business, would see adding a rank
to the behaviors, which get sorted (ha) out on the frontend, with some sensible defaults... warnings and complex validation methods can still get swallowed when things are done "live,"
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.
Made an issue #76, unless we want to fix it in this PR
Local tests and docs look fine: leave it up to @sanbales if we want to handle the template docs "debt" and/or complexity debt of the behavior order on this PR or on a follow-up... as this doesn't map to something directly shippable, no reason not to do it here, would be my feeling. |
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.
Looks fine, aside from the called-out docs and rank choices.
I can see all of these being useful, if I had to chose one, I'd say we have a dedicated notebook with good explanations, and have it rendered in the docs as a reference html in case (for whatever reason) folks don't/can't run I did add more docs to the |
Created an issue to track this. |
Small miscellaneous tweaks, trying to address some of the issues in jupyrdf#63. - Adds hyperbolic functions (`cosh`, `sinh`, `tanh`) and an n-dimensional hypothenuse (`hypot`) to the templating engine. - Adds tables and explanations to the `Behaviors.ipynb` for the `jsMath` functions available when using the `Nunjucks` template. - Adds a check for `Selection` behaviors to show up before others, throws a warning if they are not first, includes test for it. - Preserves `LinkShape.curvature` and `LinkShape.line_dash` between `selected` and `unselected` `links` by default, e.g., set `LinkSelection.selected_curvature = None` and update the `ts` to behave appropriately. - Fixes label for `link arrows` and `link particles` controls in `Behaviors.ipynb` (part of jupyrdf#63) - Improves `Shapes.ipynb` by adding color scales and finishing the demo controls (part of jupyrdf#63) - Adds `--fix` flag to `ruff` to fix `python` code, e.g., auto-sort imports as `isort` used to do - adds more mathematical functions available when using the `Nunjucks` template (`cosh`, `sinh`, `tanh`, and `hypot`) - adds better explanation for the functions and constants in the `Behaviors` notebook - adds a warning if `node` or `link` behaviors are included in an order that can cause unexpected issues - adds automatic UI controls for `NodeShapes` in the `Shapes` and `Behaviors` notebooks No backwards incompatible changes.
References
Small miscellaneous tweaks, trying to address some of the issues in #63.
Code changes
cosh
,sinh
,tanh
) and an n-dimensional hypothenuse (hypot
) to the templating engine.Behaviors.ipynb
for thejsMath
functions available when using theNunjucks
template.Selection
behaviors to show up before others, throws a warning if they are not first.LinkShape.curvature
andLinkShape.line_dash
betweenselected
andunselected
links
by default, e.g., setLinkSelection.selected_curvature = None
and update thets
to behave appropriately.link arrows
andlink particles
controls inBehaviors.ipynb
(part of Documentation items for 0.3.2 #63)Shapes.ipynb
--fix
flag toruff
to fixpython
code, e.g., auto-sort imports asisort
used to doUser-facing changes
Nunjucks
template (cosh
,sinh
,tanh
, andhypot
)Behaviors
notebooknode
orlink
behaviors are included in an order that can cause unexpected issuesNodeShapes
in theShapes
andBehaviors
notebooksBackwards-incompatible changes
No backwards incompatible changes.