Skip to content
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

Add emulation radio and hidden file checkbox labels #22432

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

scop
Copy link
Contributor

@scop scop commented Nov 5, 2024

Description:

Related issue (if applicable): fixes #

Add <label> elements to radio buttons and checkboxes that are missing one.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.0.241030
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@@ -2315,7 +2315,7 @@ void HandleOtherConfiguration(void) {
if (i == EMUL_HUE) { i++; }
#endif
if (i < EMUL_MAX) {
WSContentSend_P(PSTR("<input id='r%d' name='b2' type='radio' value='%d'%s><b>%s</b> %s<br>"), // Different id only used for labels
WSContentSend_P(PSTR("<label><input id='r%d' name='b2' type='radio' value='%d'%s><b>%s</b> %s</label><br>"), // Different id only used for labels
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the "Different id only used for labels" comment refers to. Did not find where the ids would be used, and there were no labels before this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we need to enclose all this in <label>?

@arendst
Copy link
Owner

arendst commented Nov 8, 2024

Wasting code space without adding functionality.

@arendst arendst closed this Nov 8, 2024
@scop
Copy link
Contributor Author

scop commented Nov 14, 2024

The whole point of this PR is that it does add functionality. After wrapping the radio button or checkbox with its label, one can click on the label text to activate the wrapped radio/checkbox, so one does not have to so accurately aim at the small radio/checkbox itself.

Further, all other checkboxes and radio buttons that I could find besides ones in this PR are already wrapped in <label>s in Tasmota's HTML.

Please reconsider and reopen.

@arendst arendst reopened this Nov 15, 2024
@arendst arendst merged commit aeceace into arendst:development Nov 15, 2024
@scop scop deleted the radio-checkbox-labels branch November 17, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants