profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/sammkj/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.
Daniel Sam sammkj Kuala Lumpur, Malaysia Hold my VSCode.

paypal/glamorous 3689

DEPRECATED: 💄 Maintainable CSS with React

sammkj/apollo-tools 1

A set of tools for Apollo

sammkj/30-days-of-elixir 0

A walk through the Elixir language in 30 exercises.

sammkj/apollo-client 0

:rocket: A fully-featured, production ready caching GraphQL client for every server or UI framework

sammkj/apollo-server 0

:earth_africa: GraphQL server for Express, Connect, Hapi and Koa, written in TypeScript

sammkj/aws-lambda-resize-image 0

AWS Lambda function for resizing image

sammkj/CardStackEffects 0

Some effect inspiration for card stacks. The idea is to show animation ideas for positive (accept) or negative (reject) feedback on a generic card element.

startedalangpierce/sucrase

started time in a minute

startedwooorm/refractor

started time in an hour

release sindresorhus/is

v4.0.1

released time in an hour

created repositorychalk/chalk-template

created time in 2 hours

fork wojtekmach/livebook-1

Interactive and collaborative code notebooks - made with Phoenix LiveView.

fork in 3 hours

issue commentianstormtaylor/slate

onChange event not firing

Version 0.62.0. onChange not fired

Josh-McFarlin

comment created time in 3 hours

release sindresorhus/timed-out

v6.0.0

released time in 4 hours

release sindresorhus/titleize

v3.0.0

released time in 4 hours

release sindresorhus/to-readable-stream

v3.0.0

released time in 4 hours

created repositorytmeasday/test-app-20210422

created time in 5 hours

push eventabsinthe-graphql/absinthe

Ben Wilson

commit sha 414236f45f17587f04d134e6fda7fdf9ba58597d

formatting

view details

push time in 6 hours

push eventabsinthe-graphql/absinthe

Adam Lancaster

commit sha b36e2b4712dd962be0e9db20134bb20ddb31ab60

Minor trigger doc improvement

view details

Josef Richter

commit sha fed0bcbfd37615235200ccab5938c92e5258eb57

Update start.md dead link fix

view details

Ben Wilson

commit sha 7b55a8952729923e93679f52d5da4dc90a9b5234

Merge pull request #931 from josefrichter/patch-1 Update start.md

view details

Ben Wilson

commit sha 365d4a2fc756b09f22b367504d48c68161794b9c

more examples via tests

view details

Adam Lancaster

commit sha 048258ba886732dbe2cf6abda29dd6e095b17778

Update dataloader.md The linked examples are dead links now.

view details

Ben Wilson

commit sha 9f0b2058da213054dd6337ae66fedbf983b15e7c

Merge pull request #934 from Adzz/patch-2 Update dataloader.md

view details

Ben Wilson

commit sha 2cac415df1120b593d28910457839254d0d951a6

use a module attribute for the prototype

view details

Ben Wilson

commit sha b0195557dcc6cc7ba60d648b79c3a022cd6e0660

test case illustrating missing hydration

view details

Ben Wilson

commit sha b4cc3af7235441d82cf1010020d648ca12d93517

successfully hydrate union resolve type

view details

Ben Wilson

commit sha 97f16680cc84ddc59fe390c850e6a0a9e174e9d2

Merge pull request #938 from absinthe-graphql/union-resolve-type-hydration Union resolve type hydration

view details

Ben Wilson

commit sha 00601ffc3aac8f0ce989113330213ede70c66bbf

changelog entry

view details

Ben Wilson

commit sha 1fb94a4fba877aae12c10b9b35878b52224c1121

fix warnings

view details

Ben Wilson

commit sha 3d55896716202b6a5e2200b6a164c88f8232cfc4

Merge pull request #936 from absinthe-graphql/fix-persistent-term fix-persistent-term

view details

Vadim Shvetsov

commit sha a68e213710c77e425713c9e43766f9afdb3d03df

Update subscriptions.md I was little confused while tried to add this to `Endpoint` because felt to be in this context: ```elixir use Absinthe.Phoenix.Socket, schema: MyApp.Web.Schema ``` I think setup guide can be more clear with adding `UserSocket` filename to the step instruction.

view details

Ben Wilson

commit sha 5a3ea4be0b81cd2d398e6392213f18ab04c9a6a0

Merge pull request #943 from vadimshvetsov/patch-2 Update subscriptions.md

view details

Jonatan Kłosko

commit sha c5047e94bb5c04d9f3378888306896e5fad6fa61

Fix enum default value to work properly with list values.

view details

Vadim Shvetsov

commit sha 9f428a9db74fb62bde953b182df196761628aa1e

Update subscriptions.md Little typo in code example, thanks for great library and book 👍

view details

calvin s

commit sha c61d46b422a78364b0ea0b8518aaa8d6d6dfae7a

