-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update deps + rename options for clarity #22
Conversation
Whoops I forgot that this is obviously a breaking change. Perhaps it wasn't the best idea to do this kind of stuff at 1 AM.... There are 3 solutions to this:
I created a new commit that adds the fallback behavior (including a test) as I feel like that's the best option, but it's up to you. |
This may not seem like a useful feature at first (since we're typing both the class an tag name again), but in my opinion it helps convey *semantic* meaning rather than *syntactical* meaning when editing templates. Possible improvement points: - Not sure how I'm supposed to handle multiple attribute values here - pretty-quick is being a bit weird, are you sure this is how you want it to be formatted? - Maybe a different default attribute name? - Maybe a shorter option name? - The replacementTag option (reshape#22) should probably be renamed to defaultReplacementTag
Could we split this into two pull requests? One to update deps, and one to rename the options - that would make more sense for me 😁 |
I could, but the option renaming is included (and superseded) in #23, so creating another PR for that wouldn't make sense. |
Hold on the dependency stuff is also included in #23, so that wouldn't make sense either. |
Yep! |
Did it, and also posted an (admittedly pretty long) response in #23. |
This may not seem like a useful feature at first (since we're typing both the class an tag name again), but in my opinion it helps convey *semantic* meaning rather than *syntactical* meaning when editing templates. Possible improvement points: - Not sure how I'm supposed to handle multiple attribute values here - pretty-quick is being a bit weird, are you sure this is how you want it to be formatted? - Maybe a different default attribute name? - Maybe a shorter option name? - The replacementTag option (reshape#22) should probably be renamed to defaultReplacementTag
* Update deps + rename options for clarity * Add typescript definitions reshapeCustomElements(..) returns a plain 'Function' for now since the core reshape module doesn't include definitions yet * Make it possible to locally override the default replacement tag This may not seem like a useful feature at first (since we're typing both the class an tag name again), but in my opinion it helps convey *semantic* meaning rather than *syntactical* meaning when editing templates. Possible improvement points: - Not sure how I'm supposed to handle multiple attribute values here - pretty-quick is being a bit weird, are you sure this is how you want it to be formatted? - Maybe a different default attribute name? - Maybe a shorter option name? - The replacementTag option (#22) should probably be renamed to defaultReplacementTag * Custom tag ↔ replacement tag map option The README could probably be worded better * Move the HTML in the README to it's own (syntax highlighted) section * Add a generic blacklist * Change the replacementTagMap to a more convenient format * Make sure option names are consistent and update TS definitions * Infer additionalTags from replacementTagMap
I updated the dependencies (again) since, among others, the main reshape module was updated.
I also renamed the
defaultTag
andskipTags
options toreplacementTag
andadditionalTags
respectively. I feel like those names convey the actually meaning of these options better.There are some features I need for my use case that I'm going to try and add myself. I will of course create PR's for those (although you shouldn't feel obligated to merge them), but since these (mini) changes could create (big) conflicts I'd love to hear if you're actually approving them before I continue.