Skip to content

Documentation Improvements#525

Open
leeyi45 wants to merge 32 commits intomasterfrom
plugins
Open

Documentation Improvements#525
leeyi45 wants to merge 32 commits intomasterfrom
plugins

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
Copy link

Choose a reason for hiding this comment

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

Bug: The function draw_3D_connected_full_view_proportional incorrectly draws points instead of the expected connected lines because it's assigned the wrong implementation.
Severity: CRITICAL

Suggested Fix

Add a new static method draw_3D_connected_full_view_proportional to the RenderFunctionCreators class. This method should call createDrawFunction with arguments for a 3D line drawing mode, like createDrawFunction('fit', 'lines', '3D', false, 'draw_3D_connected_full_view_proportional'). Then, update the export statement to use this new, correct method.

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/drawers.ts#L311-L323

Potential issue: The exported function `draw_3D_connected_full_view_proportional` is
intended to render a 3D curve by connecting points with lines, as its name and
documentation suggest. However, it is incorrectly assigned the implementation of
`RenderFunctionCreators.draw_3D_points_full_view_proportional`. This causes the function
to render isolated points instead of connected lines, breaking the public API contract.
The `RenderFunctionCreators` class is missing the corresponding static method to
generate the correct line-drawing function. This will lead to incorrect visual output
for any user calling this function, such as in the `canvases.js` sample.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant