Comments (13)
I agree it makes sense in Material UI context but not really in this base library because of how uncommon it is used and it is here the only one (I think along with type'
for which I used inputType
)
I will leave this issue open for a while, maybe someone can enlighten our subjectiveness :)
from feliz.
Sorry I wrote incorrectly here but added the right one (with single r
) in the props
from feliz.
Just pointing out that underscore is also an option to consider, either trailing or leading (e.g. inherit_
, _inline
). It's not as foreign as apostrophe since other languages and editing tools usually also allow underscores in identifiers.
I am not suggesting it for this issue. Decision to use word suffixes is perfectly fine. Just felt like an overlooked option to add to the discussion in case it helps any other onlookers.
from feliz.
Same as my comment here I am trying to avoid apostrophe in naming. inheritFromParent
derives the naming from what it does and considering how uncommon this construct will be used (ofc. just a guess, I don't have numbers) it is good enough
from feliz.
Replying to the above as well as your comment in that issue: I'm not an F# beginner, but when I was, I didn't see any problem with '
(neither do I now). In fact, I thought it was a great way to avoid clashes with reserved keywords and used it wherever needed (and still do). That's me, though. :)
from feliz.
(For completeness: Another alternative is to use double backticks, ``inherit``
, but I vastly prefer a single apostrophe to double backticks in this case.)
from feliz.
Just want to note that I consistently append '
to reserved keywords in Feliz.MaterialUI. That way:
- Users intuitively understand that e.g.
color.default'
refers to the MUIdefault
color- I expect users would be confused by alternative names like
color.standard
orcolor.normal
and annoyed at more verbose alternatives likecolor.defaultColor
, and all of these could also clash with new additions in MUI
- I expect users would be confused by alternative names like
- I avoid having to come up with custom names for a lot of props
IMHO it looks great in usage, too. :) I suggest doing the same in Feliz, but it's ultimately your call, of course. (And I'm always open to hearing better ways of doing things in Feliz.MaterialUI)
from feliz.
Forgot to mention in #42 but I'd just like to be open about the fact that I added one such apostrophe name (ariaAutocomplete.inline'
). If you don't like it, feel free to rename it. :)
Lines 871 to 885 in 0615e78
from feliz.
Thanks for sharing, I didn't see it there but (just as you said) I find it hard to come up with my own versions of names: inlinedSuggestions
, inlined
, inlineSuggestion
etc.
from feliz.
Also, feel free to close this issue if you feel the final decision has been made on inheritFromParent
vs. inherit'
.
from feliz.
Last comments on inheritFromParent
before I close the issue
- Doesn't use prime and backticks to make it look not so foreign (no F#-ers) for newcomers, especially inside online editors (github)
- Reflects what it does in the name
- Not used commenly so the long name will (hopefully) not discourage people from using the value too often when needed
As for ariaAutocomplete.inline'
I will go for ariaAutocomplete.inlineAfterCarret
because that is what the description says about the attribute.
Found a serious issue with this decision? Please open a new issue and let us discuss it 😄
from feliz.
Shouldn't it be inlineAfterCaret
? (Single r
)
from feliz.
Yep, though prefixing with underscore in F# usually means that it's an unused value (prefixing with underscore suppresses unused warnings).
from feliz.
Related Issues (20)
- ReactComponentAttribute for props list HOT 2
- Q: Documentation on breaking changes in 2.6? [WAS Updating Feliz.UseListener to Feliz 2.6.0] HOT 4
- CSS overflow-anchor property HOT 1
- Error with Feliz 2.7 HOT 2
- Making UseElmish's dispatch function stable
- Feliz.Markdown escapeHtml doesn't seem to work HOT 1
- UseElmish: Failed to resolve import "use-sync-external-store/shim" HOT 3
- `react-markdown` removes the `escapeHtml` property HOT 1
- Clarification and Potential Improvement on PR #480 useEffectOnce behavior HOT 5
- Expanding Feliz.Rechart HOT 3
- Component created with a forwardRef that has generic type parameters loses state HOT 2
- "Directory import use-sync-external-store\shim is not supported" in UseElmish.fs.js HOT 2
- Use with Elmish documentation is lacking integration HOT 2
- Enhance Handling of F# Record Types as Props in ReactComponent Attribute HOT 4
- Explore if Feliz.CompilerPlugin can support POJO made using `[<ParamObject>]`
- prop.pattern produces invalid html HOT 4
- React 19 HOT 4
- Svg attribute `fill-rule` missing
- Update tests and move to github actions [Contributions Welcome]
- Doc changes havent been pushed to site 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 feliz.