Change all referring markdown file from .html to .md and update ex_doc to use .md autolink to .html

view details

calvin s

commit sha 42114ef53493d439df0732d79667b26392bfbe01

update ex_doc

view details

calvin s

commit sha 34ad711fbad158330de900c3b26417a2b698528f

test and fix all .md link

view details

push time in 7 hours

create barnchabsinthe-graphql/absinthe

branch : stack-based-resolution2

created branch time in 7 hours

startedtelegramdesktop/tdesktop

started time in 7 hours

startedwspeirs/btree

started time in 8 hours

startedRaumZeit/MarchingSquares.js

started time in 9 hours

Pull request review commentianstormtaylor/slate

Feature/android keyboard support

+/**+ * Returns the number of characters that are the same at the beginning of the+ * String.+ *+ * @param {String} prev  the previous text+ * @param {String} next  the next text+ * @returns {Number | null} the offset of the start of the difference; null if there is no difference

Maybe remove old pre-typescript commenting style. Only mentioned once but should apply to all methods.

wleroux

comment created time in 10 hours

Pull request review commentianstormtaylor/slate

Feature/android keyboard support

+import React, {+  useCallback,+  useEffect,+  useLayoutEffect,+  useMemo,+  useRef,+  useState,+} from 'react'+import {+  Descendant,+  Editor,+  Element,+  Node,+  NodeEntry,+  Range,+  Text,+  Transforms,+} from 'slate'+import throttle from 'lodash/throttle'+import scrollIntoView from 'scroll-into-view-if-needed'++import { ReactEditor } from '../..'+import { ReadOnlyContext } from '../../hooks/use-read-only'+import { useSlate } from '../../hooks/use-slate'+import { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect'+import {+  DOMElement,+  DOMNode,+  DOMRange,+  DOMStaticRange,+  getDefaultView,+  isDOMNode,+  isPlainTextOnlyPaste,+} from '../../utils/dom'+import {+  EDITOR_TO_ELEMENT,+  EDITOR_TO_RESTORE_DOM,+  EDITOR_TO_WINDOW,+  ELEMENT_TO_NODE,+  IS_FOCUSED,+  IS_READ_ONLY,+  NODE_TO_ELEMENT,+  PLACEHOLDER_SYMBOL,+} from '../../utils/weak-maps'+import { AndroidInputManager } from './android-input-manager'+import { EditableProps } from '../editable'+import { ErrorBoundary } from './ErrorBoundary'+import useChildren from '../../hooks/use-children'+import {+  defaultDecorate,+  hasEditableTarget,+  hasTarget,+  isEventHandled,+  isTargetInsideVoid,+} from '../default-editable'++const HAS_BEFORE_INPUT_SUPPORT = true++export const AndroidEditableNoError = (props: EditableProps): JSX.Element => {+  return (+    <ErrorBoundary>+      <AndroidEditable {...props} />+    </ErrorBoundary>+  )+}++/**+ * Editable.+ */++export const AndroidEditable = (props: EditableProps): JSX.Element => {+  const {+    autoFocus,+    decorate = defaultDecorate,+    onDOMBeforeInput: propsOnDOMBeforeInput,+    placeholder,+    readOnly = false,+    renderElement,+    renderLeaf,+    style = {},+    as: Component = 'div',+    ...attributes+  } = props+  const editor = useSlate()+  const ref = useRef<HTMLDivElement>(null)+  const inputManager = useMemo(() => new AndroidInputManager(editor), [editor])++  // Update internal state on each render.+  IS_READ_ONLY.set(editor, readOnly)++  // Keep track of some state for the event handler logic.+  const state = useMemo(+    () => ({+      isComposing: false,+      isUpdatingSelection: false,+      latestElement: null as DOMElement | null,+    }),+    []+  )++  // Update element-related weak maps with the DOM element ref.+  useIsomorphicLayoutEffect(() => {

Hi @wleroux , there are a number of these useIsomorphicLayoutEffect methods that are verbatim from editable.tsx.

I wonder if it might be better to take some of these, especially the longer and more complex methods, and turn them into a custom hook that is exported from editable.tsx. Maybe this particular one isn't a great example (because it's not that long), but as an example, it could be something like: useUpdateWeakMaps(editor, window, ref).

By having them in a separate AndroidEditable still gives us the option to "roll back" just the AndroidEditable version if the default version causes problems specific to Android.

I won't add comments to each one but just as a general idea.

wleroux

comment created time in 10 hours

Pull request review commentianstormtaylor/slate

Feature/android keyboard support

