Advanced button behaviour



  • The "Advanced" button on different pages behaves a little differently.
    @Jimp has reported:

    I did not get around to looking at the advanced toggling issue itself, that's likely worthy of its own thread and redmine entry, I did test things when I was working though and found it is also inconsistent across pages:

    Advanced buttons toggle test:

    services_dhcp.php: Toggles OK
    system_gateways_edit.php: Toggles OK
    interfaces_ppps_edit.php: Toggles OK

    services_dhcp_edit.php: Does not toggle
    services_dhcpv6.php: Does not toggle
    services_ntpd.php: Does not toggle
    services_ntpd_gps.php: Does not toggle
    services_unbound.php: Does not toggle
    firewall_rules_edit.php: Does not toggle

    firewall_nat_edit.php: Button disappears

    I see the following different ways it has been/could be done:

    1. a) Click the Advanced button, the Advanced fields are shown and the Advanced button is hidden (i.e. the user can't then hide the Advanced fields - they have to refresh the page to get the Advanced button back)
      b) On edit page load, if any Advanced fields are already non-default then display the Advanced fields and hide the Advanced button.

    2. a) Click the Advanced button, the Advanced fields are shown and leave the Advanced button showing.
      b) Click the Advanced button again to hide the Advanced fields
      c) On edit page load, if any Advanced fields are already non-default then display the Advanced fields as well as the Advanced button.

    3. As for (2) but make the text/icon of the Advanced button change to say/show what it does - "Display Advanced"/"Hide Advanced".

    Personally I find that (1) is fine - once I open a set of Advanced fields then I don't care about being able to hide them again. If it turns out that I don't need to enter anything in an Advanced field, then fine, I just ignore them and press Save.

    First there needs to be agreement about how the Advanced button is supposed to behave, then someone can code them all the same.

    Opinions please…



  • I personally prefer option #3.  It's the way a lot of other applications work in GUI environments.

    Bill


  • Developer Netgate

    My preference is #3 too. I would also like to use a consistent style for the "Advanced" buttons. btn-info perhaps, and and fa-binoculars icon?

    I added a lot of show/hide Javascript to the project, but I did not go back and change pages that had already been converted by others. It would be good to do that.



  • @Steve_B:

    I added a lot of show/hide Javascript to the project, but I did not go back and change pages that had already been converted by others. It would be good to do that.

    I like the use of show/hide JavaScript, too. It helps "unclutter" a page when you have optional settings that most users won't need to set and thus really don't need to see.  As Phil mentioned earlier, when a page loads and those optional fields have been set with values, then the JavaScript can run at the end of the page load to show the relevant pieces.  If set to their default empty values, then they can be hidden by the page load JavaScript.

    Don't forget about the new collapsible Sections.  They make a good way to hide optional stuff, too. I am using those in the Snort package in some places.  For example, on the PREPROCESSORS tab, if a preprocessor is not enabled then its entire Section is collapsed.  On the other hand, if the preprocessor is enabled, the Section is displayed open.

    Bill


  • Rebel Alliance Developer Netgate

    @Steve_B:

    I would also like to use a consistent style for the "Advanced" buttons. btn-info perhaps, and and fa-binoculars icon?

    I already took care of that.  8) They should all now have btn-info and fa-cog, seemed more appropriate for additional settings.


  • Developer Netgate

    fa-beer has advantages at this time on a Friday afternoon too :)



  • I raised Redmine ToDo https://redmine.pfsense.org/issues/5994
    I am happy to have a look at it tonight (= Tuesday day for US time). Once I get one of the Advanced buttons working consistently it should be mindless code hacking after that.


  • Rebel Alliance Developer Netgate

    One more for the pile: interfaces_bridge_edit.php has a checkbox to 'show advanced' that expands the other settings


Log in to reply