Skip to content

Instantly share code, notes, and snippets.

View aryanshridhar's full-sized avatar
🎯
Focusing

Aryan Shridhar aryanshridhar

🎯
Focusing
View GitHub Profile

Background

For migrating the Node APIs from the renderer process to the main process, the IPCRenderer API is to be moved to preload scripts and then exposed in the renderer process via the contextBridge API.
The below diagram explains it better -
Image

name repo
dyte-react-sample-app https://github.com/dyte-in/react-sample-app/
dyte-js-sample-app https://github.com/dyte-in/javascript-sample-app
dyte-sample-app-backend https://github.com/dyte-in/backend-sample-app
@aryanshridhar
aryanshridhar / refactor.md
Last active April 22, 2022 05:22
Modules to migrate for contextIsolation in renderer process (electron fiddle)

Early work

  • ipc - ipcRendererManager to preload script.

Renderer Modules

Entire logic to migrate

@aryanshridhar
aryanshridhar / GSoC-2021@Zulip Work Product.md
Last active August 23, 2021 14:26
Work product description@GSoC-2021
export function MultiSelectDropdownListWidget({
widget_name,
data,
default_text,
null_value = null,
on_update = () => {},
value,
limit,
}) {
// A widget mostly similar to `DropdownListWidget` but
export function DropdownListWidget({
widget_name,
data,
default_text,
render_text = (item_name) => item_name,
null_value = null,
include_current_item = true,
value,
on_update = () => {},
}) {
import $ from "jquery";
import _ from "lodash";
import render_dropdown_list from "../templates/settings/dropdown_list.hbs";
import * as blueslip from "./blueslip";
import * as ListWidget from "./list_widget";
export function DropdownListWidget({
widget_name,
export function MultiSelectDropdownListWidget({
widget_name,
data,
default_text,
null_value = null,
on_update = () => {},
value,
limit,
}){
// A widget mostly similar to `DropdownListWidget` but
import $ from "jquery";
import render_dropdown_list from "../templates/settings/dropdown_list.hbs";
import * as blueslip from "./blueslip";
import * as ListWidget from "./list_widget";
import _ from 'lodash';
export function DropdownListWidget({