+import { ReactEditor } from '../../plugin/react-editor'+import { Editor, Node as SlateNode, Path, Range, Transforms } from 'slate'+import { Diff, diffText } from './diff-text'+import { DOMNode } from '../../utils/dom'+import {+  EDITOR_TO_ON_CHANGE,+  EDITOR_TO_RESTORE_DOM,+} from '../../utils/weak-maps'++const debug = (...message: any[]) => {}++/**+ * Unicode String for a ZERO_WIDTH_SPACE+ *+ * @type {String}+ */++const ZERO_WIDTH_SPACE = String.fromCharCode(65279)

I think the ZERO_WIDTH_SPACE hack is no longer used with the 0.50+ version of Slate and a search for "65279" doesn't appear to show any hits (at least in GitHub's search).

Maybe check to see if it's required and if not remove related code.

wleroux

comment created time in 10 hours

Pull request review commentianstormtaylor/slate

Feature/android keyboard support

+import React, {+  useCallback,+  useEffect,+  useLayoutEffect,+  useMemo,+  useRef,+  useState,+} from 'react'+import {+  Descendant,+  Editor,+  Element,+  Node,+  NodeEntry,+  Range,+  Text,+  Transforms,+} from 'slate'+import throttle from 'lodash/throttle'+import scrollIntoView from 'scroll-into-view-if-needed'++import { ReactEditor } from '../..'+import { ReadOnlyContext } from '../../hooks/use-read-only'+import { useSlate } from '../../hooks/use-slate'+import { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect'+import {+  DOMElement,+  DOMNode,+  DOMRange,+  DOMStaticRange,+  getDefaultView,+  isDOMNode,+  isPlainTextOnlyPaste,+} from '../../utils/dom'+import {+  EDITOR_TO_ELEMENT,+  EDITOR_TO_RESTORE_DOM,+  EDITOR_TO_WINDOW,+  ELEMENT_TO_NODE,+  IS_FOCUSED,+  IS_READ_ONLY,+  NODE_TO_ELEMENT,+  PLACEHOLDER_SYMBOL,+} from '../../utils/weak-maps'+import { AndroidInputManager } from './android-input-manager'+import { EditableProps } from '../editable'+import { ErrorBoundary } from './ErrorBoundary'+import useChildren from '../../hooks/use-children'+import {+  defaultDecorate,+  hasEditableTarget,+  hasTarget,+  isEventHandled,+  isTargetInsideVoid,+} from '../default-editable'++const HAS_BEFORE_INPUT_SUPPORT = true

This looks like it's not necessary in the Android specific editable.

wleroux

comment created time in 10 hours

issue commentabsinthe-graphql/absinthe

returning {:error, nil} in resolve/3

That's the Absinthe error help, but the GraphQL spec itself says:

Every error must contain an entry with the key message with a string description of the error intended for the developer as a guide to understand and correct the error.

http://spec.graphql.org/draft/#sec-Errors.Error-result-format

Since it specifies the minimum data for an error is a map with a message, it's not clear to me what {:error, nil} would return as the message... An empty string doesn't seem great

It is a bit tricky. At the moment {;error, ""} is returned as an normal error response(not raising), so if {:error, nil} is converted to {:error, ""} like the Absinthe Error suggested, it will not introduce a breaking change. {:error, nil} is corrected to behave the same as {:error, ""}

It is a bit silly to raise which breaks the function if a mutation simply returns {:error, ""}

chungwong

comment created time in 11 hours

created repositorymjackson/esbuild-node-builtins-sideeffects

created time in 15 hours

fork jamiebuilds/core-js

Standard Library

fork in 16 hours

issue commentabsinthe-graphql/absinthe

returning {:error, nil} in resolve/3

That's the Absinthe error help, but the GraphQL spec itself says:

Every error must contain an entry with the key message with a string description of the error intended for the developer as a guide to understand and correct the error.

http://spec.graphql.org/draft/#sec-Errors.Error-result-format

Since it specifies the minimum data for an error is a map with a message, it's not clear to me what {:error, nil} would return as the message... An empty string doesn't seem great

chungwong

comment created time in 18 hours

startedCyberPunkMetalHead/Binance-News-Sentiment-Bot

started time in 18 hours

issue commentabsinthe-graphql/absinthe

returning {:error, nil} in resolve/3

Yup, ok, that's a compelling argument :)

chungwong

comment created time in 19 hours

created repositorywojtekmach/que

created time in 19 hours

starteddiscord/cassandra-rs

started time in 19 hours

issue commentianstormtaylor/slate

Automate release titles

Can we use a changesets hook to do this automatically when the tag is created?

great question! I'm not too familiar with changesets tbh but from looking through their code they don't seem to use the releases api in that way.

However from looking at the github docs, it should be as adding this to our release workflow:

curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/octocat/hello-world/releases \
  -d '{"tag_name":"tag_name", "title":"tag_name"}'
juliankrispel

comment created time in 20 hours

issue commentianstormtaylor/slate

Issue with removing mark

Any news on this?

TejaReddy7

comment created time in 21 hours