Comments (7)
Ya, we should fix this. We can build in assumptions about Ember's built-in components, but we cannot make any assumptions about the others.
tldr; IMHO, this codemod should not be migrating away from arguments to attributes in non-built-in components.
from ember-angle-brackets-codemod.
@rwjblue how do you feel about class
?
from ember-angle-brackets-codemod.
It depends on what level of "safety" we are shooting for. class
is absolutely a value that folks might use and munge in their JS, and assuming that their JS does not need access to it is conceptually breaking.
from ember-angle-brackets-codemod.
I had similar thoughts but then couldn't come up with a realistic scenario where it actually mattered for the class attribute. But I'm fine either way. the safest way is definitely to pass it as an argument instead of attribute.
from ember-angle-brackets-codemod.
SO as an example, it should not do:
to
but rather
correct?
from ember-angle-brackets-codemod.
@tylerturdenpants yeah, exactly. except maybe for builtin components like input and textarea.
from ember-angle-brackets-codemod.
Ok. Crystal clear now. Thanks.
from ember-angle-brackets-codemod.
Related Issues (20)
- Incorrect transformation of use of contextual component variable into a component invocation HOT 3
- Why is component that has positional parameters got skipped? HOT 1
- skipAttributesThatMatchRegex config needs to use strings in JSON HOT 1
- Update debugging workflow in README
- Nodes whose data attributes are valueless are excluded from codemod HOT 4
- running codemod on rendering tests breaks on < character HOT 6
- Possible to run offline (not using puppeteer / dev server)? HOT 6
- Async error HOT 7
- Error transforming component with a helper that does not use positional params as an attribute
- Is this supposed to work in addons? HOT 1
- Making Telemetry optional instead of default HOT 4
- Error: Protocol error (Page.navigate): Cannot navigate to invalid URL HOT 4
- Can I convert a single component at a time? HOT 6
- Trouble installing on Mac M1 (arm64 arch) machine
- link-to conversion drops params HOT 4
- Incorrect handling of block param properties in iterable helpers HOT 2
- Puppeteer errors with hard to decipher reason HOT 1
- Errors with 5.1.0: Cannot read property 'originalPositionFor' of undefined
- Add disambiguation of helpers (wrapping in round brackets) HOT 7
- Move helper disambiguation to a flag that is off by default
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 ember-angle-brackets-codemod.