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

Revised Special & Global Functions layout. #2992

Merged
merged 19 commits into from
Jan 23, 2023

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Jan 6, 2023

Summary of changes:

  • Convert the page to use the flex layout
  • Move the function name into the button control for an active function so the entire row acts as a button
  • Displays the active functions first with fixed height for each line
  • Displays the inactive functions second as a grid so there is less to scroll through

Screen Shot 2023-01-06 at 6 30 30 pm

Screen Shot 2023-01-06 at 6 30 46 pm

@froqstar
Copy link

froqstar commented Jan 6, 2023

What if, instead of listing all the inactive special functions, we just have an "add" button at the bottom like we have with mixes?

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 6, 2023

You can select one of the active functions and then choose 'Copy' from the menu.
Then on an inactive one you can choose 'Paste' from the menu.

With just an 'Add' button it would be more difficult to manage the copy/paste.

Also I like to use certain function numbers for the same operation across different models. I find it easier to manage this way. With just an 'Add' button it would be harder to pick a specific function to edit.

@Eldenroot
Copy link
Contributor

Nice improvement

@ParkerEde
Copy link
Contributor

ParkerEde commented Jan 6, 2023

This implementation is certainly good for touch operation. However, it is a degradation for non-touch color displays. I have for example from SF2 to SF20 some functions and in the range 50 to 64. If I now want to create SF1, you have to scroll a lot (up or down) to get to the button SF1. This implementation should only be used for touch radios, if at all. I personally have the feeling that with this implementation a lot of clarity is lost.
One suggestion: If there was a button in the headline row that would take you directly to the top of the free SF buttons, it would make it much easier to reach them.

@Eldenroot
Copy link
Contributor

OK, but I think it is a good start :) we ca discuss :)

@pfeerick
Copy link
Member

pfeerick commented Jan 8, 2023

However, it is a degradation for non-touch color displays. I have for example from SF2 to SF20 some functions and in the range 50 to 64. If I now want to create SF1, you have to scroll a lot (up or down) to get to the button SF1.

How is that different from the current behaviour, in which a similar complaint could be made, since it is a fixed table, and you have to scroll through all the rows regardless of if there are entries present or not, rather than just scroll through the rows with content?

However, I do get that coming from fixed table view, how this can be seen as a loss of clarity, as sometimes you leave blank SFs so you can group SFs related together, etc.

You can select one of the active functions and then choose 'Copy' from the menu.
Then on an inactive one you can choose 'Paste' from the menu.

This is actually something I find lacking in the new Mixer layout... before, you could copy an existing mixer line into a specific new one... i.e. what if I want to assign something to channel 32 on a five-channel model? (yes, that is a thing - for some special mixes and working with some lua scripts). Before I could just copy, scroll to 32, and paste. Now I have to create 32, then copy and well, um... there's no paste anymore (only paste before and after)... ok... that's because paste only appears for empty mixer lines... oh dear.

@pfeerick pfeerick added color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour labels Jan 8, 2023
@philmoz
Copy link
Collaborator Author

philmoz commented Jan 8, 2023

Away from main system at the moment so I can't try things; but a couple of thoughts:

  • long press of enter button in SF/GF window to scroll to the first inactive function
  • long press to bring up menu with options like 'Select first inactive', 'Add new', ...

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 10, 2023

I have added a long press handler that will jump to the first free function (if pressed on an active function), or the first active function if pressed on a free function.

@ParkerEde
Copy link
Contributor

Yes, this is now much easier to use thanks to the long press handler. Really good. One small problem has now come to my attention.
Assumed I have 10 SF rows. If I "delete" the second table entry (not "delete row"), the cursor jumps to the second free SF button. I think it would be clearer if it jumps to the next existing entry. What do think about it?

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 10, 2023

@ParkerEde The code currently tries to re-select the entry number that was focussed before any operation.

