Conversation
bb1038c to
5cfed3e
Compare
|
This should probably be the final PR in the 1.0 release, since it's a fairly significant overhaul. |
|
I did some more thinking, |
|
Discussed this via call with Ryan. All suffixed underscores should be stripped out. |
|
We might want to have another discussion as to whether we should move forward with this. Given both options have positives/negatives, I'm still undecided. Using DictPros
Cons
Using KwargsPros
Cons
|
|
To clarify, only the following are keywords that would require you to add a trailing Functions like Personally I don't think this is a large enough issue to block these changes. |
|
Do we want the conversion script to be able to handle props in a MODAL_CONTAINER = {
"id": "modal-container",
"className": "modal fade",
"tabIndex": "-1",
"aria-hidden": "true",
}
@component
def modal():
return div(
MODAL_CONTAINER,
....
) |
|
Unfortunately, handling that is complicated. Looking at the |
3fc050f to
e8231ff
Compare
|
@Archmonger can you try running the script against some of your code? It fairs pretty well against IDOM's source but that's a fairly small sample size. You should be able to copy and paste in an environment where IDOM is installed and do the following: Where python fix_vdom_constructor_usage.py tests/**/*.py tests/*.py |
|
Looks like there was a incomplete merge commit at this LOC EDIT: Perhaps not, maybe that's an actual docstring? The indentation makes it look fairly comical though. Probably better represented as this: dedent(
f"{actual}\n"
"▲ actual ▲\n"
"▼ expected ▼\n"
f"{expected}\n"
) |
|
Running the output on It only messed in in one situation, where it forgot to leave a preceding space on an inline It essentially resulted in I think this interface looks way more pythonic, so I dig it. |
b037870 to
34d4a87
Compare
|
Outside of the updating narrative docs this change is pretty much complete. Usages of |
|
We probably want that CLI to be a bit more user friendly.
If we inspect the path to be a dir, then we should automatically create the glob Otherwise, only format one file. |
34d4a87 to
79bd0ff
Compare
|
Yup. Just made that change. |
|
Will review when tests pass |
0e528a0 to
3693009
Compare
|
There's some minor kinks in the tests to work out, but this is ready for review. |
Archmonger
left a comment
There was a problem hiding this comment.
Not many nitpicks on this one.
Can we potentially sneak in a revert to the use_state type hints on this PR? It's fairly painful to to use_state right now.
ddc7178 to
e8c3044
Compare
|
When we cut a 1.0.0 release of IDOM, I will sneak it into the 3.0.0 release of Django IDOM |
|
On a different note, in the future releases of IDOM, I recommend we switch to semantic versioning rather than feature-set versioning. We will need to rename our GitHub Projects milestones as such. |
|
Completely forgot to update docs/changelog will create a followup PR |
* revert 764a5a8 - but preserve ability to declare attributes with snake_case - move 'key' to be an attribute rather than keyword argument in constructor + make auto converter for this change based on the one used for the "new" `*args` and `**kwargs` syntax we are reverting. * add key rewrite script * changelog * fix types * apply rewrites * add custom vdom constructor decorator * change to snake * fix err msg * cast keys to strings * make pub * fix dashed html attrs * rename to rewrite-keys * fix types * allow ints in vdom spec for keys * fix types * camelCase to snake_case + rewrite util * fix types * get cov * fix style
closes: #755
Checklist
Please update this checklist as you complete each item:
changelog.rsthas been updated with any significant changes.