UrlChecker icon indicating copy to clipboard operation
UrlChecker copied to clipboard

Flags module improvement

Open TrianguloY opened this issue 1 year ago • 2 comments

Describe a related problem (optional)

Following discussion from https://github.com/TrianguloY/UrlChecker/pull/198#issuecomment-1465158250, and as @PabloOQ requested, here are some possible improvements to the new flags module.

Describe your suggested feature

Internal: Keep the list of flags (autodetected by reflection from the device) on a ready to use list.

Configuration: Show a button that, when pressed, will open a dialog list where each element corresponds to one of the available flags with: 1) a checkbox (or a spinner, or a button) with three states 'set', 'clear' and 'auto'; 2) a checkbox with two states 'show' and 'hide'. When the user presses a checkbox it changes from its possible states, and the setting is saved. When the user closes the dialog and reopens it, the state is restored. Initial values need to be configured by code (but for a first implementation hardcoded 'auto' and 'hide' is enough).

Mockup: image

Dialog: The dialog will show a list of elements (preferably in horizontal or grid). for each of the flags configured as 'show' it will show a checkbox (or button) with two states: 'set' and 'clear'. If a button is used an image of a flag and a strikethrough flag can be considered. The initial state of this button will depend on the configured previously for that flag: 'set' -> the flag will be 'set', 'clear' -> the flag will be 'clear', 'auto' -> the flag will be set or clear depending on its presence in the current intent. Additionally, a '+' (or '>') button at the end, when pressed, will show again a list for all flags (configured as shown or not) with that same checkbox/button, with the same functionality. If possible, include a 'filter' checkbox in this popup list to filter entries based on the input. When the user opens an url, only the flags that are enabled on the list are applied.

Mockup: image image

Describe alternatives you've considered for your suggested feature

No response

Other details

This are just my ideas in case someone wants to try implementing them sometime, suggestions are welcomed.

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I will fill out all of the requested information in this form.

TrianguloY avatar Mar 13 '23 18:03 TrianguloY

I don't promise anything but I'll try to do it next week.

Something I think could be useful is adding some kind of indicator in the dialog, so the user knows the default state of the flags, or the preset that was applied first, maybe color coded background like the pattern checker module:

  • No color: default
  • Green: Modified by a preset
  • Yellow: Modified by the user

Also a selector for multiple presets.

PabloOQ avatar Mar 31 '23 18:03 PabloOQ

Don't worry, just do your best, I'm sure it'll be good (or if not it'll sure be a nice base for me).

The colors seem useful, yes. There are a couple custom functions for easy set/clear, but not sure if they'll work on checkboxes or buttons.

As for the templates...I totally forgot about them 😅. Maybe a "save as template" button in the settings, with another button to view and delete them, and another list in the dialog to apply them? Hmm, too many buttons, I'm afraid it'll be a bit crowded...probably it's better to start with something simple.

TrianguloY avatar Mar 31 '23 19:03 TrianguloY