For example suppose you have SF1, SF2 and SF4 as active functions and SF3 as an empty one.
If you delete SF2, then all the functions move up 1, so SF3 becomes SF2, SF4 becomes SF3, etc.

When SF2 is re-selected as the focussed function it is still an empty one so the screen jumps to show it.

If you clear an active function it will become empty; but remain focussed so the screen will again scroll to the empty function section.

@ParkerEde
Copy link
Contributor

ParkerEde commented Jan 10, 2023

@philmoz
Just to make sure there is no misunderstanding here. I have only selected "Clear". The following lines do not move up and the cursor jumps away. Here I would find it clearer, it would simply jump to the next existing entry.

If I select "Delete" , where SF3 then becomes SF2, SF4 then SF3 etc., it already works correctly.

Sorry, I just built the EN version to be able to name the correct menu item

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 10, 2023

@ParkerEde I understand what you are saying - I was just trying to explain how the logic currently works. I need to think about it more to see if I can come up with an alternative.

@ParkerEde
Copy link
Contributor

@philmoz Perfect. Many many many thanks for your effort.

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 10, 2023

After using this some more, and trying it with some non-technical club members, I've decided to revert the list to the original numerical sort order. Although the grouped order looked nicer it is not intuitive to use.

Where possible the empty functions are still grouped on a single line to reduce the vertical size.

I have also made the button press handling consistent by always having a popup context menu. As well as being consistent behaviour it means you can use the insert and delete actions on empty function to manage the list.

Screen Shot 2023-01-11 at 8 32 56 am

Screen Shot 2023-01-11 at 8 33 17 am

@ParkerEde
Copy link
Contributor

I like it better that way, too. The overview is also restored. "Clear" and "Delete" also works well again. Good work.

@philmoz philmoz force-pushed the special-functions-layout branch from 792844d to c3821ce Compare January 11, 2023 06:30
@ParkerEde
Copy link
Contributor

I've checked last state 66d9f54
The cursor always jumps to the top after "Clear" or "Delete". With "Clear" the same line should remain marked and with "Delete" the next entry present in the list should be jumped to.

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 11, 2023

@ParkerEde Thanks for testing - should be fixed now.

@JimB40
Copy link
Collaborator

JimB40 commented Jan 12, 2023

@philmoz Please unify lists visually changing to flex.
Visually SF List is same like Outputs.
Part of 2.9 goal is to unify UI/UX

In terms of indexing (if to show free numeric slots, how to design UX of adding & displaying) we have to discuss

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 12, 2023

@JimB40 Do you mean like this? If I use the button style from the the model outputs page then functions that are active (i.e. their switch is on) show with the background as light blue (secondary3 colour) instead of yellow (active colour).

Screen Shot 2023-01-12 at 5 00 15 pm

@JimB40
Copy link
Collaborator

JimB40 commented Jan 12, 2023

As agreed. Use Inpusts/Mixes styling for list and I'm making issue to fix ACTIVE color in this style.

edit: #3021

@ParkerEde
Copy link
Contributor

checked a98e9b3
It looks good for me now.

@JimB40
Copy link
Collaborator

JimB40 commented Jan 12, 2023

Btw @philmoz I have checked data variances and it can be hard to fit all of them in one line

Examples of longest

  • Switch - !WWWW (telemetry sensor name) + switch icon
  • Func - "Set Main Screen"

Then parameters depoendent on Func type
Set

  • Timer - "Timer 3"
  • Value - "08:59:59

Adjust

  • Global var - "GV5"
  • Mode - "Inc/Decrement"
  • Inc/Decrement - "+= 2048"

Play Track

  • Value - 'WWWWWW' (wav filename 6 characters) + icon

Set Main Screen

  • Value - "5"

Then for some of functions
Repeat - "60s"

For others
Enable - check box

By the way does anybody know what is purpose on Enable switch???
This feature is implemented for half of functions types

@pfeerick
Copy link
Member

By the way does anybody know what is purpose on Enable switch???
This feature is implemented for half of functions types

