GSoC’24(CircuitVerse) Week 0 — Community Bonding
Tags: gsoc, google, circuitverse
Published: 2024-06-01 15:19:19

Hi Everyone, I am Niladri Sekhar Adhikary, a B.Tech Computer Science student from Kolkata. I will be sharing my community bonding period for GSoC this year. To be honest, I was already somewhat familiar with the CircuitVerse community when I first got selected, thanks to my prior contributions which helped me get to know CircuitVerse and its community well. As a result, my community bonding period focused more on planning the timeline and getting ready for coding.

At first, I had a meeting with my project mentors to plan the timeline and discuss some decisions required based on my GSoC proposal. We decided to finish up some small bug fixes and minor updates during the community bonding period itself.

Here are some Pull Requests I created during Community Bonding Period:-

- [Advance Options for embed view implemented.](https://github.com/CircuitVerse/cv-frontend-vue/pull/312)
- [Fix for Timing Diagram increase decrease buttons.](https://github.com/CircuitVerse/cv-frontend-vue/pull/313)
- A PR for all bug fixes and updates from the main repo. It is a single PR for all the updates that can be directly applied to the Vue simulator without any changes, with different commit for each issue — [Link.](https://github.com/CircuitVerse/cv-frontend-vue/pull/314)

### Advance Options for embed view implemented

The embedded view of CircuitVerse circuits can be used to display circuits in an iframe on other websites.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvnsi01dlqupr25c00u8.png)

By clicking the Embed button on the bottom right, a dialog box can be opened, allowing the user to create a customised embed view for the circuit.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2c90ksqgsjp8h0rak8rg.png)

As you can see in the Advance option section user gets to decide which properties should be there in the embed view.

The Embed view Advance option was already implemented in the previous year GSoC i.e in GSoC’22 by this PR — Link, now was the time to implement the same in the Vue Simulator. The implementation was a bit different, as we could now use Vue’s reactive nature to make the task easier.

In the embed Component we will get the preference data from the params using the `useRoute` method.

```typescript
import { useRoute } from 'vue-router'

const route = useRoute()

const hasDisplayTitle = ref(route.query.display_title ? route.query.display_title === 'true' : false);
const hasClockTime = ref(route.query.clock_time ? route.query.clock_time === 'true' : true);
const hasFullscreen = ref(route.query.fullscreen ? route.query.fullscreen === 'true' : true);
const hasZoomInOut = ref(route.query.zoom_in_out ? route.query.zoom_in_out === 'true' : true);
```

Then we can use data to conditionally render components.

```html
<div v-if="hasZoomInOut.value" id="zoom-in-out-embed" class="zoom- wrapper">
```

You can checkout the Pull Request here — https://github.com/CircuitVerse/cv-frontend-vue/pull/312

### Fix for Timing Diagram increase decrease buttons

Previously, the increase and decrease buttons of the timing diagram were not working.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utbnxzku5dxs0oxeicgj.png)

Using Vue's reactives fixed the problem, link to the PR - https://github.com/CircuitVerse/cv-frontend-vue/pull/313

### A PR for all bug fixes and updates from the main repo

Since decoupling of the new vue simulator some updates and bug fixes were made in the main simulator which needs to be updated in the vue simulator.

It is a single PR for all the updates that can be directly applied to the Vue simulator without any changes, with different commit for each issue - https://github.com/CircuitVerse/cv-frontend-vue/pull/314

### Conclusion

I have learned a lot more about the codebase and good practices. It was a good start, and I am now more excited to move on to the next tasks. Thanks to all my mentors who helped me plan the timeline for tasks; it helped me get a good start.