Make ON/OFF labels clickable - #101
Conversation
|
There is a fight for every byte :) so it was luxury to add id’s there. |
|
well... to avoid using "id" and saving some bytes you can enclose |
mkukik
left a comment
There was a problem hiding this comment.
there is no need to do this... just put input inside label
|
@mkukik Not bad, that works too. |
|
Sorry for the delay ... tied up with some medical issues. Could you explain a little more what this does? If you click on the "name" of an I/O it will toggle it on/off? Then click "Save" to signal the firmware to save the new state? |
|
this is just user experience enhancement... so the label is also clickable making it easier to interact with... and there is no cost of extra bytes needed with my solution |
|
Thank you for the explanation. I like this idea. I'll get to the merge and release as soon as I can. Mike |
|
Hi Niko-O - I finally had some time to review the code and consider the change. Despite the complexity of the overall code I will admit right up front that I consider myself to be a less than stellar coder or github user. But I get along. Keeping that in mind and that I might say some amateur things, here are my comments and discussion:
|
This is the newcode:
|
|
OK - This is great. Yes I forgot about the backtick problem ... and will probably continue to forget. My apologies for the delays. Many life complications lately. |
|
Awesome! And don't overwork yourself because of this project. It's not critical. Regarding the key file: I did that and it seems I got a working one, but it seems that the compiler prompts me to specify the key file every single time it is started, which is multiple times per compilation cycle. And even then, things just didn't work for no apparent reason. I just don't have the patience for that, so I gave up, and I'm fine with that. |
|
It's probably something simple like the license file copied to the wrong directory. Doesn't matter. I've got this change covered and you can decide to try again later if you take over your own version of the code. |
|
=) Sorry for the mess. I am also learning review functionality in Visual Studio Code. The last is proper one (b73a9dc). |
|
@nielsonm236 Where is our current JS/HTML playground url. Can you post me the link? |
|
The last links I had were yours. I'll send by email. |
|
Via email I discussed the proposed changes recommended by yozik04 and his looks likes a better implementation (consumes no additional bytes of Flash). So now I'm a little confused about what to merge. yozik04: If I click review on the code in this issue list I see the change only in the MQTT Javascript (but not in the Browser Javascript). So simply merging what is here gives an incomplete result. |
|
Now I moved it in all places. |
|
Unfortunately, I don't know Git well enough either. |
|
😄 let's learn something new and fix this pull request. |
|
I am not actually sure who should accept the requested changes. @Niko-O or @nielsonm236. I think @Niko-O because he is owner of this pull request. |
|
Niko-O: When you open the issue do you see anything that looks like an "accept changes" button? I don't see one on my screen. Right now the "Merge pull request" button is grayed out. It looks like I might be able to force a merge, but I agree with yozik04 ... if we can follow github process and learn something that would be useful. |
|
Niko-O: Additional question. It looks like you might have cloned the code to your own repository, then worked on changes. Is this correct? If yes, I don't think I can directly merge the changes, but might have to copy them over to my repository. I sent a separate email to yozik04 on this subject. We're all in greatly different time zones so replies might be delayed. |
|
@Niko-O Approve is right thing. Please approve all my suggestions. |
|
In the end I approved them myself 🤣 |
|
yozik04: "Approve changes" still didn't appear for me when I followed your suggestion. But it appears you were able to approve yourself. Yes, and odd usability situation. Now "Merge pull request" is no longer grayed out. I will click on that and see what happens. :-) |
|
I think I still have write access to this repo. @nielsonm236 you know how to merge it. Feel free. I have rechecked it once again. |
|
Yeeey!!! Champagne! |
|
Perhaps champagne soon. Merge looks successful - after refresh I see the changes in my local working directory. I will create a test build, test it myself, and send test builds by email. Yeah, I know I can do that with github but this old dog is having trouble enough with that. |
|
I can also help test |
|
It would be nice, though, if you could upload a/the release to GitHub, too. |
|
yozik04: I tried the build with Chrome, Edge, and Firefox. Despite seeing it work in the JS Playground, it doesn't appear to work in actual use. Very puzzling. I'm attaching the runtime code and httpd.c file in case you see something I don't. |
|
I can't see the problem from the code. |
|
@nielsonm236 Please send me IO Control HTML source code from the browser DevTools. I do not have time to flash and configure my spare unit today. |
|
httpd.c is good. |
|
@yozik04 I think I captured what you requested. See file. |
|
@nielsonm236 this is old version. Are you sure you have flashed it with freshly compiled? |
|
I've tried several things - none have worked.
|
|
Wait ... I think I found it. I see that the changes we made directly affect the non-upgradeable versions. I'm using an upgradeable version. I must be forgetting a step to create the upgradeable webpages. Give me a bit to think this through. |
|
OK - figured it out. The directly programmed versions should work just fine as is (using the SWIM interface to program the device). But I forgot to generate the "strings.sx" file and install it when doing my testing with the upgradeable code that is installed over ethernet. I've now completed that process and it looks like it is working fine. Even though users may never have to generate a strings.sx file I need to document that process for my own sanity. And I should make the strings generator program available just in case I get hit by a bus and someone else needs to pick this up. I did some how-to reading and will put this code "pre-release" on GitHub as you guys suggested. After you think it looks like it is working I'll make it a production release. Should be available within the hour. |
Usability Enhancement: Make ON/OFF labels clickable
|
Put the pre-release on GitHub. Let me know if it works. Appears to work for me. I'll update it to "General Release" if we don't find anything wrong. |
|
I've now tested on 7 boards, MQTT and Browser versions, with Chrome and Firefox. @jmcvieira1 one of those test boards is your expansion design. All my tests are using the ethernet upgradeable version of the code (rather than the SWIM programmed version). Looks good to me. |
|
I´m testing on two board´s the upgradeable browser and the MQTT versions, i let it running over night and so far is running fine. |
|
@jmcvieira1 Clicking on the ON/OFF labels works for you? What OS and Browser? Just checking to see if OS/Browser combos other than what I'm using are working. Later when I get home I will check Safari on my iPhone. |
|
Yes work´s fine tested with Windows 10 Home 20H2 19042.1466 |
|
@jmcvieira1 Thank you! |
|
Also tested on an old system with Windows 10 Pro 1909 18363.836 |
|
Tested it just now on three devices (browser-only version) and it works fine. |
|
Great! I'll get this converted to a Production release. Good working with you. |
|
Addressed in Release 20220921 0500 |






If you have an
<input type="radio">, then you can make the associated<label>clickable by giving the input an ID and specifying that ID in theforattribute of the label:<input type="radio" id="Foo"><label for="Foo">I refuse to put up with the BS hurdle race of compiling with the STM8 toolchain, but I would greatly appreciate if you could release a new version with this change.