profile
viewpoint

brahmosjs/brahmos 379

Super charged JavaScript library with modern React API and native templates.

s-yadav/iv-viewer 376

A zooming and panning plugin inspired by google photos for your web images.

s-yadav/angulargrid 285

Pinterest like responsive masonry grid system for angular

s-yadav/jsonQ 207

A JavaScript library to make manipulation and extraction of data from a JSON very easy and fast.

s-yadav/contextMenu.js 194

contextMenu.js is a plugin to create windows like context menu with keyboard interaction, different type of inputs ,trigger events and much more.

s-yadav/FlakeId 47

Twittter Snowflake like unique id generator plugin for nodejs and browser

s-yadav/github-turbo-pr 23

Chrome extension to optimize github for handling big pull request. 🚀

s-yadav/eventPause.js 20

eventPause is a tiny plugin with lots of methods to control events. So whenever you want you can pause and activate any event.

s-yadav/create-effect 7

A small utility to create custom hooks using useEffect

s-yadav/fqueue 7

A micro-plugin to queue function execution to handle asynchronous flow and stepping through functions.

startedritz078/reference

started time in 2 days

pull request commentbrahmosjs/brahmos

Flow type Integration, and static typing across the files.

I guess the unknown type (typescript) is equivalent to mixed type(flowtype).

On taking another glance some of them can indeed be converted on mixed type. Mostly on the Children API. I will check it and update it.

s-yadav

comment created time in 4 days

pull request commentbrahmosjs/brahmos

Flow type Integration, and static typing across the files.

Do you mean mixed type?

Some of them are intentionally annotated as any, and I do typecase it on places where it is used. The problem is flow can't figure runtime logic, and mixed type requires handling all the types.

s-yadav

comment created time in 4 days

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 63bc3aa2ee4540ce74d1e595c13a4151921b4a20

- Added flowtype notations across files. - Fixed some possible bugs identified by flow type. - Remove unused old files

view details

push time in 4 days

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 90c85188e3908ed9f74a60b1f14f9c7dad9df275

- Added flowtype notations across files. - Fixed some possible bugs identified by flow type. - Remove unused old files

view details

push time in 4 days

push events-yadav/ScrollMenu

Tim Gates

commit sha eb95ba80166f6f74eee3ad377a32afa04b3f8851

docs: Fix simple typo, isntance -> instance There is a small typo in hooks/iscroll_hook.js, hooks/nicescroll_hook.js. Should read `instance` rather than `isntance`.

view details

Sudhanshu Yadav

commit sha 05693cefa9aec104d31018e1c69eb58593a8a326

Merge pull request #2 from timgates42/bugfix_typo_instance docs: Fix simple typo, isntance -> instance

view details

push time in 4 days

PR merged s-yadav/ScrollMenu

docs: Fix simple typo, isntance -> instance

There is a small typo in hooks/iscroll_hook.js, hooks/nicescroll_hook.js.

Should read instance rather than isntance.

+3 -3

0 comment

2 changed files

timgates42

pr closed time in 4 days

PullRequestReviewEvent

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha ae4251d4f714dfb9da74bcb44c725147c5b966e5

- Added flowtype notations across files. - Fixed some possible bugs identified by flow type. - Remove unused old files

view details

push time in 5 days

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 620a983a1aed692393000b165344c2e45b57b86b

- Added flowtype notations across files. - Fixed some possible bugs identified by flow type. - Remove unused old files

view details

push time in 5 days

push eventbrahmosjs/brahmos

vipulbhj

commit sha 73b64b106629eb087c8aaf8ae86ce9ea15ea4cf6

First draft implementation of Memo HOC

view details

vipulbhj

commit sha 702a52ba36703be44ecb32153832298de98d06e7

Added memo to the base import

view details

Sudhanshu Yadav

commit sha b86f1ecb4e4c94236e74439e869fbfba6c40acf6

Add more description on Suspense List Demo

view details

Sudhanshu Yadav

commit sha 9671cf6fb4c738398eb055f0b1c4ae45dfa1cad0

[WIP] Add types

view details

Sudhanshu Yadav

commit sha ada8998425d9c97299fda7b69013f7469f6877dd

- Added flowtype notations across files. - Fixed some possible bugs identified by flow type. - Remove unused old files

view details

push time in 5 days

PR opened brahmosjs/brahmos

Flow type Integration, and static typing across the files.
+1217 -1222

0 comment

47 changed files

pr created time in 5 days

create barnchbrahmosjs/brahmos

branch : flowtype

created branch time in 5 days

created taginterviewstreet/react-collapsable

tagv1.1.3

created time in 7 days

push eventinterviewstreet/react-collapsable

Sudhanshu Yadav

commit sha abc4379de6e0394e8bdd7d56a89824cf9c64ce83

- Add react-dom as peer dependency and dev dependency - Use boolean flag instead of storing children in state. - Remove spread props and rename the name to react-collapsable

view details

Sudhanshu Yadav

commit sha 9b600476d6016bcafe2173a2c4f8b1af7ccce737

Keep the lib for tag perpose

view details

Sudhanshu Yadav

commit sha da04307067bcad6cecc61511343bebe5d371dca3

Updated lib index

view details

Sudhanshu Yadav

commit sha c4ad3a3d6ce38a0edcade9e51779d790fd88d762

New updates

view details

push time in 7 days

push eventinterviewstreet/react-collapsable

Sudhanshu Yadav

commit sha abc4379de6e0394e8bdd7d56a89824cf9c64ce83

- Add react-dom as peer dependency and dev dependency - Use boolean flag instead of storing children in state. - Remove spread props and rename the name to react-collapsable

view details

push time in 7 days

created taginterviewstreet/react-collapsable

tagv1.1.2

created time in 8 days

push eventinterviewstreet/react-collapsable

Sudhanshu Yadav

