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

The Great Renaming #55

Merged
merged 11 commits into from
Apr 24, 2024
Merged

The Great Renaming #55

merged 11 commits into from
Apr 24, 2024

Conversation

robbiebyrd
Copy link
Owner

Platinum -> Classicy

? void (source[key] = Array.from(new Set(source[key].concat(target[key]))))
: !(source[key] instanceof Array) && !(target[key] instanceof Array)
? void this.deepMerge(source[key], target[key])
: void (source[key] = target[key])

Check warning

Code scanning / CodeQL

Prototype-polluting function Medium

Properties are copied from
target
to
source
without guarding against prototype pollution.
: !(source[key] instanceof Array) && !(target[key] instanceof Array)
? void this.deepMerge(source[key], target[key])
: void (source[key] = target[key])
: void (source[key] = target[key]);

Check warning

Code scanning / CodeQL

Prototype-polluting function Medium

Properties are copied from
target
to
source
without guarding against prototype pollution.
@robbiebyrd robbiebyrd merged commit 6c7f821 into main Apr 24, 2024
2 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @robbiebyrd - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 6 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 4 issues found
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -6,125 +6,157 @@
"/sounds/platinum/platinum.ac3"
],
"sprite": {
"PlatinumAlertIndigo": [
"ClassicyAlertBonk": [
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider renaming 'ClassicyAlertBonk' to maintain consistency with other sound naming conventions.

Suggested change
"ClassicyAlertBonk": [
"PlatinumAlertIndigo": [

@@ -68,12 +68,12 @@ const PlatinumIcon: React.FC<PlatinumIconProps> = ({
};

return (
<div ref={iconRef} id={`${id}-${Math.random().toString(36).substring(2,7)}`}
<div ref={iconRef} id={`${id}-${Math.random().toString(36).substring(2, 7)}`}
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider potential risks of using Math.random() for ID generation.

Using Math.random() for generating IDs can lead to non-unique values in large-scale applications. Consider a more robust unique ID generation method.

@@ -1,18 +1,18 @@
"use client";

import {useDesktop, useDesktopDispatch} from '@/app/SystemFolder/SystemResources/AppManager/PlatinumAppManagerContext';
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Ensure test coverage for renamed imports

The import paths have been updated to reflect the renaming from 'Platinum' to 'Classicy'. Please ensure that there are corresponding tests to verify that these changes do not affect the functionality and that all references are correctly updated throughout the project.

Suggested change
import {useDesktop, useDesktopDispatch} from '@/app/SystemFolder/SystemResources/AppManager/PlatinumAppManagerContext';
import {getTheme} from "@/app/SystemFolder/Appearance/ClassicyAppearance";
import {useDesktop, useDesktopDispatch} from '@/app/SystemFolder/SystemResources/AppManager/ClassicyAppManagerContext';
import {useSound} from "@/app/SystemFolder/SystemResources/SoundManager/ClassicySoundManagerContext";
import ClassicyWindow from "@/app/SystemFolder/SystemResources/Window/ClassicyWindow";

@@ -1,18 +1,18 @@
"use client";

import {useDesktop, useDesktopDispatch} from '@/app/SystemFolder/SystemResources/AppManager/PlatinumAppManagerContext';
import PlatinumContextualMenu from "@/app/SystemFolder/SystemResources/ContextualMenu/PlatinumContextualMenu";
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Verify component functionality after renaming

The component 'PlatinumContextualMenu' has been renamed to 'ClassicyContextualMenu'. Ensure that there are tests to verify that the component still functions as expected after the renaming and that all instances in the codebase are updated.

Suggested change
import PlatinumContextualMenu from "@/app/SystemFolder/SystemResources/ContextualMenu/PlatinumContextualMenu";
import ClassicyContextualMenu from "@/app/SystemFolder/SystemResources/ContextualMenu/ClassicyContextualMenu";
import PlatinumDesktopMenuBar from "@/app/SystemFolder/SystemResources/Desktop/MenuBar/PlatinumDesktopMenuBar";
import platinumDesktop from "@/app/SystemFolder/SystemResources/Desktop/PlatinumDesktop.module.scss";

@@ -1,18 +1,18 @@
"use client";

import {useDesktop, useDesktopDispatch} from '@/app/SystemFolder/SystemResources/AppManager/PlatinumAppManagerContext';
import PlatinumContextualMenu from "@/app/SystemFolder/SystemResources/ContextualMenu/PlatinumContextualMenu";
import {PlatinumMenuItem} from "@/app/SystemFolder/SystemResources/Menu/PlatinumMenu";
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Check for consistent renaming across the project

The 'PlatinumMenuItem' has been renamed to 'ClassicyMenuItem'. It's crucial to ensure that all references to the old name are updated across the entire project. Please add tests to check for any missed updates or broken references.

Suggested change
import {PlatinumMenuItem} from "@/app/SystemFolder/SystemResources/Menu/PlatinumMenu";
import { ClassicyMenuItem } from "@/app/SystemFolder/SystemResources/Menu/ClassicyMenu";

Comment on lines +1 to +14
import classicyTextEditorStyles from "@/app/SystemFolder/SystemResources/TextEditor/ClassicyTextEditor.module.scss";
import React from 'react'

interface EditorProps {
content: string;
}

const ClassicyTextEditor: React.FC<EditorProps> = ({content}) => {
return <div>
<textarea className={classicyTextEditorStyles.classicyTextEditor}>{content}</textarea>
</div>
}

export default ClassicyTextEditor;
Copy link

Choose a reason for hiding this comment

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

issue (testing): Missing tests for ClassicyTextEditor component

This text editor component should have tests to ensure that it handles content updates and displays correctly based on the provided props.

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