DEV Community

Cover image for GSoC 2022 CircuitVerse | Week 5 and 6 Report
vedant-jain03
vedant-jain03

Posted on

3 2

GSoC 2022 CircuitVerse | Week 5 and 6 Report

During these two weeks, I have worked on:

  • Assignment Restriction PR.
  • POC for Weekly Contest.
  • Some minor bugs & documenation.
  • Improve Notification Page(Noticed gem Integration).

Assignment Restriction.

We already have element restrictions for the assignment i.e., to restrict the group members with the use of elements for the Project. 
But we have got quite a few complaints from professors that CircuitVerse allows cheating easily. For example, users can easily copy/paste any public circuit. They can give collaborators access to their own circuit and copy-paste etc. So it has been requested by professors to disable this feature.

Implementation

Similar to the implementation of elements restriction, I have made a column of type jsonb named feature_restrictions which is gonna store all the selected feature restrictions.
In the assignment form, I have made a select-options dropdown section similar to element restrictions.

Image description

So there are 2 feature restrictions in Project Page and 2 in Simulator. So, in the projects page, first I give id's to the respective feature button so that to access them in JS using DOM manipulation and I simply did this then:

<% if @project&.assignment_id.present? && @project.assignment.feature_restrictions %> {
      let restricted_feature = '<%= @project.assignment.feature_restrictions %>';
      if(restricted_feature.includes('Allow Collaborators')) 
    {
        $('#collaboration_button').attr("style", "display:none")
      }
      if(restricted_feature.includes('Copy / Paste')) {
        $('#copy_paste').attr("style", "display:none")
      }
    }
<% end %>
Enter fullscreen mode Exit fullscreen mode

and for the simulator, I similarly did this:

<% if @project&.assignment_id.present? && 
   @project.assignment.feature_restrictions %>
   let restricted_feature = '<%= @project.assignment.feature_restrictions %>'
   if(restricted_feature.includes('Combinational Analysis Tool')) {
     $('#createCombinationalAnalysisPrompt').attr("style", "display:none")
     }
   if(restricted_feature.includes('Verilog tools')) {
     $('#generateVerilog').attr("style", "display:none")
     }
<% end %>
Enter fullscreen mode Exit fullscreen mode

This was the whole implementation summary.

and how can I forget the best part:

Image description
Image description

POC for Weekly Contest

Weekly contest feature in the CircuitVerse focus to have great circuits creation to be featured and user engagement. So I worked on that part meanwhile nitin was working on the UI part. But this issue or any issue should not be started without plan, so we decided to work on the weekly contest in the beginning of the next phase.

Some minor bugs & documenation.

Here are some work I did:

Notification Page Improvement(Noticed Integration)

Currently, CircuitVerse uses activity_notification gem for the Notifications but the gem is not maintained any more and the notification page is very lagging. So we decided to replace the gem and we found noticed gem by chris oliver of Gorails.

PR

UI

  • Navbar Notifications
    Image description

  • Notification Page
    Image description

Progress

  • Done with the initial integration and configuration.
  • Notification Event covered:
    • Star
    • Fork
  • UI
  • Tab functionality
  • Navbar quick notification access.

Pending

  • Data migration.
  • Cleanup
  • figma design UI is still under progress.

Next week plan

  • Completing the Notification pending task.

Conclusion

These two weeks were awesome, I learned a lot on rails and grab knowledge of integration of new gem noticed. Got to know about Rails Console Usage. Grab the knowledge of Rails API.

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay