profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/nemanja-tosic/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Nemanja Tosic nemanja-tosic Belgrade

nemanja-tosic/angular2-schema-form 0

HTML form generation based on JSON Schema

nemanja-tosic/ansible-role-backup 0

Ansible Role - Backup for simple servers

nemanja-tosic/ansible-role-wordpress 0

Ansible Role: WordPress

nemanja-tosic/bowling-kata-ts 0

TypeScript, Mocha, Chai, Yarn (Monorepo, PnP) Bowling Kata.

nemanja-tosic/GameQ 0

A PHP Gameserver Status Query Library

nemanja-tosic/material2 0

Material Design components for Angular

nemanja-tosic/node 0

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

nemanja-tosic/ravendb-nodejs-migrations 0

A database migration tool for RavenDB in Node

Pull request review commentianstormtaylor/slate

Fix erroneous text after native insert

 export const NATIVE_OPERATIONS: WeakMap<Editor, Operation[]> = new WeakMap()  * @param {Editor} editor - Editor on which the operations are being applied  * @param {callback} fn - Function containing .exec calls which will be queued as native  */-export const asNative = (editor: Editor, fn: () => void) => {+export const asNative = (+  editor: Editor,+  fn: () => void,+  { onFlushed }: { onFlushed?: () => void } = {}+) => {+  const isNative = AS_NATIVE.get(editor)+   AS_NATIVE.set(editor, true)-  fn()-  AS_NATIVE.set(editor, false)+  try {+    fn()+  } finally {+    if (isNative !== undefined) {+      AS_NATIVE.set(editor, isNative)+    }+  }++  if (!NATIVE_OPERATIONS.get(editor)) {+    onFlushed?.()+  }

The important bit, everything else is a refactor (boy scout rule).

nemanja-tosic

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentianstormtaylor/slate

Fix erroneous text after native insert

 export const NATIVE_OPERATIONS: WeakMap<Editor, Operation[]> = new WeakMap()  * @param {Editor} editor - Editor on which the operations are being applied  * @param {callback} fn - Function containing .exec calls which will be queued as native  */-export const asNative = (editor: Editor, fn: () => void) => {+export const asNative = (+  editor: Editor,+  fn: () => void,+  { onFlushed }: { onFlushed?: () => void } = {}+) => {+  const isNative = AS_NATIVE.get(editor)+   AS_NATIVE.set(editor, true)-  fn()-  AS_NATIVE.set(editor, false)+  try {+    fn()+  } finally {+    if (isNative !== undefined) {+      AS_NATIVE.set(editor, isNative)+    }+  }++  if (!NATIVE_OPERATIONS.get(editor)) {

The important bit, everything else is a refactor (boy scout rule).

nemanja-tosic

comment created time in 4 days

PullRequestReviewEvent

PR opened ianstormtaylor/slate

Fix erroneous text after native insert

Issue

Fixes: #4527

Checks

  • [x] The new code matches the existing patterns and styles.
  • [x] The tests pass with yarn test.
  • [x] The linter passes with yarn lint. (Fix errors with yarn fix.)
  • [x] The relevant examples still work. (Run examples with yarn start.)
  • [x] You've added a changeset if changing functionality. (Add one with yarn changeset add.)
+31 -9

0 comment

3 changed files

pr created time in 4 days

push eventlivingspec/slate

Nemanja Tosic

commit sha f74c63e4be5e25d26ae390843a69d9cb4a690f41

Fix erroneous text after native insert

view details

push time in 4 days

push eventlivingspec/slate

Nemanja Tosic

commit sha 6d718b5b1b87e9e4f14cc9d9ea04bd0d6f1b78fa

Fix erroneous text after native insert

view details

push time in 4 days

create barnchlivingspec/slate

branch : fix-erroneous-text-after-native

created branch time in 4 days

issue commentianstormtaylor/slate

Text is always being inserted, even when using auto markdown

Tracked the issue down to https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/editable.tsx#L314 as part of #3888

churichard

comment created time in 4 days

Pull request review commentudecode/plate

Fix list delete forward

+---+'@udecode/plate-common': patch

What exactly do you mean?

nemanja-tosic

comment created time in 8 days

PullRequestReviewEvent

pull request commentudecode/plate

Fix list delete forward

One small suggestion for one of the new tests.

Applied the suggestions, good idea. Thanks!

nemanja-tosic

comment created time in 8 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha bc2b63beee459c29b6d098cc9af760879dadfc30

Apply suggestions from code review Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>

view details

push time in 8 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha 1e487db62ba3e5aecda0f05605ac51800f7ad9b0

Apply suggestions from code review Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>

view details

push time in 8 days

PR opened udecode/plate

Reviewers
Fix list delete forward

Description

Fix data loss on list delete forward. This was not implemented before, so nested lists were being deleted.

Example

Left current, right PR

Peek 2021-09-11 15-13

Notes

Have some extra refactorings i made during the process, not really needed but i believe they are useful. I can remove any extra work if needs be.

Checklist

  • [x] The new code matches the existing patterns and styles.
  • [x] The tests pass with yarn test.
  • [x] The linter passes with yarn lint. (Fix errors with yarn lint --fix.)
  • [x] The relevant examples still work: (Run examples with yarn docs.)
+323 -14

0 comment

9 changed files

pr created time in 8 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha 59093f60bad5e40d66826ecdbc1f8abb3a70a815

Fix list delete forward

view details

push time in 8 days

push eventlivingspec/slate-plugins

Karthikeyan Umapathi

commit sha 2e4cc5790ffca07dfa8e4c5a9082022ade776229

fix: mention & placeholder

view details

Karthikeyan Umapathi

commit sha 70c164262e2a9a8f52a450e93aa98042b8c2d2a2

feat(placeholder): Editor.isEmpty instead of Node.string

view details

Ziad Beyens

commit sha a985354ea3cb672cfe010cac59cacfd1b011483b

Create nice-ties-hope.md

view details

Ziad Beyens

commit sha ef14e861a400ceab9b7c090ce40c323fb89af057

Merge pull request #983 from udecode/karthik/fix/placeholder fix: mention & placeholder

view details

github-actions[bot]

commit sha 57a8f468173a889cfa9842fe7684e0b380c6ccd1

Version Packages

view details

Ziad Beyens

commit sha 23ed6bb4a18cd27d997e53f879e4ad54f6f11675

Merge pull request #984 from udecode/changeset-release/main Version Packages

view details

Nemanja Tosic

commit sha 2906a0a45fa00b38a1e71ed8e3c57203f429db4d

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

z0al

commit sha 990a5df3e0018ea68f336cdf95b026a78984bc68

fix(table): only mark first row as table header

view details

Dylan Schiemann

commit sha 5651aed704d69af85e2dd7d6f850e8dcabcd45f4

Add changeset

view details

z0al

commit sha e9f1e728db9f9dd5e2af37ef1c62ce751e831aca

fix(table): jump to next header cell on TAB

view details

z0al

commit sha 1244bcb748411e6291d635647c2053b115704eb9

chore: add a changeset

view details

Ziad Beyens

commit sha 46034794c18da0342e04c4195e1e76f578e4b061

Merge pull request #990 from livingspec/fix-nested-list-paste Fix nested list paste

view details

Ziad Beyens

commit sha 60ddfe65bfe6bf1062a510ee73c4086c0ff9b393

Merge pull request #994 from z0al/patch-1 fix(table): only mark first row as table header

view details

Ziad Beyens

commit sha 26b08b907e76fad0d9a9ce57c490540ec7826575

Merge pull request #997 from z0al/fix-next-header-cell fix(table): jump to next header cell on TAB

view details

github-actions[bot]

commit sha 114ed6b24b3985a07c6bfd413916ddc6f0b38e26

Version Packages

view details

Ziad Beyens

commit sha 6e9930a9f7632ef1e81285ac2ac1329735d6f1f7

Merge pull request #999 from udecode/changeset-release/main Version Packages

view details

Nemanja Tosic

commit sha 95a15136e020041b95b4c6ce4af66ae0ee8cd831

Fix list delete forward

view details

push time in 8 days

push eventlivingspec/slate-plugins

108EAA0A

commit sha 62b422ef5a72aa53fd1de4cfba50c683c38d675b

fix typo from link to list

view details

Ziad Beyens

commit sha 7884104eceba8603dd76b7d6a5c1f3e41aff7e16

Merge pull request #978 from 108EAA0A/patch-1 Fix docs typo

view details

Minh

commit sha 88ccb5d826b3577136a848beb1f53294a3bd992e

Allow PortalBody to be mounted on a custom container

view details

Ziad Beyens

commit sha 2c46e8148b22fdb1170e580ce101ce301cc2e088

Create shy-bugs-shave.md

view details

Ziad Beyens

commit sha a1600e5f8cf1a1b4aa6a88048063431ecafbf766

Create shy-bugs-shave-2.md

view details

Ziad Beyens

commit sha 03f2acdd1b34d1e4e574bcf296ae5b4796930c9a

Create shy-bugs-shave-3.md

view details

Ziad Beyens

commit sha d7d4b4acea65beefdf2a47a09517bfe3476c22eb

Update shy-bugs-shave.md

view details

Ziad Beyens

commit sha d54c25e4df711fe44da679f1175256ed2714274c

Update shy-bugs-shave.md

view details

Ziad Beyens

commit sha 1ef6fc4cd26b4e2dc9d3db9f753ad9e1b30d2112

Merge pull request #980 from cungminh2710/minhc/add-portal-element Allow PortalBody to be mounted on a custom container

view details

github-actions[bot]

commit sha 46beed3f6b3848a5b69c11a262fb9ae37571f80b

Version Packages

view details

Ziad Beyens

commit sha 90f5734185d1b5cfa7e6ac486dd4a8a36580fc1d

Merge pull request #981 from udecode/changeset-release/main Version Packages

view details

Nemanja Tosic

commit sha d5e874cda2eb1bd7479e83c69c9b3c00a993a8ec

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

Nemanja Tosic

commit sha c404823f94f68d7a7d369dc87d0ebc6cb35a2484

Fix list delete forward

view details

Nemanja Tosic

commit sha ffd318e44a51e15d7d2365427e860c2c595a8ac9

Fix list delete forward

view details

push time in 8 days

Pull request review commentudecode/plate

Fix nested list paste

 import { findNode } from '@udecode/plate-common'; import {   getPlatePluginOptions,+  PlatePluginOptions,   SPEditor,   TDescendant, } from '@udecode/plate-core';-import { Path, Transforms } from 'slate';+import { Node, NodeEntry, Path, Transforms } from 'slate'; import { ELEMENT_LI, ELEMENT_OL, ELEMENT_UL } from './defaults';  export const getListInsertFragment = (editor: SPEditor) => {   const { insertFragment } = editor; -  return (fragment: TDescendant[]) => {-    const li = getPlatePluginOptions(editor, ELEMENT_LI);-    const ul = getPlatePluginOptions(editor, ELEMENT_UL);-    const ol = getPlatePluginOptions(editor, ELEMENT_OL);+  const li = getPlatePluginOptions(editor, ELEMENT_LI);+  const ul = getPlatePluginOptions(editor, ELEMENT_UL);+  const ol = getPlatePluginOptions(editor, ELEMENT_OL); -    const liEntry = findNode(editor, { match: { type: li.type } });+  const isListRoot = (node: TDescendant): boolean =>+    [ul.type, ol.type].includes(node.type); -    let filtered: TDescendant[] = [];+  const getFirstAncestorOfType = (+    root: TDescendant,+    entry: NodeEntry,+    { type }: PlatePluginOptions+  ): NodeEntry<TDescendant> => {+    let ancestor: Path = Path.parent(entry[1]);+    while ((Node.get(root, ancestor) as TDescendant).type !== type) {

There should be no undefined case - Path.parent should throw when there is no parent, so i believe this should be safe :thinking: Although, i didn't promote the function as i feel there is a better way about it.

nemanja-tosic

comment created time in 9 days

PullRequestReviewEvent

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha 2906a0a45fa00b38a1e71ed8e3c57203f429db4d

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

Nemanja Tosic

commit sha 685a65fc0a96aa529591c218f27a082f17e01fda

Fix list delete forward

view details

push time in 10 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha e48a865b5ef6a48d19022a3e8706aa742b3b83ff

Fix list delete forward

view details

push time in 10 days

create barnchlivingspec/slate-plugins

branch : fix-list-delete-forward

created branch time in 10 days

push eventnemanja-tosic/ravendb-nodejs-migrations

Nemanja Tosic

commit sha 5432c9ba045ac226001ba06a2573bfc01e971fd8

Update files list

view details

Nemanja Tosic

commit sha 6ed118eb6593b11221582d0b2acb84b15104fb4c

0.4.2

view details

push time in 12 days

push eventnemanja-tosic/ravendb-nodejs-migrations

Nemanja Tosic

commit sha e658b34d8d6421297869929f62f94ee1f17e5776

Add yarn version plugin

view details

Nemanja Tosic

commit sha 632b2f2e0111f119426dc0e688158b79eb95162b

0.4.2

view details

push time in 12 days

PR opened udecode/plate

Reviewers
Fix nested list paste

Insert all nested list items next to the lowest li in selection.

Description

The current logic inserts lis next to top level li, and fails to insert nested lis altogether. See example for more details.

Example

Peek 2021-09-07 21-41

Notes

  • refactored findNode to use Editor.nodes, as it appears to have been doing the same thing, but was missing certain functionality from Editor.nodes such as mode
  • open to suggestions on getFirstAncestorOfType

Checklist

  • [x] The new code matches the existing patterns and styles.
  • [x] The tests pass with yarn test.
  • [x] The linter passes with yarn lint. (Fix errors with yarn lint --fix.)
  • [x] The relevant examples still work: (Run examples with yarn docs.)
+150 -73

0 comment

4 changed files

pr created time in 12 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha 2906a0a45fa00b38a1e71ed8e3c57203f429db4d

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

push time in 12 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha b4d20aeaeeff4540ac00ebc7c53bafec99264a58

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

push time in 12 days

push eventlivingspec/slate-plugins

Nemanja Tosic

commit sha 7f3c2849e2817cb7b3c1c50010277cda1b10997a

Fix nested list paste Insert all nested list items next to the lowest li in selection.

view details

push time in 12 days

push eventnemanja-tosic/ravendb-nodejs-migrations

Nemanja Tosic

commit sha 46f216b26378b92ec6fdb55be0e757a0bcc7ef0c

Fix build

view details

push time in 12 days