Skip to content

Conversation

@RichDom2185
Copy link
Member

Description

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

Checklist

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

@RichDom2185 RichDom2185 self-assigned this Feb 22, 2023
@coveralls
Copy link

coveralls commented Feb 22, 2023

Pull Request Test Coverage Report for Build 4380352133

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

  • 7 of 127 (5.51%) changed or added relevant lines in 9 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 34.625%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/dataVisualizer/drawable/ArrowDrawable.tsx 1 2 50.0%
src/commons/sourceRecorder/SourceRecorderSelectCell.tsx 1 4 25.0%
src/features/dataVisualizer/drawable/BackwardArrowDrawable.tsx 1 6 16.67%
src/commons/sideContent/SideContentCanvasOutput.tsx 0 6 0.0%
src/commons/sideContent/SideContentToneMatrix.tsx 1 8 12.5%
src/commons/sourceRecorder/SourceRecorderShareCell.tsx 1 9 11.11%
src/commons/missionCreator/MissionCreator.tsx 0 19 0.0%
src/commons/editingOverviewCard/EditingOverviewCard.tsx 1 27 3.7%
src/commons/editingWorkspaceSideContent/EditingWorkspaceSideContentDeploymentTab.tsx 1 46 2.17%
Files with Coverage Reduction New Missed Lines %
src/commons/editingWorkspaceSideContent/EditingWorkspaceSideContentDeploymentTab.tsx 2 9.71%
src/commons/missionCreator/MissionCreator.tsx 3 0.0%
Totals Coverage Status
Change from base Build 4340722176: 0.03%
Covered Lines: 4634
Relevant Lines: 12458

💛 - Coveralls

@RichDom2185
Copy link
Member Author

The only things I'm concerned about are the following:

- class SideContentToneMatrix extends React.Component<{}, {}> {
-   private $container: HTMLElement | null = null;
+ const SideContentToneMatrix: React.FC = () => {
+   const containerRef = useRef<HTMLDivElement | null>(null);
- class SideContentCanvasOutput extends React.Component<SideContentCanvasOutputProps, {}> {
-   private $parent: HTMLElement | null = null;
+ const SideContentCanvasOutput: React.FC<SideContentCanvasOutputProps> = ({ canvas }) => {
+   const parentRef = useRef<HTMLDivElement>(null);

Not sure if I did them correctly. @shenyih0ng could you help check this? Thanks a lot!

@RichDom2185 RichDom2185 marked this pull request as ready for review February 26, 2023 09:04
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!

@martin-henz martin-henz merged commit 2437ca6 into source-academy:master Mar 10, 2023
RichDom2185 added a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Jul 15, 2023
* Use FC for EditingOverviewCard

* Use FC for MissionCreator

* Use FC for EditingWorkspaceSideContentDeploymentTab

* Reformat code and comments

* Use FC for SourceRecorderShareCell

* Use FC for SourceRecorderSelectCell

* Use FC for SideContentToneMatrix

* Use FC for SideContentCanvasOutput

* Fix incorrect memoization

* Standardise Drawable export/imports

* Use FC for BackwardArrowDrawable

* Improve comment formatting

* Add back memoization

* Use FC for ArrowDrawable

---------

Co-authored-by: Martin Henz <[email protected]>
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