-
Notifications
You must be signed in to change notification settings - Fork 144
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
refactor: remove deprecated src directory and sync with v0/src and v1/src #495
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request removes a significant portion of the project’s codebase. Multiple files have been deleted including root and configuration files, Vue components for UI elements (dialogs, menus, panels, navigations, and helpers), localization and internationalization files, global declarations, and core simulator modules such as Verilog conversion, canvas APIs, circuit elements, analysis, backup, file operations, events, drag handlers, and hotkey management. These deletions eliminate many front‐end and simulator functionalities previously provided by the project. Changes
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for circuitverse ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
import CodeMirror from 'codemirror' | ||
import { setup } from '../src/setup' | ||
vi.mock('codemirror', async (importOriginal) => { |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
const actual = await importOriginal(); | ||
return { | ||
...actual, | ||
fromTextArea: vi.fn(() => ({ setValue: () => { } })), |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
import circuitData from './circuits/gates-circuitdata.json' | ||
import testData from './testData/gates-testdata.json' | ||
import { runAll } from '../src/testbench' | ||
vi.mock('codemirror-editor-vue3', () => ({ |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
import testData from './testData/gates-testdata.json' | ||
import { runAll } from '../src/testbench' | ||
vi.mock('codemirror-editor-vue3', () => ({ | ||
defineSimpleMode: vi.fn(), |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
|
||
jest.mock('codemirror') | ||
describe('Simulator Gates Working', () => { |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
} | ||
|
||
global.document.createRange = vi.fn(() => ({ | ||
setEnd: vi.fn(), |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
|
||
global.document.createRange = vi.fn(() => ({ | ||
setEnd: vi.fn(), | ||
setStart: vi.fn(), |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
global.document.createRange = vi.fn(() => ({ | ||
setEnd: vi.fn(), | ||
setStart: vi.fn(), | ||
getBoundingClientRect: vi.fn(() => ({ |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
bottom: 0, | ||
left: 0, | ||
})), | ||
getClientRects: vi.fn(() => ({ |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
left: 0, | ||
})), | ||
getClientRects: vi.fn(() => ({ | ||
item: vi.fn(() => null), |
Check failure
Code scanning / ESLint
disallow the use of undeclared variables unless mentioned in `/*global */` comments Error test
@@ -207,16 +165,16 @@ | |||
this.downDimensionY = subcircuitScope.layout.height | |||
} | |||
|
|||
this.nodeList.extend(this.inputNodes) | |||
this.nodeList.extend(this.outputNodes) | |||
this.nodeList.push(...this.inputNodes) |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
user controlled input
this.nodeList.extend(this.inputNodes) | ||
this.nodeList.extend(this.outputNodes) | ||
this.nodeList.push(...this.inputNodes) | ||
this.nodeList.push(...this.outputNodes) |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
user controlled input
@@ -207,16 +165,16 @@ | |||
this.downDimensionY = subcircuitScope.layout.height | |||
} | |||
|
|||
this.nodeList.extend(this.inputNodes) | |||
this.nodeList.extend(this.outputNodes) | |||
this.nodeList.push(...this.inputNodes) |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
user controlled input
this.nodeList.extend(this.inputNodes) | ||
this.nodeList.extend(this.outputNodes) | ||
this.nodeList.push(...this.inputNodes) | ||
this.nodeList.push(...this.outputNodes) |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
user controlled input
Hey @Arnabdaz , could you review this PR and merge it |
Currently we have some broken functioning in the src folder we are syncing So I'd suggest we keep the old src in the v0 src complete complete the work in v1 fix it completely, implement the version switch and then we should sync v0 and v1. |
Fixes #491
Remove deprecated src directory and sync changes with v0/src and v1/src
Changes
Testing
Additional Notes
The deprecated src directory was causing confusion as it contained outdated code. This cleanup helps maintain a cleaner codebase while ensuring all necessary changes are properly synced between v0 and v1 versions.
Summary by CodeRabbit
Chores / Refactor
Documentation & Localization
Tests & Utilities
These changes result in a leaner, more focused interface that emphasizes core functionalities for a smoother user experience.