Skip to content

Conversation

@leeyi45
Copy link
Contributor

@leeyi45 leeyi45 commented Jan 10, 2026

PR for a bunch of miscellaneous changes focused mainly around improving documentation.

  1. Type guards have their return types rendered as boolean in the documentation so as not to confuse cadets
  2. Code examples are validated via parser and ESLint to ensure that we don't get invalid code for code examples.
  3. Separate the two tsc functions into two different commands
  4. Fix markdown tree plugin not rendering certain examples correctly
  5. Update documentation
  6. Fix certain packages not having the correct lodash dependency declared
  7. Update to v6 for @blueprintjs

# Conflicts:
#	lib/buildtools/src/build/__tests__/all.test.ts
#	lib/lintplugin/package.json
#	lib/modules-lib/src/tabs/__tests__/useAnimation.test.ts
#	package.json
#	yarn.lock
Comment on lines 313 to 323
* Including 0 and 1, there are `num + 1` evenly spaced sample points
* @return function of type Curve → Drawing
* @returns function of type Curve → Drawing
* @example
* ```
* draw_3D_connected_full_view_proportional(100)(t => make_3D_point(t, t, t));
* ```
*/
export const draw_3D_connected_full_view_proportional = createDrawFunction(
'fit',
'lines',
'3D',
false
);
export const draw_3D_connected_full_view_proportional = RenderFunctionCreators.draw_3D_points_full_view_proportional;

/**
* Returns a function that turns a given 3D Curve into a Drawing, by sampling

This comment was marked as outdated.

Comment on lines -56 to 66
g: number,
b: number
): Point {
r = clamp(r, 0, 255);
g = clamp(g, 0, 255);
b = clamp(b, 0, 255);

return new Point(x, y, 0, [r / 255, g / 255, b / 255, 1]);
}
export const make_color_point = CurveFunctions.make_color_point;

/**

This comment was marked as outdated.

Comment on lines +378 to +384
drawer: RenderFunction,
func: CurveAnimation
): AnimatedCurve {
if (drawer.is3D) {
throw new Error(`${animate_curve.name} cannot be used with 3D draw function!`);
}

This comment was marked as outdated.

Comment on lines -257 to -263
const mat = [
[
cthz * cthy,
cthz * sthy * sthx - sthz * cthx,
cthz * sthy * cthx + sthz * sthx
],
[
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The draw_3D_connected_full_view_proportional function incorrectly renders points instead of connected lines due to a wrong function assignment.
Severity: HIGH

Suggested Fix

In src/bundles/curve/src/drawers.ts, change the assignment for draw_3D_connected_full_view_proportional to point to RenderFunctionCreators.draw_3D_connected_full_view_proportional instead of RenderFunctionCreators.draw_3D_points_full_view_proportional.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/bundles/curve/src/functions.ts#L257-L263

Potential issue: The function `draw_3D_connected_full_view_proportional` is incorrectly
assigned to `RenderFunctionCreators.draw_3D_points_full_view_proportional`. As a result,
when a user calls `draw_3D_connected_full_view_proportional`, the system will render a
set of disconnected points instead of the expected connected line segments. This leads
to an incorrect visualization that does not match the function's intended behavior.

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