Comments (5)
I would totally advocate for add* type methods rather than a cryptic Boolean tacked on
from nova-fields.
I could live with that, but in my eyes, its just splitting hairs.
The current method is just manipulating the css classes of the fields. At the moment, you don't know if it appends or if it overwrites. So to make it not "cryptic", you would have to change these method names as well to "changeInputClass, changeLabelClass", etc. (or updateLabelClass, etc.). So you would not only double the methods, but you would also break current behaviour.
from nova-fields.
Sounds good to me. I’ll take a look on this and think in the best api.
from nova-fields.
I only advocated for clarity since, a setter (inputClasses) and an adder (addInputClass) just seem more straight forward to someone reading the code. Rather than having to hit up documentation (which at the moment doesn't really exist, not blaming anyone), the clear and readable separation of changing the class vs adding a class is clear. Additionally there is already at least one example of this kind of thing in laravel already. For example in the query builder there is select (replacing the current selects) and addSelect ( just adding a new select). I don't think we would need to actually change much of the current names and still end up in a clear functionality description.
Another way of looking at it is in terms of what it is, a POPO. Most attributes are get/set via what they are named at a property level so it would also fall in line with not only normal objects but also most other languages that I can think of off-hand. With an additional function being used to not straight-up change the property, but instead a function that could modify the underlying property.
from nova-fields.
Added the following methods to 0.3.0:
- addInputClasses
- addWrapperClasses
- addFieldClasses
- addPanelFieldClasses
- addLabelClasses
- addPanelLabelClasses
- addExcerptClasses
from nova-fields.
Related Issues (20)
- fieldClasses, inputClasses and wrapperClasses are not being added to the Field HOT 1
- quickCreate with parameters to populate values not working HOT 1
- readOnly attribute not working on Autocomplete field HOT 3
- quickCreate modal breaks if there are any fields forEach is not a function HOT 4
- Composer install failing?
- Row Sorting HOT 1
- JSON field stores empty data if last child field is empty HOT 4
- Help Texts are not visible any more in JSON field HOT 5
- Row field is not hydrated in form view (undefined error thrown in console) HOT 3
- Panel title on JSON field grouping HOT 1
- JSON in JSON field does not work HOT 1
- production files are 640 kb
- Translation in this package
- Datepicker not open
- Support for alwaysShow() on row field type
- Documentation website is down
- Abandoned?
- Project status
- Nova 4 HOT 12
- TypeError: Cannot read properties of undefined (reading '_c') in nova-fields
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 nova-fields.