Literally that - it enables or disables that SF/GF. The fact that it is not implemented for all is annoying... i.e. I'd like to have a Screenshot GF, but disable it so that it's configured but doesn't hog the switch until I want it... but guess what SF/GF doesn't have the enable toggle? 😆

@JimB40
Copy link
Collaborator

JimB40 commented Jan 12, 2023

Ok I thought so. Just confirming.
Do you know @pfeerick why Enable is not implemented for some of functions like Screenshot you mentioned? :)
Overlooked during coding?

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 12, 2023

I have checked data variances and it can be hard to fit all of them in one line

I guess that's why it uses two lines to display special/global functions and logical switches.
It would be almost impossible to fit on one line on a portrait orientation screen.

@JimB40
Copy link
Collaborator

JimB40 commented Jan 12, 2023

portrait is easier with data overview as it has a lot vertical space.
I think we have to go with flex - auto increasing line height and moving data elements to the second line if there are more elements) as there are too many options to fix positions.

@ParkerEde
Copy link
Contributor

how would it be to be able to assign individual descriptive names for SF and LS and then display only this in the row?

Phil Mitchell added 10 commits January 20, 2023 15:46
…ected button after editing or changes to list.
Display function as more readable expression instead of discrete values.
Single line display for overview button on landscape screen.
Fix display when editing GVAR INC/DEC value (was '--' instead of '-=').
Fix incorrect module displayed for 'Set Failsafe' (swapped).
Show all parameter and values for each function type in overview.
@philmoz philmoz force-pushed the special-functions-layout branch from e2ea35d to 62b2335 Compare January 20, 2023 04:46
@mha1
Copy link
Contributor

mha1 commented Jan 20, 2023

@philmoz Thanks for all the good work you do!

While working on Special Functions and migrating Logical Switches: could you please have a look at the different column padding between those two. I think it would be nice to have a Special Functions padding with more room for the 1st column like in Logical Switches. So retaining the Logical Switches padding for the migration and adjust Special Functions to the same padding. Possible?

image

@mha1
Copy link
Contributor

mha1 commented Jan 21, 2023

Thanks!

@pfeerick pfeerick self-assigned this Jan 23, 2023
@pfeerick
Copy link
Member

Final state of this looks and works great on TX16S and NV14. Thanks for all the discussion and work on this! :)

@pfeerick pfeerick added this to the 2.9 milestone Jan 23, 2023
@pfeerick pfeerick merged commit 5503048 into EdgeTX:main Jan 23, 2023
mha1 added a commit to mha1/edgetx that referenced this pull request Jan 23, 2023
Changes:
- the log period range is now 0.1s to 25.5s
- upon creation of a new SD Logs SF the period is initialized to 1.0s
- text "Value" is changed to "Period" to indicate parameter represents the log period

ToDo:
- translations for "Period" if desired

rebase due to EdgeTX#2992
mha1 added a commit to mha1/edgetx that referenced this pull request Jan 23, 2023
pfeerick added a commit that referenced this pull request Jan 27, 2023
* fixes #2965

Changes:
- the log period range is now 0.1s to 25.5s
- upon creation of a new SD Logs SF the period is initialized to 1.0s
- text "Value" is changed to "Period" to indicate parameter represents the log period

ToDo:
- translations for "Period" if desired

rebase due to #2992

* changed Period to Interval

Added translations for DA, DE, EN, IT, PL

* added defaults for TR_INTERVAL to language files

* fixed problem with too many leading zeros for intervals less than 1s.

before: 00.5s
after: 0.5s

* added CZ translations for TR_PERIOD and TR_INTERVAL

changed EN TR_FUNC from "Func" to "Function"

* updated TR_FUNC for CZ, DA, IT, JP, PL

updated TR_PERIOD and TR_INTERVAL for JP

* added TR_PERIOD,  TR_INTERVAL, TR_FUNC for SE