commit sha 1585383acc4236fe895f1f4074d2613c89b05822

- Add react-dom as peer dependency and dev dependency - Use boolean flag instead of storing children in state. - Remove spread props and rename the name to react-collapsable

view details

Sudhanshu Yadav

commit sha f0ad212c8bab7da72b2992077de62f9ee12940cb

Keep the lib for tag perpose

view details

Sudhanshu Yadav

commit sha 9aa18a9a4bc11e8b84556dd29aff48a377c08b24

Updated lib index

view details

Sudhanshu Yadav

commit sha 15b0e4fb5ef6209c64231a5d7ee7cb813afd85ef

New updates

view details

push time in 8 days

push eventinterviewstreet/react-collapsable

Sudhanshu Yadav

commit sha 1585383acc4236fe895f1f4074d2613c89b05822

- Add react-dom as peer dependency and dev dependency - Use boolean flag instead of storing children in state. - Remove spread props and rename the name to react-collapsable

view details

push time in 8 days

Pull request review commentdahliacreative/react-collapsable

Some optimisations on the component

-import React, { useRef, useState, useEffect } from 'react'-import PropTypes from 'prop-types'+import React, { useRef, useState, useEffect } from 'react';+import PropTypes from 'prop-types'; -const Collapsable = ({+const Collapsible = ({+  isOpen,+  minAnimationDuration,+  maxAnimationDuration,+  speedDivider,+  easing,+  children,+  keepChildrenOnClose,+  ...restProps+}) => {+  const content = useRef();+  const [state, setState] = useState({+    height: isOpen ? 'auto' : 0,+    speed: 0,+  });++  const [effectiveChildren, setChildren] = useState(children);

My main thoughts on this is accessibility and not hiding content from screen readers. Having a prop puts this in the hands of the developer, but I think having the children when closed should be the default.

display: none and visibility: hidden elements are not accessible on-screen reader as well. In Ideal situation content wise we see should be similar to what screen reader reads. Providing them two versions is anti-pattern for accessibility. Exceptions are visual contents like img, icons etc. But textual content-wise it should be same for screen reader and normal user.

s-yadav

comment created time in 8 days

Pull request review commentdahliacreative/react-collapsable

Some optimisations on the component

-import React, { useRef, useState, useEffect } from 'react'-import PropTypes from 'prop-types'+import React, { useRef, useState, useEffect } from 'react';+import PropTypes from 'prop-types'; -const Collapsable = ({+const Collapsible = ({+  isOpen,+  minAnimationDuration,+  maxAnimationDuration,+  speedDivider,+  easing,+  children,+  keepChildrenOnClose,+  ...restProps+}) => {+  const content = useRef();+  const [state, setState] = useState({+    height: isOpen ? 'auto' : 0,+    speed: 0,+  });++  const [effectiveChildren, setChildren] = useState(children);

I think storing children in state and removing them constantly would be inefficient and there is something we can do with a simple Boolean instead.

Will make it boolean based. Removing and adding will not have any perf impact over boolean as we are just keeping the reference. But one wrong thing I can think of here is when in the closed state the children reference might get stale in the state.

I will update it boolean based.

s-yadav

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

starteddavidmarkclements/v8-perf

started time in 9 days

startedtech-conferences/confs.tech

started time in 10 days

push eventbrahmosjs/brahmos

vipulbhj

commit sha 702a52ba36703be44ecb32153832298de98d06e7

Added memo to the base import

view details

push time in 10 days

PullRequestReviewEvent

issue commentbrahmosjs/brahmos

Why both webpack and rollup being used?

Rollup does not add up any runtime. So it's great for bundling library for a smaller footprint. But webpack shines in its dev server. So using rollup to create bundles, and webpack to run dev server for running examples in local development.

Mixing tooling is fine unless they are adding up the complexity and solving the right problem.

kanishk30

comment created time in 11 days

push eventbrahmosjs/brahmos

vipulbhj

commit sha 73b64b106629eb087c8aaf8ae86ce9ea15ea4cf6

First draft implementation of Memo HOC

view details

push time in 11 days

PR merged brahmosjs/brahmos

First draft implementation of Memo HOC

#15 Might need tweeting to handle edge cases

+21 -0

0 comment

2 changed files

vipul-vinsol

pr closed time in 11 days

PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

First draft implementation of Memo HOC

+import shallowEqual from './helpers/shallowEqual';++export default function memo(Component, comperator) {+  let cachedComponent = null;+  let prevProps = null;+  comperator = comperator || shallowEqual;++  return function MemorizedComponent(props) {
  return function MemoizedComponent(props) {
vipul-vinsol

comment created time in 11 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

PR merged brahmosjs/brahmos

Bump http-proxy from 1.17.0 to 1.18.1 dependencies

Bumps http-proxy from 1.17.0 to 1.18.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md">http-proxy's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/http-party/node-http-proxy/compare/1.18.0...v1.18.1">v1.18.1</a> - 2020-05-17</h2> <h3>Merged</h3> <ul> <li>Skip sending the proxyReq event when the expect header is present <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1447"><code>#1447</code></a></li> <li>Remove node6 support, add node12 to build <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1397"><code>#1397</code></a></li> </ul> <h2><a href="https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.0">1.18.0</a> - 2019-09-18</h2> <h3>Merged</h3> <ul> <li>Added in auto-changelog module set to keepachangelog format <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1373"><code>#1373</code></a></li> <li>fix 'Modify Response' readme section to avoid unnecessary array copying <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1300"><code>#1300</code></a></li> <li>Fix incorrect target name for reverse proxy example <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1135"><code>#1135</code></a></li> <li>Fix modify response middleware example <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1139"><code>#1139</code></a></li> <li>[dist] Update dependency async to v3 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1359"><code>#1359</code></a></li> <li>Fix path to local http-proxy in examples. <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1072"><code>#1072</code></a></li> <li>fix reverse-proxy example require path <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1067"><code>#1067</code></a></li> <li>Update README.md <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/970"><code>#970</code></a></li> <li>[dist] Update dependency request to ~2.88.0 [SECURITY] <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1357"><code>#1357</code></a></li> <li>[dist] Update dependency eventemitter3 to v4 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1365"><code>#1365</code></a></li> <li>[dist] Update dependency colors to v1 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1360"><code>#1360</code></a></li> <li>[dist] Update all non-major dependencies <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1356"><code>#1356</code></a></li> <li>[dist] Update dependency agentkeepalive to v4 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1358"><code>#1358</code></a></li> <li>[dist] Update dependency nyc to v14 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1367"><code>#1367</code></a></li> <li>[dist] Update dependency concat-stream to v2 <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1363"><code>#1363</code></a></li> <li>x-forwarded-host overwrite for mutli level proxies <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1267"><code>#1267</code></a></li> <li>[refactor doc] Complete rename to http-party org. <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1362"><code>#1362</code></a></li> <li>Highlight correct lines for createProxyServer <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1117"><code>#1117</code></a></li> <li>Fix docs for rewrite options - 201 also handled <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1147"><code>#1147</code></a></li> <li>Update .nyc_output <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1339"><code>#1339</code></a></li> <li>Configure Renovate <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1355"><code>#1355</code></a></li> <li>[examples] Restream body before proxying, support for Content-Type of application/x-www-form-urlencoded <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1264"><code>#1264</code></a></li> </ul> <h3>Commits</h3> <ul> <li>[dist] New test fixtures. <a href="https://github.com/http-party/node-http-proxy/commit/7e4a0e511bc30c059216860153301de2cdd1e97f"><code>7e4a0e5</code></a></li> <li>[dist] End of an era. <a href="https://github.com/http-party/node-http-proxy/commit/a9b09cce43f072db99fb5170030a05536177ccb7"><code>a9b09cc</code></a></li> <li>[dist] Version bump. 1.18.0 <a href="https://github.com/http-party/node-http-proxy/commit/9bbe486c5efcc356fb4d189ef38eee275bbde345"><code>9bbe486</code></a></li> <li>[fix] Latest versions. <a href="https://github.com/http-party/node-http-proxy/commit/59c4403e9dc15ab9b19ee2a3f4aecbfc6c3d94c4"><code>59c4403</code></a></li> <li>[fix test] Update tests. <a href="https://github.com/http-party/node-http-proxy/commit/dd1d08b6319d1def729554446a5b0176978a8dad"><code>dd1d08b</code></a></li> <li>[dist] Update dependency ws to v3 [SECURITY] <a href="https://github.com/http-party/node-http-proxy/commit/b00911c93740a00c5cfbacbb91565cb6912ed255"><code>b00911c</code></a></li> <li>[dist] .gitattributes all the things. <a href="https://github.com/http-party/node-http-proxy/commit/fc93520d741ec80be8ae31ca005f3e9c199e330e"><code>fc93520</code></a></li> <li>[dist] Regenerate package-lock.json. <a href="https://github.com/http-party/node-http-proxy/commit/16d4f8a95162b2e2e4ee6657c500f1208c044b2d"><code>16d4f8a</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/http-party/node-http-proxy/commit/9b96cd725127a024dabebec6c7ea8c807272223d"><code>9b96cd7</code></a> 1.18.1</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/335aeeba2f0c286dc89c402eeb76af47834c89a3"><code>335aeeb</code></a> Skip sending the proxyReq event when the expect header is present (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1447">#1447</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/dba39668ba4c9ad461316e834b2d64b77e1ca88e"><code>dba3966</code></a> Remove node6 support, add node12 to build (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1397">#1397</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/9bbe486c5efcc356fb4d189ef38eee275bbde345"><code>9bbe486</code></a> [dist] Version bump. 1.18.0</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/6e4bef4d1cd96e7a284717941e0fc274acbd3712"><code>6e4bef4</code></a> Added in auto-changelog module set to keepachangelog format (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1373">#1373</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/d05624167ce75e860770c13afeacec2ce0f67add"><code>d056241</code></a> fix 'Modify Response' readme section to avoid unnecessary array copying (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1300">#1300</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/244303b994525684e1ec8dff2e8055f89b62b1ee"><code>244303b</code></a> Fix incorrect target name for reverse proxy example (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1135">#1135</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/b4028ba78bc4616e6969e0e66b0fe4634849b68b"><code>b4028ba</code></a> Fix modify response middleware example (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1139">#1139</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/77a98159d2da0f20a03e2819c79662f36069f234"><code>77a9815</code></a> [dist] Update dependency async to v3 (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1359">#1359</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/c662f9ebcd8d623db374dbc7bef231b2b0af0c3a"><code>c662f9e</code></a> Fix path to local http-proxy in examples. (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1072">#1072</a>)</li> <li>Additional commits viewable in <a href="https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.1">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+11 -13

0 comment

1 changed file

dependabot[bot]

pr closed time in 15 days

push eventbrahmosjs/brahmos

dependabot[bot]

commit sha 3c0de77322b503ae0ed6d22ef299ae5dd2c38145

Bump http-proxy from 1.17.0 to 1.18.1 Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1. - [Release notes](https://github.com/http-party/node-http-proxy/releases) - [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md) - [Commits](https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 15 days

push eventbrahmosjs/brahmos

Vipul Bhardwaj

commit sha e95473ebdd6554f439b3edaaa23b359969fe586e

Feature Capture Event added suggested improvements capture added to removeEventListener and getEventName Made the appropriate changes Review Changes done

view details

vipulbhj

commit sha ffc37101c37a5c367d714ac268cde2044693bcb7

Added reference to React Source

view details

push time in 15 days

PR merged brahmosjs/brahmos

Feature Capture Event

First draft implementation for #33

+10 -6

0 comment

2 changed files

vipulbhj

pr closed time in 15 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 export function getNodeName(node) { }  export function getEventName(attrName) {-  return attrName.replace('on', '').toLowerCase();+  const isSpecialCaptureEvent = attrName.substr(-7) === 'Capture' && attrName.substr(-14, 7) !== 'Pointer';+  if(isSpecialCaptureEvent) {+    // Capture -> 7 , on -> 2 ;  7 + 2 = 9;+    return attrName.replace('on', '').substr(0, (attrName.length - 9)).toLowerCase();+  }+  return attrName.replace(/^on(.*?)(Capture$|$)/, '$1').toLowerCase();
if (isCapture) attrName = attrName.replace(/Capture$)/, '');
return attrName.replace('on', '').toLowerCase();
vipulbhj

comment created time in 15 days

PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {     // get patched event handler     const patchedHandler = getPatchedEventHandler(node, attrName, attrValue);     -    const isCaptureEvent = attrName.endWith('Capture');+    const isCaptureEvent = attrName.substr(-7) === "Capture";

This will break for the special case. We can use the logic below here and pass isCaptureEvent as param to getEventName, just check if getEventName is getting called from anywhere else.

vipulbhj

comment created time in 16 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 export function getNodeName(node) { }  export function getEventName(attrName) {+  const isSpecialCaptureEvent = attrName.substr(-7) === 'Capture' && attrName.substr(-14, 7) !== 'Pointer';

This logic we should put on updateAttribute method to find isCaptureEvent event. This case handles both the normal capture case and special case. So it's not just the isSpecialCaptureEvent

And we can pass isCaptureEvent as param in this function.

vipulbhj

comment created time in 16 days

PullRequestReviewEvent
PullRequestReviewEvent

issue openedbrahmosjs/brahmos

Add static types

Just writing down my thought process for reference.

Testing Typescript and Flow type both for adding types in Brahmos.

Currently, Brahmos support typescript but only with Babel ecosystem, the main reason behind that we current have babel plugin to transform JSX into tagged template literals.

Current for support of typescript the babel config looks like this:

module.exports = {
  presets: [['@babel/preset-env']],
  plugins: [
    ['@babel/plugin-transform-typescript', { isTSX: true, onlyRemoveTypeImports: true }],
    'brahmos',
    // ...
  ],
};

Plus React type definition (flowtypes / typescript) can be used alongside with Brahmos, as the API for both is same, though you have to point to React types plus you will see React in name rather than Brahmos. Which should be okay for start, until Brahmos publishes it own type definition.

Now coming back to a decision on building Brahmos lib itself with typescript or flow types for static typing.

With typescript the problem is

  • Brahmos doesn't natively support typescript, but only with babel ecosystem. If Brahmos itself is built with typescript it may raise confusion that it supports typescript natively.
  • All file name need to be changed to .ts or .tsx .

As currently, the requirement of typescript is just for defining the static type, I am inclining toward flowtype for the statically typing the Brahmos.

I personally don't see a lot of benefit of using typescript right away. But I would keep this discussion open to learn more if typescript is proving better given only the static typing use case.

created time in 16 days

issue commentbrahmosjs/brahmos

Interview request

Thanks @brucou And sure, I would love to do that.

brucou

comment created time in 16 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {      // get patched event handler     const patchedHandler = getPatchedEventHandler(node, attrName, attrValue);+    +    const isCaptureEvent = attrName.endWith('Capture');

We can handle it in the same way. https://www.measurethat.net/Benchmarks/Show/9484/0/substr-vs-endswith

We will also have to take care of getEventName method for this

vipulbhj

comment created time in 17 days

PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {      // get patched event handler     const patchedHandler = getPatchedEventHandler(node, attrName, attrValue);+    +    const isCaptureEvent = attrName.endWith('Capture');

We will also need to add support for onGotPointerCapture, and onLostPointerCapture as well. React does handle it. Also, we can have a capture phase on these events, so this becomes more tricky. You can try the below logic in browser.

const para = document.querySelector('p');

para.addEventListener('gotpointercapture', () => {
  console.log('I\'ve been captured!')
}, false);

para.addEventListener('pointerdown', (event) => {
  para.setPointerCapture(event.pointerId);
});

document.body.addEventListener('gotpointercapture', () => {
  console.log('budy I\'ve been captured!')
}, false);

document.body.addEventListener('pointerdown', (event) => {
  para.setPointerCapture(event.pointerId);
});

So ideally even this onGotPointerCaptureCapture and onLostPointerCaptureCapture is valid event.

We will have to add Edge case for this two events.

vipulbhj

comment created time in 18 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {      // get patched event handler     const patchedHandler = getPatchedEventHandler(node, attrName, attrValue);+    +    const isCaptureEvent = attrName.endWith('Capture');

Looks like this recently got fixed in React as well. https://github.com/facebook/react/blob/master/packages/react-dom/src/events/DOMPluginEventSystem.js#L498

vipulbhj

comment created time in 18 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {      // get patched event handler     const patchedHandler = getPatchedEventHandler(node, attrName, attrValue);+    +    const isCaptureEvent = attrName.endWith('Capture');
    const isCaptureEvent = attrName.endsWith('Capture');
vipulbhj

comment created time in 18 days

PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 export function getNodeName(node) { }  export function getEventName(attrName) {-  return attrName.replace('on', '').toLowerCase();+  let eventName = attrName.replace('on', '').toLowerCase();+  if(eventName.endsWith('capture')) return eventName.replace('capture', '');

Also you can replace on and capture together using regex.

.replace(/^on(.*?)(Capture$|$)/, '$1')
vipulbhj

comment created time in 19 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 export function getNodeName(node) { }  export function getEventName(attrName) {-  return attrName.replace('on', '').toLowerCase();+  let eventName = attrName.replace('on', '').toLowerCase();+  if(eventName.endsWith('capture')) return eventName.replace('capture', '');

Actually there are two, gotpointercapture and lostpointercapture. https://developer.mozilla.org/en-US/docs/Web/Events

I don't see preact handling it. https://github.com/preactjs/preact/blob/master/src/diff/props.js#L92

Have to check react if they handle it differently

vipulbhj

comment created time in 19 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {        // if the event is getting added first time add a listener     } else if (!oldAttrValue && attrValue) {-      node.addEventListener(eventName, patchedHandler);+      let isCaptureEvent = attrName.endWith('Capture');

Define it outside, so you can user it to remove the event listener as well.

vipulbhj

comment created time in 19 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {        // if the event is getting added first time add a listener     } else if (!oldAttrValue && attrValue) {-      node.addEventListener(eventName, patchedHandler);+      let isCaptureEvent = eventName.endWith('Capture');+      if(isCaptureEvent) {+        let cleanedEventName = eventName.replace('Capture', '');+        node.addEventListener(cleanedEventName, patchedHandler);+      } else {

No need to have if/else, we can just do.

node.addEventListener(cleanedEventName, patchedHandler, isCaptureEvent);

If it is false it will assign it in bubble phase.

vipulbhj

comment created time in 19 days

Pull request review commentbrahmosjs/brahmos

Feature Capture Event

 function setAttribute(node, attrName, attrValue, oldAttrValue, isSvgAttribute) {        // if the event is getting added first time add a listener     } else if (!oldAttrValue && attrValue) {-      node.addEventListener(eventName, patchedHandler);+      let isCaptureEvent = eventName.endWith('Capture');+      if(isCaptureEvent) {+        let cleanedEventName = eventName.replace('Capture', '');

As we are passing attrName for mapping patched handler. We can do this logic inside getEventName only.

vipulbhj

comment created time in 19 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventbrahmosjs/brahmos

Sasha Rudan

commit sha cbf49852f636a659b460f4bfa231ce2cd57d2b9f

Updated typo in README.md removed `has`

view details

push time in 19 days

PR merged brahmosjs/brahmos

Updated typo in README.md

removed has

+1 -1

0 comment

1 changed file

mprinc

pr closed time in 19 days

startedexcalidraw/excalidraw-embed

started time in 20 days

startedjamesgeorge007/cli-prompts-test

started time in 21 days

startedjamesgeorge007/github-activity-readme

started time in 23 days

pull request comments-yadav/react-number-format

Allow null value in TypeScript typing

@sarnendumukherjee I think passing null will break. https://github.com/s-yadav/react-number-format/blob/master/src/number_format.js#L152

We should check for null on this line as well. Would you like to give a PR for this?

erikpuk

comment created time in 24 days

issue comments-yadav/iv-viewer

Canvas support?

Hey, @s4m0r4m4. Sorry missed replying earlier on this. Currently, it does not support canvas. I would like to understand the use case for HTMLCanvasElement.

Ideally, you can get the data URL from canvas canvas.toDataURL() and pass the data URL as img url on the load method. https://github.com/s-yadav/iv-viewer#instance-methods

s4m0r4m4

comment created time in 24 days

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 675b378e91a94f69ff196170adf504c0ce4705b5

Update README.md

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 6d9ad28f519357a4d06173da8ecf922402b8cb2a

Update README.md

view details

push time in a month

startedKuroLabs/stegcloak

started time in a month

push eventbrahmosjs/brahmos

dependabot[bot]

commit sha 5dc42f8b6dae869ddf8beb43fcd5e95285d2e237

Define updatType and updateSource in host fiber

view details

push time in a month

PR merged brahmosjs/brahmos

Bump elliptic from 6.5.0 to 6.5.3 dependencies

Bumps elliptic from 6.5.0 to 6.5.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/8647803dc3d90506aa03021737f7b061ba959ae1"><code>8647803</code></a> 6.5.3</li> <li><a href="https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"><code>856fe4d</code></a> signature: prevent malleability and overflows</li> <li><a href="https://github.com/indutny/elliptic/commit/60489415e545efdfd3010ae74b9726facbf08ca8"><code>6048941</code></a> 6.5.2</li> <li><a href="https://github.com/indutny/elliptic/commit/9984964457c9f8a63b91b01ea103260417eca237"><code>9984964</code></a> package: bump dependencies</li> <li><a href="https://github.com/indutny/elliptic/commit/ec735edde187a43693197f6fa3667ceade751a3a"><code>ec735ed</code></a> utils: leak less information in <code>getNAF()</code></li> <li><a href="https://github.com/indutny/elliptic/commit/71e4e8e2f5b8f0bdbfbe106c72cc9fbc746d3d60"><code>71e4e8e</code></a> 6.5.1</li> <li><a href="https://github.com/indutny/elliptic/commit/7ec66ffa255079260126d87b1762a59ea10de5ea"><code>7ec66ff</code></a> short: add infinity check before multiplying</li> <li><a href="https://github.com/indutny/elliptic/commit/ee7970b92f388e981d694be0436c4c8036b5d36c"><code>ee7970b</code></a> travis: really move on</li> <li><a href="https://github.com/indutny/elliptic/commit/637d0216b58de7edee4f3eb5641295ac323acadb"><code>637d021</code></a> travis: move on</li> <li><a href="https://github.com/indutny/elliptic/commit/5ed0babb6467cd8575a9218265473fda926d9d42"><code>5ed0bab</code></a> package: update deps</li> <li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.0...v6.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+14 -428

0 comment

3 changed files

dependabot[bot]

pr closed time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha af3346f2cae55f81841b5b729730088935a60334

- updated demo and readme

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 5c508555c48c2979c89aee6f73d7ebb7885ab844

Update suspense with deferred value example

view details

Sudhanshu Yadav

commit sha 5b261f48089061efc7e72eea642a6a0613c6fe69

- Use combination of setTimeout and requestCallback on schedular. - Fix import in Children.js

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 15cfad22a3969565edd13cd790d9acc283d4b323

Update suspense with deferred value example

view details

push time in a month

push eventbrahmosjs/brahmos

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 44f973f45459b42f5c3e75b9da386c87bede0e74

Increase timeout in suspense with deferred value example

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha b87330ad003d3386817cbb49c0e94b1b7a8700cb

- [WIP] Iteration over recursion - change nodes key to domNodes in templateNode. nodes will call only a brahmos node

view details

Sudhanshu Yadav

commit sha a182b6b5dc78b0231c7a71a23c471e206778645d

- [WIP] Async rendering.

view details

Sudhanshu Yadav

commit sha 4a395736853d61c887a675b0efbb6202d93c5356

Removed useless code

view details

Sudhanshu Yadav

commit sha eb997e146f86559fb13e8273de935b0a164a0994

[WIP] Async rendering. Fix errors.

view details

Sudhanshu Yadav

commit sha dec25d5cb82b52dfddf8ac0849aeda026ce8badb

WIP Fiber architecture

view details

Sudhanshu Yadav

commit sha b92f01a9a5d42988af79e96de2e568358727b35d

WIP Fiber architecture

view details

Sudhanshu Yadav

commit sha 57ba5cebd240e5955df4977f6f16f88ba6bf64a2

Use time to keep track of processed fibers

view details

Sudhanshu Yadav

commit sha 8b8f0473608919813987cd47027da0263f1552dc

Multi transition support

view details

Sudhanshu Yadav

commit sha 42267edb4405b0e5ff983fc14c79bf0db01e5160

WIP Suspense and transition - Fixed bugs - Fixed circular dependencies

view details

Sudhanshu Yadav

commit sha 76d31b2f64b886f64aa7f0b227ddfb210bdc77a1

WIP Suspense with data fetch and bug fixes on fiber arch

view details

Sudhanshu Yadav

commit sha e8df0223ea36f4a8eb98f71d3c9f013c4b0e1436

Fix suspense bug. Suspense resolve not getting triggered after transition complete

view details

Sudhanshu Yadav

commit sha 869ced606b46f2910050c4733dfeac774e602de1

Fix suspense bug. On retrying suspense fiber we were not resetting child fiber

view details

Sudhanshu Yadav

commit sha 4b1dfc1c057e13a2515ed5a9cf46a39cfa36211c

Add support for lazy component to start fetching while the elements are created, instead of when they are rendered

view details

Sudhanshu Yadav

commit sha d763e6542e319750e5ccd3e8ee68e455ed035a1f

No need to maintain array of suspenders, at a time for a suspense there can be only one suspender.

view details

Sudhanshu Yadav

commit sha 02c1cebcc5ceaa3c16974ecd750f0e372e463d25

Failed trial for Suspense manager. Trying a new approach.

view details

Sudhanshu Yadav

commit sha d7794069b8a1dc4a883cc8641c05f3439ada64bd

Suspense implementation refactor

view details

Sudhanshu Yadav

commit sha b1f3b67ccc6abb5e180569915e0cff8dc2295c97

- Fixed tag slots mapping issue with old fibers. - Move update source related constants to config file. - Code refactor - Fixed issue with cloning children fiber in cloneChildren fiber. - Fix transition issue related to update pending state. - New approach to handle Suspense with transition.

view details

Sudhanshu Yadav

commit sha a094f5562ee1f06b1a62afb739f7fb035c8ac751

Fix bug related to mutating the current fiber tree sibling during deferred rendering which was causing element to duplicate.

view details

Sudhanshu Yadav

commit sha e7e647075747466553bd4c3c3cba830eebbe4db9

- If a transition is completed and it does not have effect to commit, remove the transition. - If there is nothing to commit it should not attempt committing on deferred mode. - Fix issue related to nextEffect getting picked from alternate (stale) fiber which was trying to run effect loop on stale fiber.

view details

Sudhanshu Yadav

commit sha 4f4a979a381f12fd914c00d84db0bf37c4e8f9fa

Go back to old top to down suspense resolve

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha ab01348c5fb35135afc8120b368bacb034f04e76

- Added new examples. - updated examples to be more informative - Design change on examples

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 96ebd39d06f91b2fcd14d164a377777d01400faf

- Provide error boundary stack information

view details

Sudhanshu Yadav

commit sha bb6269746852be5b665fb106a209cc876d15d42c

- Added Children APIs, sValidElement and cloneElement API (unstable right now) - Support multi param children in createElement. - Clean effect before commit and not before render. - Fixed regression bug with context API

view details

Sudhanshu Yadav

commit sha b81f49eff13cef31e2dfa832a9262eb0a93c4c4d

For update caused by event do rerender even if the value is not changed on setState from useState hook.

view details

Sudhanshu Yadav

commit sha 963c96ea4305d07156877b7acb7ed8c3971d7060

- Added new examples. - updated examples to be more informative - Design change on examples

view details

push time in a month

push eventbrahmosjs/babel-plugin-brahmos

Sudhanshu Yadav

commit sha 21773e2b3370715d2e3ff1ca5610cd101963f9ca

- Don't put closing tag on self closing tags.

view details

push time in a month

startedjgthms/bulma

started time in a month

push eventbrahmosjs/babel-plugin-brahmos

Sudhanshu Yadav

commit sha fd6ce2322fcda8dca71f287438b4b6d5501fcf99

Revert "Wrap jsx node expressions with `Brahmos.expression()` call. This is required for reusing same node on multiple places." This reverts commit 5017cc97cc857c61b9abe0d6871295467fcee879. Wrapping is no longer required.

view details

Sudhanshu Yadav

commit sha afbd9c5e80cbcdf494f7692db19582e706e288dd

Release new version

view details

push time in a month

push eventbrahmosjs/babel-plugin-brahmos

dependabot[bot]

commit sha 0600ae8e8ec9b34791fb537d4022113d98b2ba58

Bump acorn from 6.1.1 to 6.4.1 Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.1 to 6.4.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/6.1.1...6.4.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

Sudhanshu Yadav

commit sha 84096e40fdbb2e74d6c56583100ca9a9a639e29d

Merge pull request #5 from brahmosjs/dependabot/npm_and_yarn/acorn-6.4.1 Bump acorn from 6.1.1 to 6.4.1

view details

push time in a month

PR merged brahmosjs/babel-plugin-brahmos

Bump acorn from 6.1.1 to 6.4.1 dependencies

Bumps acorn from 6.1.1 to 6.4.1. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/acornjs/acorn/commit/9a2e9b6678e243d66846b91179d650d28453e70c"><code>9a2e9b6</code></a> Mark version 6.4.1</li> <li><a href="https://github.com/acornjs/acorn/commit/90a9548ea0ce351b54f956e2c4ed27cca9631284"><code>90a9548</code></a> More rigorously check surrogate pairs in regexp validator</li> <li><a href="https://github.com/acornjs/acorn/commit/df0cf1a3e2b1a51a26c14984dc0f5412b7151b10"><code>df0cf1a</code></a> Mark version 6.4.0</li> <li><a href="https://github.com/acornjs/acorn/commit/53034126864b492da4e278628bb972cb2a9313d4"><code>5303412</code></a> Also export Parser via Parser.acorn</li> <li><a href="https://github.com/acornjs/acorn/commit/efe273e70123449a458157dbf578afaf109a49ab"><code>efe273e</code></a> give token types and etc to plugins</li> <li><a href="https://github.com/acornjs/acorn/commit/ac6decb94a3aa4eee99230fdaf5883dfaafe8479"><code>ac6decb</code></a> Mark version 6.3.0</li> <li><a href="https://github.com/acornjs/acorn/commit/7e9817d17639d95cc6dbacfde734a0626b2a7dea"><code>7e9817d</code></a> Allow sourceType: module even with ecmaVersion < 6</li> <li><a href="https://github.com/acornjs/acorn/commit/e2b8cc087386eccc2ad6fd4a02b4257833557cb3"><code>e2b8cc0</code></a> Fix broken parsing of new expressions when allowReserved=="never"</li> <li><a href="https://github.com/acornjs/acorn/commit/1555c528855b10320ce98b4154906d7898c92990"><code>1555c52</code></a> Update acorn.d.ts</li> <li><a href="https://github.com/acornjs/acorn/commit/77c20fa2c2f490e646b67e6a0ff7e75fb54ab6c8"><code>77c20fa</code></a> Mark version 6.2.1</li> <li>Additional commits viewable in <a href="https://github.com/acornjs/acorn/compare/6.1.1...6.4.1">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

push eventbrahmosjs/babel-plugin-brahmos

dependabot[bot]

commit sha 0eff69ad5f267f8c6f5c1c30b04ef450035485b2

Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com>

view details

Sudhanshu Yadav

commit sha 3d237351dbd012f0f0e0183f5acfdeed14c70d49

Merge pull request #6 from brahmosjs/dependabot/npm_and_yarn/lodash-4.17.19 Bump lodash from 4.17.15 to 4.17.19

view details

push time in a month

PR merged brahmosjs/babel-plugin-brahmos

Bump lodash from 4.17.15 to 4.17.19 dependencies

Bumps lodash from 4.17.15 to 4.17.19. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lodash/lodash/releases">lodash's releases</a>.</em></p> <blockquote> <h2>4.17.16</h2> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/d7fbc52ee0466a6d248f047b5d5c3e6d1e099056"><code>d7fbc52</code></a> Bump to v4.17.19</li> <li><a href="https://github.com/lodash/lodash/commit/2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6"><code>2e1c0f2</code></a> Add npm-package</li> <li><a href="https://github.com/lodash/lodash/commit/1b6c282299f4e0271f932b466c67f0f822aa308e"><code>1b6c282</code></a> Bump to v4.17.18</li> <li><a href="https://github.com/lodash/lodash/commit/a370ac81408de2da77a82b3c4b61a01a3b9c2fac"><code>a370ac8</code></a> Bump to v4.17.17</li> <li><a href="https://github.com/lodash/lodash/commit/1144918f3578a84fcc4986da9b806e63a6175cbb"><code>1144918</code></a> Rebuild lodash and docs</li> <li><a href="https://github.com/lodash/lodash/commit/3a3b0fd339c2109563f7e8167dc95265ed82ef3e"><code>3a3b0fd</code></a> Bump to v4.17.16</li> <li><a href="https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12"><code>c84fe82</code></a> fix(zipObjectDeep): prototype pollution (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4759">#4759</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/e7b28ea6cb17b4ca021e7c9d66218c8c89782f32"><code>e7b28ea</code></a> Sanitize sourceURL so it cannot affect evaled code (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4518">#4518</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/0cec225778d4ac26c2bac95031ecc92a94f08bbb"><code>0cec225</code></a> Fix lodash.isEqual for circular references (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4320">#4320</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4515">#4515</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/94c3a8133cb4fcdb50db72b4fd14dd884b195cd5"><code>94c3a81</code></a> Document matches* shorthands for over* methods (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4510">#4510</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4514">#4514</a>)</li> <li>Additional commits viewable in <a href="https://github.com/lodash/lodash/compare/4.17.15...4.17.19">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~mathias">mathias</a>, a new releaser for lodash since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

issue commentbrahmosjs/brahmos

Handle capture events

@vipulbhj Sure, let me know whenever you want to discuss. We can connect on the slack channel.

s-yadav

comment created time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha e2d8f6e080710179678aa2adebf2a3cae1244489

- Fix bug and behaviour of revealOrder in SuspenseList. - Make sure a Suspense is revealed in provided revealOrder even thought it does not suspend. - Always take the lastState from sync hooks in setState. - Fixed bug with class compoennt deferred state being holded in instance. This can lead to some state pointing to uncommitted state. - Fix bug with tearDown where same fiber getting marked twice for teardown. - Check if node is not detached before removing it.

view details

Sudhanshu Yadav

commit sha 446cc787e61a9533de44ed50f6166dea4d087ed2

Updated examples and added another useDeferredValue example

view details

push time in a month

push eventbrahmosjs/brahmos

Sudhanshu Yadav

commit sha 27c3d63ba5b4461fa433639b44a24c62038af288

Update scheduler with new infra. - Use combination of MessageChanel and requestIdleCalback, and heuristic frame boundaries. - Tune timings to better CPU utilization, allowing background work and better rendering percivied experience

view details

push time in a month

Pull request review commentdahliacreative/react-collapsable

Some optimisations on the component

-import React, { useRef, useState, useEffect } from 'react'-import PropTypes from 'prop-types'+import React, { useRef, useState, useEffect } from 'react';+import PropTypes from 'prop-types'; -const Collapsable = ({+const Collapsible = ({+  isOpen,+  minAnimationDuration,+  maxAnimationDuration,+  speedDivider,+  easing,+  children,+  keepChildrenOnClose,+  ...restProps+}) => {+  const content = useRef();+  const [state, setState] = useState({+    height: isOpen ? 'auto' : 0,+    speed: 0,+  });++  const [effectiveChildren, setChildren] = useState(children);

Storing the children in state seems a bit over the top, could we not just add another option to state like showChildren: boolean and combine with keepChildrenOnClose to conditionally add the children in the JSX?

I guess adding showChildren will be just an extra prop. As most of the time lib user will pass isOpen value on showChildren. Also, it can't be handled outside as the effectiveChildren is set to null only after transition is finished. so then you will have to pass an onTransitionComplete prop, or onOpen/onClose prop to parent.

Also, adding / removing children when opening / closing is causing more work for react as it's having to add / remove them from the DOM, so do you have any evidence of performance gains?

So, this comes down to this question. -> Do you want to pretender everything so when a user performs an actions the transition is quick. -> Do you want to delegate the work when the user want to perform an action.

On the first approach, you are paying the cost of rendering upfront for some content user may never see, probably on page load. Plus as other things are going during page rendering, you are also adding some of the rendering time for an offscreen content. This is valid on the update as well, why we need to do reconciliation (VDOM diffing) on offscreen content.

And on the second approach as onClick, you are doing relatively less work by shifting your work to onClick which will not be noticed. I feel this is a valid tradeoff to improve onscreen content performance. Sometime you may need a little bit of tinkering, but that you can do with keepChildrenOnClose prop.

s-yadav

comment created time in a month

Pull request review commentdahliacreative/react-collapsable

Some optimisations on the component

-import React, { useRef, useState, useEffect } from 'react'-import PropTypes from 'prop-types'+import React, { useRef, useState, useEffect } from 'react';+import PropTypes from 'prop-types'; -const Collapsable = ({+const Collapsible = ({+  isOpen,+  minAnimationDuration,+  maxAnimationDuration,+  speedDivider,+  easing,+  children,+  keepChildrenOnClose,+  ...restProps+}) => {+  const content = useRef();+  const [state, setState] = useState({+    height: isOpen ? 'auto' : 0,+    speed: 0,+  });++  const [effectiveChildren, setChildren] = useState(children);++  const handleClose = () => {+    if (!isOpen) {+      content.current.style.visibility = 'hidden';++      if (!keepChildrenOnClose) {+        // remove child+        setChildren(null);+      }+    }+  };++  useEffect(() => {+    if (isOpen) {+      const contentHeight = content.current.scrollHeight;+      const time = contentHeight / speedDivider;+      const animation =+        time < minAnimationDuration+          ? minAnimationDuration+          : time > maxAnimationDuration+          ? maxAnimationDuration+          : time;+      content.current.style.visibility = 'visible';+      setChildren(children);+      setState({+        ...state,+        height: contentHeight,+        speed: animation,+      });+    } else {+      setState({+        ...state,+        height: 0,+      });+    }+  }, [     isOpen,     minAnimationDuration,     maxAnimationDuration,     speedDivider,-    easing,-    children-}) => {-    const content = useRef()-    const [state, setState] = useState({-        height: isOpen ? 'auto' : 0,-        speed: 0-    })--    useEffect(() => {-        if (isOpen) {-            const contentHeight = content.current.scrollHeight-            const time = contentHeight / speedDivider-            const animation =-                time < minAnimationDuration-                    ? minAnimationDuration-                    : time > maxAnimationDuration-                    ? maxAnimationDuration-                    : time-            content.current.style.visibility = 'visible'-            setState({-                ...state,-                height: contentHeight,-                speed: animation-            })-        } else {-            setState({-                ...state,-                height: 0-            })-            setTimeout(() => {-                content.current.style.visibility = 'hidden'-            }, state.speed * speedDivider)-        }-    }, [-        isOpen,-        minAnimationDuration,-        maxAnimationDuration,-        speedDivider,-        children-    ])+    children,+    effectiveChildren,+  ]); -    return (-        <div-            style={{-                overflow: 'hidden',-                height: state.height,-                transition: `height ${state.speed}s ${easing}`-            }}>-            <div ref={content} style={{ overflow: 'auto' }}>-                {children}-            </div>-        </div>-    )-}+  return (+    <div+      {...restProps}

My opinion: This can be mentioned in the document. Forwarding non-component specific props to the root element can avoid the extra containers in dom elements if possible.

This actual use cases can definitely be solved other way as well, like. So I don't have a strong opinion on this. I will revert it back.

s-yadav

comment created time in a month

PullRequestReviewEvent
more