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

Restore some stories tabs #2614

Merged
merged 6 commits into from
Aug 8, 2023
Merged

Restore some stories tabs #2614

merged 6 commits into from
Aug 8, 2023

Conversation

RichDom2185
Copy link
Member

Description

  • Restore data visualiser, HTML display, and stepper tabs
  • Fix incorrect stories reducer (it was missing the hotfix from hotfix: stepper #2305)

There are still some bugs remaining, but nothing too major:

  • The stepper runs the code chunk as if it were a fresh program, i.e. without any prepends. Thus we need to ensure that everything is defined in the same code block.
    • e.g. we can't have function definitions in Block 1, and their function calls in Block 2, and run the stepper from Block 2.
  • _(only affects authors, not viewers) Updating chapters/variants is not being propagated correctly into the component lifecycle. If you change a code block's environment from Source 4 to Source 2 (or something that does not support the stepper to something that does), you will need to save the file and refresh the page in the browser for the stepper to work.

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

Checklist

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

Done for Source 2 and above. Also replaced magic number and reduced code
duplication.
Also reduced code duplication.
@coveralls
Copy link

coveralls commented Aug 8, 2023

Pull Request Test Coverage Report for Build 5794827385

  • 0 of 12 (0.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 37.401%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/stories/StoriesReducer.ts 0 1 0.0%
src/features/stories/storiesComponents/SourceBlock.tsx 0 11 0.0%
Files with Coverage Reduction New Missed Lines %
src/features/stories/StoriesReducer.ts 1 11.76%
src/features/stories/storiesComponents/SourceBlock.tsx 2 1.02%
Totals Coverage Status
Change from base Build 5791929544: -0.04%
Covered Lines: 5734
Relevant Lines: 14399

💛 - Coveralls

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 good!

@RichDom2185 RichDom2185 merged commit b77288b into master Aug 8, 2023
@RichDom2185 RichDom2185 deleted the restore-stories-tabs-1 branch August 8, 2023 13:30
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Aug 8, 2023
* Restore data visualizer tab

Done for Source 2 and above. Also replaced magic number and reduced code
duplication.

* Restore stepper tab

Also reduced code duplication.

* Restore HTML display tab

* Fix toggle using stepper not being dispatched

* Fix stepper not running

* Fix magic number
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Aug 15, 2023
* Restore data visualizer tab

Done for Source 2 and above. Also replaced magic number and reduced code
duplication.

* Restore stepper tab

Also reduced code duplication.

* Restore HTML display tab

* Fix toggle using stepper not being dispatched

* Fix stepper not running

* Fix magic number
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.

3 participants