* implemented TR_SF_SWITCH and logic to change between TR_SWITCH and TR_SF_SWITCH

* 212x64 radios: single source for #define TR_LSW_HEADERS in language files

deleted redundant defines

* changed 128x64 and 212x64 SF SD Logs to same logic as colorlcd with

- minimum log interval 0.1s
- maximum log interval 25.5s
- default log interval 1.0s

TX12_Sim and X9D_Sim tested ok

* migrated functional changes due to PR #2992

* missed updating TW language file

* fix: Always `STR_SF_SWITCH` regardless of SF

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
mha1 pushed a commit to mha1/edgetx that referenced this pull request Jan 27, 2023
* Convert Special / Global function page to flex layout.
Move function name text into row button so entire row acts as a button.
Display active functions first, then inactive functions as smaller buttons in a grid.

* Merge duplicate cases in switch, fix indentation.

* Keep selected button focussed after editing a function.
Add long press handler to jump between free and used functions.

* Revert to numerical order for functions list.
Use context menu for empty functions all the time.

* Fix parameter type and remove redundant lines.

* Fix incorrect function being selected when changing tabs.

* Fix selection of focussed button when using 'Clear', 'Delete' and switching tabs.

* Change button style to match input/mixes/outputs pages.

* Fix checked state display for buttons.

* Fix scroll position when adding new entries at the bottom. Center selected button after editing or changes to list.

* Remove logic that tries to center scroll around selected button (not working).

* Convert overview button to lvgl grid.
Display function as more readable expression instead of discrete values.
Single line display for overview button on landscape screen.
Fix display when editing GVAR INC/DEC value (was '--' instead of '-=').
Fix incorrect module displayed for 'Set Failsafe' (swapped).
Show all parameter and values for each function type in overview.

* Fix 'Enabled' indicator so it is not selectable with the scroll wheel and looks less like a radio button.

* Remove empty buttons and add a single '+' button at the bottom to match inputs and mixes.

* Add long press handler for quick access to the '+' button functions.

* Ensure addButton is initialised if not needed (list is full).

* Use formatNumberAsString helper function.

* Adjust grid spacing.

* fix: `STR_VALUE` not `STR_VOLUME`
mha1 added a commit to mha1/edgetx that referenced this pull request Jan 27, 2023
* fixes EdgeTX#2965

Changes:
- the log period range is now 0.1s to 25.5s
- upon creation of a new SD Logs SF the period is initialized to 1.0s
- text "Value" is changed to "Period" to indicate parameter represents the log period

ToDo:
- translations for "Period" if desired

rebase due to EdgeTX#2992

* changed Period to Interval

Added translations for DA, DE, EN, IT, PL

* added defaults for TR_INTERVAL to language files

* fixed problem with too many leading zeros for intervals less than 1s.

before: 00.5s
after: 0.5s

* added CZ translations for TR_PERIOD and TR_INTERVAL

changed EN TR_FUNC from "Func" to "Function"

* updated TR_FUNC for CZ, DA, IT, JP, PL

updated TR_PERIOD and TR_INTERVAL for JP

* added TR_PERIOD,  TR_INTERVAL, TR_FUNC for SE

* implemented TR_SF_SWITCH and logic to change between TR_SWITCH and TR_SF_SWITCH

* 212x64 radios: single source for #define TR_LSW_HEADERS in language files

deleted redundant defines

* changed 128x64 and 212x64 SF SD Logs to same logic as colorlcd with

- minimum log interval 0.1s
- maximum log interval 25.5s
- default log interval 1.0s

TX12_Sim and X9D_Sim tested ok

* migrated functional changes due to PR EdgeTX#2992

* missed updating TW language file

* fix: Always `STR_SF_SWITCH` regardless of SF

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
@JimB40 JimB40 mentioned this pull request Feb 21, 2023
23 tasks
@philmoz philmoz deleted the special-functions-layout branch September 20, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants