Skip to content
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

Interactive Sicp Bug Fixes #1812

Merged
merged 15 commits into from
Jun 21, 2021
Merged

Conversation

samuelfangjw
Copy link
Contributor

@samuelfangjw samuelfangjw commented Jun 19, 2021

Description

For the following screenshots, before is on the left and after is on the right.

  1. Indent child nodes of table of contents, to better represent hierarchical structure of table of contents.

Screenshot 2021-06-19 at 8 53 26 PM

  1. Added an error boundary to catch errors and display a fallback UI.

  2. Tweak font size for math so that they are the same size as surrounding text.

Screenshot 2021-06-19 at 8 58 11 PM

  1. Tweak font size of snippets and removed the border.

Screenshot 2021-06-19 at 9 04 49 PM

  1. Change redirect component in table of contents to use useHistory hook instead. Previously, when viewing on GitHub pages, if one goes to a new page via the table of contents the new page will not be added to the browser history (cannot press the back button). This should fix that.

  2. Fix issue where direct link to an element will not work on first page load. Also ensure that we always scroll to the top of the element.

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

How to test

Verify changes have been made

Checklist

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

@coveralls
Copy link

coveralls commented Jun 19, 2021

Pull Request Test Coverage Report for Build 955780461

  • 22 of 37 (59.46%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.08%) to 30.295%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/sicp/errors/tests/snapshots/SicpErrors.tsx.snap 0 1 0.0%
src/pages/sicp/subcomponents/SicpToc.tsx 1 2 50.0%
src/features/sicp/errors/SicpErrorBoundary.tsx 3 6 50.0%
src/features/sicp/parser/ParseJson.tsx 1 5 20.0%
src/pages/sicp/Sicp.tsx 7 13 53.85%
Files with Coverage Reduction New Missed Lines %
src/pages/sicp/Sicp.tsx 1 56.41%
Totals Coverage Status
Change from base Build 955529069: 0.08%
Covered Lines: 3243
Relevant Lines: 9887

💛 - Coveralls

@samuelfangjw samuelfangjw marked this pull request as draft June 19, 2021 13:18
@samuelfangjw samuelfangjw marked this pull request as ready for review June 19, 2021 13:20
@samuelfangjw samuelfangjw marked this pull request as draft June 19, 2021 13:21
@samuelfangjw samuelfangjw marked this pull request as ready for review June 19, 2021 15:12
@martin-henz martin-henz self-requested a review June 21, 2021 03:38
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.

looks fine

@martin-henz martin-henz merged commit 434513f into source-academy:master Jun 21, 2021
@samuelfangjw samuelfangjw deleted the bug-fixes branch June 21, 2021 09:47
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.

None yet

3 participants