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

WiFiManagerParameter Checkboxes and Radios #1775

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Commits on Oct 30, 2024

  1. Refactor parameter 'length' as 'maxLength'

    This does *not* refer to the length of the string passed in, or the length of the string currently stored. This refers to the maximum length of the HTML form, and the size of the class buffer to hold the value.
    
    Note that this does *not* change the internal _length name, because the variable is exposed as protected and through friendship with WiFiManager. It is however marked deprecated and can be changed on the next major release.
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    0df7c77 View commit details
    Browse the repository at this point in the history
  2. Change param value length function name

    To clarify that the function returns the *max* possible length, and not the length of the current value.
    
    Deprecating getValueLength for removal on next major release.
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    f75dd98 View commit details
    Browse the repository at this point in the history
  3. Change param getID to getName

    In HTML forms names and IDs are two different things. Although this value is applied to both attributes, the form data corresponds to the name, *not* the ID. This causes confusion if we want the name and ID to differ, since we are currently calling the name the ID.
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    dd38239 View commit details
    Browse the repository at this point in the history
  4. Add setValueReceived function to params

    For intercepting the value received from the server in derived classes
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    b002b03 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c781390 View commit details
    Browse the repository at this point in the history
  6. Add negative check to param max length

    Preventing a new default value from being assigned if the max length is set to a negative value
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    2703370 View commit details
    Browse the repository at this point in the history
  7. Make param destructor virtual

    Because this is polymorphic, the destructor needs to be virtual to allow for properly clearing data
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    246d521 View commit details
    Browse the repository at this point in the history
  8. Move param HTML generation to class

    This creates better encapsulation, and allows it to be overridden by child classes.
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    944589c View commit details
    Browse the repository at this point in the history
  9. Remove param token "I" processing

    This is unused and awkward because it must be done within the manager class to use the loop parameter, since passing the loop value to the parameter object would be odd. Removing it makes the most sense, although it is technically a breaking change if the user has custom string files.
    dmadison committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    c4665fc View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Add checkbox parameter class

    dmadison committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    5d7848f View commit details
    Browse the repository at this point in the history
  2. Add radio parameter class

    dmadison committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    e14c8d7 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Use class for parameter radio options

    This makes it possible to declare options at the same time as the radio object, and provides for more flexibility.
    dmadison committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6f1a50a View commit details
    Browse the repository at this point in the history
  2. Fix radio option constructor formatting

    No functional change
    dmadison committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    aaf64c3 View commit details
    Browse the repository at this point in the history