Comments (11)
IMO, this doesn't pull its weight - shipping an entire SVG renderer for a single icon? We should just ship a really big icon and let it get resized correctly by the OS.
@alloy poked me that I should do a second evaluation because this was probably closer to what we want than I think, and he's right.
We've chatted before about what an SVG dependency would look like for us (IRL, so no link) - but a lot of our experience with SVG rendering in iOS apps comes from having a single, massive, comprehensively spec-compliant dependency for rendering an SVG. Which is how everyone does it in native only, but it looks like this is a small and well contained dependency. The native code is readable, and while it's not got tests - it is shipped with Expo by default and I trust that team.
I think this is probably the closest to being what we'd have built out had we done it ourselves, plus it's already 4 years old and has android support which is not what ours is like. So I'm a +1.
from emission.
Thanks for thorough evaluation everyone and reconsidering @orta šš¾
Based on the feedback, we'll proceed. We actually have about a dozen SVGs for Local Discovery we'll be using this library for, including some of the ones in this screenshots below so it isn't just for one icon to be clear.
from emission.
Yes, I've had this discussion with @orta as well in the past but this use case is slightly different. We need to gradually scale the size our pin icon (max: 1.5x - min: 0.5x) as the user zooms in and out of the map.
I took a video to illustrate what needs to happen. Although it's not currently implemented that's the plan.
So this can't be solved with the standard iOS scales for images ("@3x", "@2x") etc...
from emission.
The goal of including SVGs (directly from Zeplin) is definitely a good idea; having one asset that's scalable to any screen is a big win over PNGs. I'd be okay with including an SVG-to-PNG converter in a build process or something, but if this dependency works and it meets our criteria, then it sounds fine to me.
from emission.
We already tried using PNGs instead and pins would look pixelated at higher zoom levels when changing the scale.
Iām not sure I understand this correctly. Is this another issue than the one solved by having various versions of an icon for different device screen scales (or asset bundles)?
from emission.
Last time I talked to @orta about this he seemed fairly strongly against it. A potential alternative here is to convert SVGs over to PNGs via a snapshotting tool. I've actually done this exact thing in the performance-monitor repository. I use the library repng to generate a snapshot of a react component. It's a solution I had to use for emails because they don't support SVGs.
from emission.
Seems like a great addition barring any gotchas.
from emission.
@damassi it's my mistake with initially naming the RFC wrong when I first opened it, this has no dependency or anything to do with react-native-web
.
from emission.
Ah yeah, i just saw that and updated my comment :)
from emission.
@orta cool, I like the updated comment š
I wanted to add that SVG's are already a part of our web stack, and adding support for SVG's in Emission would help share more expertise across web and iOS codebases.
from emission.
Well, this'll make integrating palette icons easy breezy. Go team! š
from emission.
Related Issues (20)
- [RFC] Change "Skip New Tests" to #skip_new_tests
- Highest Bid orange looks really light HOT 3
- [RFC] Remove `yarn clean-example` from `yarns start`
- [RFC] Add husky and lint-staged HOT 2
- Add tests for Button component states
- Add event emitter for `view(Will/Did)Appear` events HOT 1
- [RFC] Change `yarn test` to run all types of checks that CI would also run HOT 11
- [Relay] Remove unused imports HOT 1
- [Dev] Deployment doesn't work because of our custom RN source code changes HOT 2
- Relay fragment not spreading
- Deployments don't work HOT 11
- Remove -u from `yarn test:ci` command
- Seeing a lot of errors due to shadows
- Recurring query cache error screen
- Action Required: Fix Renovate Configuration
- Update Dependencies (Renovate Bot)
- Logo proposal fo emission HOT 1
- [RFC] Add INTUAnimationEngine HOT 5
- [RFC] New dependency: grapheme-splitter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emission.