Skip to content

Rewrite:stepper Fix frontend to be compatible with js-slang rewrite/stepper #3125

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

Merged
merged 27 commits into from
Jun 12, 2025

Conversation

CATISNOTSODIUM
Copy link
Member

@CATISNOTSODIUM CATISNOTSODIUM commented Apr 8, 2025

Description

This PR aims to rewrite the code visualizer for the new stepper (source-academy/js-slang#1742) with new interactive features such as hovering on mu term for function definition. Instead of using React-ace library, this PR implements the code renderer from scratch while maintaining important features such as syntax highlighting and parentheses handling.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Remarks

  • src/commons/sideContent/content/_SideContentSubstVisualizer.tsx is the previous version. The new version is implemented in src/commons/sideContent/content/SideContentSubstVisualizer.tsx.
  • Do not forget to use the link js-slang library at the stepper branch (Rewrite: Stepper js-slang#1742) before starting the frontend.

Checklist

  • I have tested this code
  • I have updated the documentation

@CATISNOTSODIUM
Copy link
Member Author

image
It's weird that CI fails right at the format:ci stage. I don't get any errors when running on my machine. Maybe this frontend has to properly link with the rewrite/stepper branch in js-slang before testing.

@martin-henz martin-henz marked this pull request as draft April 29, 2025 08:56
@martin-henz martin-henz marked this pull request as ready for review June 10, 2025 05:47
@CATISNOTSODIUM CATISNOTSODIUM marked this pull request as draft June 11, 2025 01:42
@CATISNOTSODIUM CATISNOTSODIUM marked this pull request as ready for review June 11, 2025 02:21
@CATISNOTSODIUM
Copy link
Member Author

(Not finished)

@coveralls
Copy link

coveralls commented Jun 11, 2025

Pull Request Test Coverage Report for Build 15603271398

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 191 (4.71%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 30.453%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/sideContent/content/_SideContentSubstVisualizer.tsx 0 83 0.0%
src/commons/sideContent/content/SideContentSubstVisualizer.tsx 8 107 7.48%
Totals Coverage Status
Change from base Build 15551817270: -0.4%
Covered Lines: 4834
Relevant Lines: 14948

💛 - Coveralls

@CATISNOTSODIUM
Copy link
Member Author

CATISNOTSODIUM commented Jun 11, 2025

I think everything is finalized (except <<, >> feature which we plan to include them later).
However, upon fixing some issues in the frontend, I've found some minor bugs in js-slang repo. Please refer to minor fix from source-academy/js-slang#1761.

Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

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

Tested with a few examples; works well. Implementation is clear. Good to go I think.

@martin-henz martin-henz merged commit 77141d8 into source-academy:master Jun 12, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature request
Development

Successfully merging this pull request may close these issues.

4 participants