-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve props/state value editing interface #321
Comments
Hey. |
It looks like that issue intentionally overlaps with several pre-existing issues. Why? (Duplication issues aren't great for maintenance.) It also looks like one of the bullet points is already implemented:
I guess I don't mind if folks prefer an umbrella issue. We can close some of the redundant ones, but the umbrella issue would need to be more structured and clear I think. I'm not sure I understand what "Allow editing with json and not force/infer type in input." means for example. |
Hi @bvaughn it's because I had some related points to add, and I've see that there were already several different issues about data editing but not with all my points, and not all well named (this one, as example has a very generic title, and a very specific description), so I gathered those points in a todo list that would be, in my opinion, the target. For the helpers, yes we could check this one. It has some ux issues, but it's done (and the problems can be part of new issues). For "Allow editing with json and not force/infer type in input." it's precisely what it is question in this particular issue. Now we only have quick edit in infered type (or string if null), and not the ability to edit fully the field. Allowing (and parsing) json is a good way to do that, as you can pass number, boolean, object, arrays and string in an input text, and it will be converted to native type. I actually didn't invent anything, as it's the way vuejs devtools is doing, and it works pretty well. I totally can put some more explanation and captures/mockup of what I think in the issue if you want. The first message was a draft to begin, and I know I'm not a good english speaker, so let me know if I didn't make me understood properly (or seems to be rude sometimes! 😅). |
I see! I think I would prefer to keep a couple of separate issues. Happy to work with you to clean up the titles and descriptions if you have suggestions. We could even create a new label for this if that would help group the related issues. |
Ok for me, we even can transform my issue in a milestone. It seems to be the github way to define epic. I'm letting you set that the way you want. For this one I've made a little example to let you see why json input can be the answer: https://codesandbox.io/embed/blue-resonance-9jjye |
I don't really want a milestone issue for this. I think I'd like a few separate, focused issues. I don't think it's likely that all of this will be implemented, so I think it's nicer if the issues are separated. So if you'd like to re-purpose the milestone to be about a single thing- that'd be nice. And if you think any of hte pre-existing issues are unclear, leave comments with suggestsions and I can help make sure the descriptions get updated. |
This repository is being merged into the main React repo (github.com/facebook/react). As part of this, I am moving all issues to that repository as well and closing them here. This issue has been relocated to: |
Follow up to a discussion thread on #294 and a Messenger chat with @gaearon.
The current UI for editing props/state/hooks values has a couple of shortcomings:
<input type>
but this is subtle. Showing e.g. quotation marks around strings could be more helpful.null
initial values can only become strings at the moment. (DevTools does not attempt to parse numeric or boolean values and change the input type. If it did, we would probably also need to enable a way for you to opt back out of that input type somehow in case it was incorrect.)Additional quirks that might be worth ironing out:
The text was updated successfully, but these errors were encountered: