demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link

Keypad folders #15

Closed Kebap closed 3 years ago

Kebap commented 3 years ago

Comparing an original XML file and the muddler-created file, I noted lots of differences, so I imported the muddler file into Mudlet and exported from there again, then continued to compare. It now has much less noise.

However still one difference stays, that is the handling of folders of keys. For some reason, muddler seems to change the keypad ID given to a folder (which I don't know if it makes sense to have one to begin with) or maybe I am doing something wrong?

See for yourself:

Original package:

        <KeyGroup isActive="yes" isFolder="yes">
            <name>krrrcks</name>
            <packageName>krrrcks</packageName>
            <script></script>
            <command></command>
            <keyCode>0</keyCode>
            <keyModifier>0</keyModifier>
            <KeyGroup isActive="yes" isFolder="yes">
                <name>Keypad</name>
                <packageName></packageName>
                <script></script>
                <command></command>
                <keyCode>-1</keyCode>
                <keyModifier>0</keyModifier>

Muddled package:

        <KeyGroup isActive="yes" isFolder="yes">
            <name>krrrcks</name>
            <packageName></packageName>
            <script></script>
            <command></command>
            <keyCode>-1</keyCode>
            <keyModifier>4294967295</keyModifier>
            <KeyGroup isActive="yes" isFolder="yes">
                <name>Keypad</name>
                <packageName></packageName>
                <script></script>
                <command></command>
                <keyCode>-1</keyCode>
                <keyModifier>4294967295</keyModifier>
                <Key isActive="yes" isFolder="no">

I noticed both keyCode and keyModifier changed.

See result in Mudlet: image

Whereas original folders were like: image image

For the record, a new folder in Mudlet looks like this instead: image

demonnic commented 3 years ago

I can take a look, I'm not necessarily preserving the same spacing or anything as the xml is generated by an upstream dependency. I took a Mudlet package xml and ripped it apart bit by bit until I could replicate the functionality, but keybindings are probably the thing muddler supports that I've used the least, which is why there are so many seams for you to find.

Which is to say, I'll take a look, but it might be a little bit and please don't be too disappointed if you keep finding things.

Kebap commented 3 years ago

OK that explains why the XML look so different. I don't really mind either way, it was just difficult to diff. The workaround seems fine.

Not sure if this key folder issue has any real functional effect, but it does look different to the casual observer, that's how I noticed.

Be assured, I am not the least disappointed for finding any of these things. At least while you're not offended by me reporting them here. 😉 I should also add: Thanks for building the muddle in the first place! Especially the github action now makes infrastructure so much easier. Love it!

demonnic commented 3 years ago

Nah, it's honestly helpful to have someone else using it so they can see all the dark corners I'm unconsciously ignoring 😆 I just know I can only dedicate time to the tool in fits and spurts and don't want to set expectations too high on turn around time =)

demonnic commented 3 years ago

ok, I looked and I am specifically setting it to -1 for key folders which means something at the time made me think that was correct. That being said it's clearly not how Mudlet is handling it now in any case, and I may as well make it look like the ones from Mudlet in the default case. I've crafted the change and it will be in the next release. Just don't want to release two days in a row.

demonnic commented 3 years ago

This was changed in 0.8 to match a freshly created package, let me know/reopen the issue if there's more need =)