profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/DylanVann/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.
Dylan Vann DylanVann Toronto and sometimes NYC. https://dylanvann.com/ 🤖 I design and develop software.

DylanVann/DatePickerCell 317

📅 Inline/Expanding date picker for table views.

DylanVann/ant-design-draggable-modal 114

The Modal from Ant Design, draggable.

DylanVann/beezel 27

Remote build caching for JS monorepos.

DylanVann/check-pull-request-title 11

A GitHub action that checks that a PR title matches a regex pattern.

DylanVann/ColorLockView 7

UITableViewCell highlighting does not change the color of ColorLockViews.

DylanVann/advent-of-code-2019 5

Solutions to Advent of Code 2019.

DylanVann/babelts 5

Run TypeScript code with Babel.

DylanVann/AIRSensor 1

An Arduino IR sensor library.

DylanVann/bundler-and-compiler-benchmarks 1

Benchmarks of JavaScript/TypeScript/ReasonML compilation and bundling.

push eventDylanVann/react-native-fast-image

Dylan Vann

commit sha b07eafefa2c1cfba0ed8e045f91d511db84ca085

docs: fix gifs

view details

push time in 10 hours

PR closed DylanVann/react-native-fast-image

Update react-native to 0.61.1

This updates react-native in the example project to 0.61.1 (including several other dependency updates). The project is now fully lint-free (standard react-native eslint/prettier applied in a separate commit.

Successfully verified and tested on:

  • Android Device (Xiaomi Mi A2)
  • Android Emulator (Pixel 3a)
  • iOS Device (iPhone 8)
  • iOS Simulator (iPhone X)

<sub><sup>Once approved, please use a normal GitHub merge (i.e. NO rebase/squash merge) to integrate the commit(s) from the PR head branch. The changes are broken up into meaningful, atomic commits, and my branch should already be up-to-date with the latest base branch. If it isn't, or if you want me to change anything, please let me know, and I will update the branch as soon as possible. Thank you!</sup></sub>

+2642 -2527

6 comments

43 changed files

friederbluemle

pr closed time in 11 hours

pull request commentDylanVann/react-native-fast-image

Update react-native to 0.61.1

@friederbluemle Sorry I didn't get to this. I've updated things on main.

friederbluemle

comment created time in 11 hours

push eventDylanVann/react-native-fast-image

Dylan Vann

commit sha 125f9ccde41d4b6470ff804913ae2db8829546c9

chore: upgrade example to react-native@0.65.1

view details

push time in 11 hours

issue commentDylanVann/react-native-fast-image

Flow type definitions are not being found

I did a kind of hacky solution. I will look into just shipping ESM in a future release, which would resolve this.

JameelMukadam

comment created time in a day

push eventDylanVann/react-native-fast-image

Dylan Vann

commit sha 77326e8b09954ab8c27785fe84427b1ed3d9290f

fix: make corresponding flow file for .cjs file fix #784

view details

push time in a day

issue closedDylanVann/react-native-fast-image

Flow type definitions are not being found

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-fast-image@8.3.4 for the project I'm working on.

Seems like the Flow type definitions are not being found because the file which is being imported is called index.cjs.js and the definition file is called index.js.flow. If I copy the index.js.flow and rename it to index.cjs.js.flow then it works.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-fast-image/dist/index.cjs.js.flow b/node_modules/react-native-fast-image/dist/index.cjs.js.flow
new file mode 100644
index 0000000..71fac3a
--- /dev/null
+++ b/node_modules/react-native-fast-image/dist/index.cjs.js.flow
@@ -0,0 +1,71 @@
+// @flow
+
+import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'
+import type { SyntheticEvent } from 'react-native/Libraries/Types/CoreEventTypes'
+
+export type OnLoadEvent = SyntheticEvent<
+    $ReadOnly<{
+        width: number,
+        height: number,
+    }>,
+>
+
+export type OnProgressEvent = SyntheticEvent<
+    $ReadOnly<{|
+        loaded: number,
+        total: number,
+    |}>,
+>
+
+export type ResizeMode = $ReadOnly<{|
+    contain: 'contain',
+    cover: 'cover',
+    stretch: 'stretch',
+    center: 'center',
+|}>
+
+export type Priority = $ReadOnly<{|
+    low: 'low',
+    normal: 'normal',
+    high: 'high',
+|}>
+
+export type CacheControl = $ReadOnly<{|
+    immutable: 'immutable',
+    web: 'web',
+    cacheOnly: 'cacheOnly',
+|}>
+
+export type ResizeModes = $Values<ResizeMode>
+export type Priorities = $Values<Priority>
+export type CacheControls = $Values<CacheControl>
+
+export type PreloadFn = (sources: Array<FastImageSource>) => void
+export type FastImageSource = {
+    uri?: string,
+    headers?: Object,
+    priority?: Priorities,
+    cache?: CacheControls,
+}
+
+export type FastImageProps = $ReadOnly<{|
+    ...ViewProps,
+    onError?: ?() => void,
+    onLoad?: ?(event: OnLoadEvent) => void,
+    onLoadEnd?: ?() => void,
+    onLoadStart?: ?() => void,
+    onProgress?: ?(event: OnProgressEvent) => void,
+
+    source: FastImageSource | number,
+
+    resizeMode?: ?ResizeModes,
+    fallback?: ?boolean,
+    testID?: ?string,
+|}>
+
+declare export default class FastImage extends React$Component<FastImageProps> {
+    static resizeMode: ResizeMode;
+    static priority: Priority;
+    static cacheControl: CacheControl;
+    static preload: PreloadFn;
+}

<em>This issue body was partially generated by patch-package.</em>

closed time in a day

JameelMukadam

issue closedDylanVann/react-native-fast-image

Xcode crashes after upgrade to version 7.0.0

My Xcode was working fine and i was facing an issue on android while building it and got a solution that it can be solved after upgrading to 7.0.0 and i upgraded and it started working fine on android but after that when i run on IOS my Xcode got crashed i down grade my version again to "react-native-fast-image": "^5.1.2", and it start working again.

closed time in 2 days

waheedakhtar694

issue commentDylanVann/react-native-fast-image

Xcode crashes after upgrade to version 7.0.0

There's something wrong with the state of you project, pretty much impossible to debug without seeing it.

I'd recommend cleaning, unlinking, removing node_modules, installing the latest version, pod install in ios, then see if it works. The library installed on a clean project works 100%.

Please open another issue with more specifics / if you can reproduce on a clean project.

I know how frustrating this can be. It may be worth it to just create a new project with the CLI, reinstall your deps, move your code over. It'll take a few hours but it'll definitely fix your issue.

waheedakhtar694

comment created time in 2 days

issue commentDylanVann/react-native-fast-image

borderRadius on android cause sawtooth.

Cannot reproduce, please open another issue with an example showing. If it's only older versions of RN or Android it probably will not be fixed.

yqz0203

comment created time in 2 days

issue commentDylanVann/react-native-fast-image

Retry functionality

@nandorojo Yes that will work. You could potentially build a wrapper component that allows for clicking to retry manually using something like that and the onLoadError callback/

MrLoh

comment created time in 2 days

Pull request review commentDylanVann/react-native-fast-image

Use React Native shared CookieJar on Android

+package com.dylanvann.fastimage;++import android.webkit.CookieManager;++import java.util.Collections;+import java.util.List;++import okhttp3.Cookie;+import okhttp3.CookieJar;+import okhttp3.HttpUrl;++public class FastImageCookieJar implements CookieJar {+    private CookieManager cookieManager;++    private CookieManager getCookieManager() {+        if (cookieManager == null) {+            cookieManager = CookieManager.getInstance();+        }+        +        return cookieManager;+    }++    @Override+    public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {+        // Do nothing

I'm guessing SDWebImage already works like this, do you know if that's correct? Would be good to work the same.

charpeni

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentDylanVann/react-native-fast-image

Use React Native shared CookieJar on Android

+package com.dylanvann.fastimage;++import android.webkit.CookieManager;++import java.util.Collections;+import java.util.List;++import okhttp3.Cookie;+import okhttp3.CookieJar;+import okhttp3.HttpUrl;++public class FastImageCookieJar implements CookieJar {+    private CookieManager cookieManager;++    private CookieManager getCookieManager() {+        if (cookieManager == null) {+            cookieManager = CookieManager.getInstance();+        }+        +        return cookieManager;+    }++    @Override+    public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {+        // Do nothing

I know some cookie based auth systems will occasionally refresh a cookie using a response. I'm wondering if any of them would ever refresh a cookie on an image response. You're right it's probably unlikely.

charpeni

comment created time in 2 days

pull request commentDylanVann/react-native-fast-image

preload cache control

On second look, it looks like that doesn't work on iOS because SDWebImage didn't support setting the cacheControl/equivalent per image being preloaded, maybe it does now.

michalmelich-gl

comment created time in 2 days

pull request commentDylanVann/react-native-fast-image

preload cache control

I think this isn't needed because cacheControl is set per source. So if you want to preload a bunch of images with a certain value just make sure the source objects have it.

michalmelich-gl

comment created time in 2 days

pull request commentDylanVann/react-native-fast-image

Add Option To Resize Images On Android

You may be getting better performance because the quality of your rendered images is less if you are not accounting for DPI.

Assuming Glide's auto downsampling works that's the reason I would guess you're seeing better performance.

We could try to create a reproduction of this issue to check if that's the case, or if the auto sampling based on the view size is not working for some reason.

adammcarth

comment created time in 2 days

pull request commentDylanVann/react-native-fast-image

BorderRadius Fix for Android 7.0 , tintColor support

I believe borderRadius is working correctly now, no AA issues: https://github.com/DylanVann/react-native-fast-image/pull/411#issuecomment-920326071

Tint was added at some point, working on Android and iOS.

If there's anything I'm missing please reopen, thank you!

nehacurefit

comment created time in 2 days

Pull request review commentDylanVann/react-native-fast-image

Use React Native shared CookieJar on Android

+package com.dylanvann.fastimage;++import android.webkit.CookieManager;++import java.util.Collections;+import java.util.List;++import okhttp3.Cookie;+import okhttp3.CookieJar;+import okhttp3.HttpUrl;++public class FastImageCookieJar implements CookieJar {+    private CookieManager cookieManager;++    private CookieManager getCookieManager() {+        if (cookieManager == null) {+            cookieManager = CookieManager.getInstance();+        }+        +        return cookieManager;+    }++    @Override+    public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {+        // Do nothing

Should we not save new cookies?

charpeni

comment created time in 2 days

PullRequestReviewEvent

push eventDylanVann/react-native-fast-image

Amaury Liet

commit sha 5c5fefacbdbc4d02c1eb71bca88fa1d012750b87

fix: do not crash when source is invalid (#782) To reproduce, you can use: `source={{ uri: '/' }}`

view details

push time in 2 days

PR merged DylanVann/react-native-fast-image

fix: make sure not to crash when source is invalid

Hello, found an issue on android, causing a crash if the uri is invalid.

Suggested solution: trigger onError instead

To reproduce, you can use: source={{ uri: '/' }}

Fixes #407

+21 -0

0 comment

1 changed file

AmauryLiet

pr closed time in 2 days

issue closedDylanVann/react-native-fast-image

Crash on Android if source is an invalid URL

If I pass as source an object like this { uri: 'INVALID_URL' } I get the following error on Android:

Error while updating property 'source' of a view managed by: FastImageView

null

Must not be null or empty

At the moment I am normalising the source using this (ugly) code to avoid the crash:

const normalisedSource = source && typeof source.uri === 'string' && !source.uri.split('https://')[1] ? null : source;

but I think it would be better if the library prevents it.

closed time in 2 days

raynor85
PullRequestReviewEvent

PR closed DylanVann/react-native-fast-image

Fix antialias issue on Android 7.0

Pick antialias related commit from #379 and support array type style. Check the screenshot below. (left: original, right: modified)

2019-02-18 3 27 26

or you can see #159 on your comment, Images on Android aren't antialiased well.

+23 -2

6 comments

2 changed files

mu29

pr closed time in 2 days

pull request commentDylanVann/react-native-fast-image

Fix antialias issue on Android 7.0

I'm going to close https://github.com/DylanVann/react-native-fast-image/pull/491 and https://github.com/DylanVann/react-native-fast-image/pull/411 . If it's still an issue please reopen, thank you!

mu29

comment created time in 2 days

PR closed DylanVann/react-native-fast-image

Round the corners manually on Nougat [Android]

Fix has been done in other forks. Just performed the same fix and made it Nougat specific with the latest master

Edit: Improved the fix by allowing override of width and height on the resulting image so that the border radius ratio is correct. This does unfortunately have the effect of potentially losing image quality since you lose the benefits of downscaling

+30 -3

4 comments

1 changed file

lukefanning

pr closed time in 2 days

pull request commentDylanVann/react-native-fast-image

Round the corners manually on Nougat [Android]

I'm going to close https://github.com/DylanVann/react-native-fast-image/pull/491 and https://github.com/DylanVann/react-native-fast-image/pull/411 . If it's still an issue please reopen, thank you!

lukefanning

comment created time in 2 days