cv-frontend-vue icon indicating copy to clipboard operation
cv-frontend-vue copied to clipboard

Fix Clock Settings Functionality and Improve UI

Open Darshan808 opened this issue 1 year ago • 4 comments

Description:

This PR resolves an issue where the clock settings in CircuitVerse's Vue Simulator were not functioning correctly. Regardless of the clock time set, the clock always oscillated with a period of 500ms. This fix ensures that the clock now operates according to the user's specified time.

Additionally, the clock wasn't enabled by default, and a scroll bar appeared on the clock time display, leading to poor UI. These issues have been fixed by:

- Integrating the function to change the clock time (previously implemented in simulatorArea) into circuitProperties.

- Removing the scroll bar on the clock time display using basic CSS..

- Enabling the clock by default using html attribute 'checked'.

Testing:

Manual testing was conducted to verify that the clock functions as expected and the UI improvements are effective.

Screencasts

Before

Screencast from 2024-10-03 18-28-21.webm

After

Screencast from 2024-10-03 18-29-20.webm

Summary by CodeRabbit

  • New Features

    • Enhanced project property input with responsive circuit name updates.
    • Added functionality to change clock time in the simulation area.
  • Bug Fixes

    • Default state of the "Clock Enabled" checkbox is now checked.
  • Style

    • Updated numeric input fields to hide default spinners for a cleaner appearance.

Darshan808 avatar Oct 03 '24 12:10 Darshan808

Walkthrough

The changes involve updates to the ProjectProperty.vue and InputGroups.vue components, enhancing their interactivity and styling. In ProjectProperty.vue, the template structure is modified to improve the responsiveness of input fields and the default state of a checkbox. The InputGroups.vue component receives new styles to hide default numeric input spinners across different browsers. Additionally, a new function changeClockTime is introduced in circuit.ts to allow modifications to the clock time in the simulation area.

Changes

File Path Change Summary
src/components/Panels/PropertiesPanel/ModuleProperty/ProjectProperty/ProjectProperty.vue Modified template structure, added :key binding for circuit name input, and updated checkbox default state.
src/components/Panels/Shared/InputGroups.vue Added scoped <style> to hide default numeric input spinners for webkit and Firefox.
src/simulator/src/circuit.ts Introduced changeClockTime function to circuitProperty object for modifying clock time.

Poem

In the fields where circuits play,
A clock ticks bright, come what may.
Inputs dance, spinners hide,
In our code, new features abide.
With every change, we hop with glee,
For a better world, just wait and see! 🐇✨


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Oct 03 '24 12:10 coderabbitai[bot]

Deploy Preview for circuitverse ready!

Name Link
Latest commit 869c63e2ec3aa62e29487bf83b11dd04121ac125
Latest deploy log https://app.netlify.com/sites/circuitverse/deploys/66fe93c82291080008ba1e03
Deploy Preview https://deploy-preview-384--circuitverse.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 03 '24 12:10 netlify[bot]

@tanmoysrt Can i get this approved under 'hacktoberfest-accepted' label ?

Darshan808 avatar Oct 03 '24 12:10 Darshan808

@Arnabdaz Could you please review this PR ?

Darshan808 avatar Oct 05 '24 18:10 Darshan808

@gr455 Could this PR be reviewed please ? Also I would really appreciate if you could label this PR as hacktoberfest-accepted.

Darshan808 avatar Oct 23 '24 10:10 Darshan808