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

[Slider] New library for input via sliders #2953

Merged
merged 105 commits into from
Oct 19, 2023

Commits on Oct 17, 2023

  1. libslider: new library with conf. slider

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    89f0df1 View commit details
    Browse the repository at this point in the history
  2. libslider: export method, add test app.

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    1bc45a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    904935b View commit details
    Browse the repository at this point in the history
  4. libslider: link files to storage in metadata.

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    18662e5 View commit details
    Browse the repository at this point in the history
  5. libslider:fix lib

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0fb9569 View commit details
    Browse the repository at this point in the history
  6. libslider: tweaks to the lib and the test app

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    91055f1 View commit details
    Browse the repository at this point in the history
  7. libslider: refactor to split logic and graphics

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    d25f09d View commit details
    Browse the repository at this point in the history
  8. libslider: Add configurability.

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0a81020 View commit details
    Browse the repository at this point in the history
  9. libslider: init w current android audio level

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9909ff7 View commit details
    Browse the repository at this point in the history
  10. libslider: update and wait for volume level...

    ... from android before initiating the slider.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3824a5e View commit details
    Browse the repository at this point in the history
  11. libslider: draw outer border only once on init

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    2b1d209 View commit details
    Browse the repository at this point in the history
  12. libslider: remove rounded corners ...

    ... to make debugging graphics easier.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    cdf10ac View commit details
    Browse the repository at this point in the history
  13. libslider: graphics now behave on low levels...

    ... keeping the border intact. (Still some problems if the rectangle is
    given rounded corners)
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    4f5929b View commit details
    Browse the repository at this point in the history
  14. libslider: lock input method to first e.x position

    Before you could alternate between 'increment' mode and 'map' mode by
    `drag`ing horizontally. Now you can't. This makes it much less likely to
    accidentally trigger near maximum level when you just wanted to
    increment the level.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    2ce848b View commit details
    Browse the repository at this point in the history
  15. libslider: move stopEventPropagation on top

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3b17433 View commit details
    Browse the repository at this point in the history
  16. libslider: disable timeout

    ...by passing in `timeout:'no'`.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    a00fdc1 View commit details
    Browse the repository at this point in the history
  17. libslider: split and move to modules and test app

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3c21342 View commit details
    Browse the repository at this point in the history
  18. slidertest: remove slider test app

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    2ad99fe View commit details
    Browse the repository at this point in the history
  19. SliderInput: be lazy about running callback funct

    only run if the sliders level was changed.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3290332 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    49d8346 View commit details
    Browse the repository at this point in the history
  21. SliderInput: add horizontal configuration

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ffab963 View commit details
    Browse the repository at this point in the history
  22. SliderInput: refactor to not use LCD overlay

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    604350e View commit details
    Browse the repository at this point in the history
  23. SliderInput: (WIP) fix rotation after refactor

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ead101b View commit details
    Browse the repository at this point in the history
  24. SliderInput: precalculate static rectangles

    also remove unneeded variable 'levelHeight'
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    afa7fd9 View commit details
    Browse the repository at this point in the history
  25. SliderInput: load test app on load from Web IDE

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c86fd34 View commit details
    Browse the repository at this point in the history
  26. SliderInput: fix slider graphics

    that was a little off after changing from using LCD overlay.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    abfca68 View commit details
    Browse the repository at this point in the history
  27. SliderInput: tweaks for showing multiple sliders

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    a7787ab View commit details
    Browse the repository at this point in the history
  28. SliderInput: default graphics depend on appRect

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    644d23a View commit details
    Browse the repository at this point in the history
  29. SliderInput: add function to auto progress

    making it possible to track progress in e.g. a song.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    87a8593 View commit details
    Browse the repository at this point in the history
  30. SliderInput: contain config in an object

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    53242e8 View commit details
    Browse the repository at this point in the history
  31. SliderInput:refactor to return obj w funcs & vars

    ... making it possible to interact with the slider reachable in the scope
    where the slider was initiated from.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    7e906ed View commit details
    Browse the repository at this point in the history
  32. SliderInput: vim auto-format + format tweak

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    b69274f View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    4ca116a View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a353fdb View commit details
    Browse the repository at this point in the history
  35. SliderInput: add stopAutoUpdate function

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0f9cb53 View commit details
    Browse the repository at this point in the history
  36. SliderInput: fix inability to initiate w level 0

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    f10ff21 View commit details
    Browse the repository at this point in the history
  37. SliderInput: change name to "Slider.js"

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c24499d View commit details
    Browse the repository at this point in the history
  38. Slider: add callback on auto progress

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    873fcca View commit details
    Browse the repository at this point in the history
  39. Slider: make drawing borders optional

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9f7b658 View commit details
    Browse the repository at this point in the history
  40. Slider: option to set border size

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    5b19330 View commit details
    Browse the repository at this point in the history
  41. Slider: hide slider while still auto incrementing

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    5df5f56 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    d157f51 View commit details
    Browse the repository at this point in the history
  43. Slider: draw directly when starting auto update

    ... if the slider should be drawn. Otherwise will just keep track of
    position to draw later.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9407430 View commit details
    Browse the repository at this point in the history
  44. Slider: change to only add required parts

    ... depending on how the slider is configured when initializing.
    Assumed to reduce ram use, have not tested to see if it actually is an
    improvement in rem use or general performance in practice.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9e978b2 View commit details
    Browse the repository at this point in the history
  45. Slider: list currLevel among the constants

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ef650f5 View commit details
    Browse the repository at this point in the history
  46. Slider: fix dy not initialized for increment mode

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    14dd207 View commit details
    Browse the repository at this point in the history
  47. Slider: add ability to limit drag area

    ... of the sliders drag handler.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    8e6b9c7 View commit details
    Browse the repository at this point in the history
  48. Slider: vim auto format - no functional change

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    31a6de6 View commit details
    Browse the repository at this point in the history
  49. Slider: fix gh workflow error

    ... and fix some warnings from Espruino Web IDE
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    eb00e69 View commit details
    Browse the repository at this point in the history
  50. Slider: set timeoutID to undefined on remove

    ... fixing interference with other timeouts where the same id was assigned to
    another timeout that would be deleted erroneously. This was tracked down
    because a timeout in the `spotrem` version being developed alongside
    this slider module would stop executing code.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    52fe14f View commit details
    Browse the repository at this point in the history
  51. Slider: refine drawing rounded sliders

    So far only tested on a standard config width slider.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    cd4e4ab View commit details
    Browse the repository at this point in the history
  52. Slider: fix logic re rounded or not

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    d2f69df View commit details
    Browse the repository at this point in the history
  53. Slider:map input acounts for size & pos of slider

    ... and also if the slider is rounded.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c2b2620 View commit details
    Browse the repository at this point in the history
  54. Slider: fix level=0 on rounded horizontal sliders

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    6f4b876 View commit details
    Browse the repository at this point in the history
  55. Slider: fix map input for horizontal sliders

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    8c4ad72 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    5657492 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    b9c5245 View commit details
    Browse the repository at this point in the history
  58. Slider: small refactor to shorten code

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    2444e75 View commit details
    Browse the repository at this point in the history
  59. Slider: move let incr into while scope

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    98a6417 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    0952ad9 View commit details
    Browse the repository at this point in the history
  61. Slider: Assign empty function to cb if undefined

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ecd4a7e View commit details
    Browse the repository at this point in the history
  62. Slider: remove some unused vars and consts

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    573fa38 View commit details
    Browse the repository at this point in the history
  63. Slider: Add some documentation

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9c4fd1d View commit details
    Browse the repository at this point in the history
  64. Slider: Add some descriptive comments

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    a238086 View commit details
    Browse the repository at this point in the history
  65. Slider: tweaks to Slider.md documentation

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    17f72c6 View commit details
    Browse the repository at this point in the history
  66. Slider: ebLast and dy only needed with draging

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9b1cfd4 View commit details
    Browse the repository at this point in the history
  67. Slider:use actual current level for auto progress

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    a9562b8 View commit details
    Browse the repository at this point in the history
  68. Slider: tweak documentation in slider.md

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    795fec6 View commit details
    Browse the repository at this point in the history
  69. Slider: reorder default config values

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    944da80 View commit details
    Browse the repository at this point in the history
  70. Slider:move draw and cb to deduplicate code

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    408990d View commit details
    Browse the repository at this point in the history
  71. Slider: ask what the screens height is

    Should make this more likely to work on different size screens.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    bcb6e0c View commit details
    Browse the repository at this point in the history
  72. Slider: disregard laziness on max/min levels

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    01cf0fb View commit details
    Browse the repository at this point in the history
  73. Slider: fix cbObj undefined

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    93112f4 View commit details
    Browse the repository at this point in the history
  74. Slider: callback first, then draw

    as per: espruino#2953 (comment)
    
    To still be able to draw on top of the slider, in the callback wrap the extra drawing inside a `setTimeout(extraDraw,0)` or similar.
    
    Thanks @bobrippling!
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    40c205c View commit details
    Browse the repository at this point in the history
  75. Slider: shorten conditional assignment logic

    Co-authored-by: Rob Pilling <[email protected]>
    2 people authored and thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3adb21d View commit details
    Browse the repository at this point in the history
  76. Slider: remove unnecessary var initialization

    Co-authored-by: Rob Pilling <[email protected]>
    2 people authored and thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3afd9ac View commit details
    Browse the repository at this point in the history
  77. Slider: refactor useIncr/Map -> mode:"incr"/"map"/

    /"mapincr"
    
    Thanks @bobrippling
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9b882c2 View commit details
    Browse the repository at this point in the history
  78. Slider: fix Slider.md code blocks

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    fae1025 View commit details
    Browse the repository at this point in the history
  79. Slider: update Slider.md re mode:"incr"/"map"

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    070d3d4 View commit details
    Browse the repository at this point in the history
  80. Slider: add tip to Slider.md, and tweaks

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    8cf9cd7 View commit details
    Browse the repository at this point in the history
  81. Slider: change currLevel -> initLevel

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ac568fb View commit details
    Browse the repository at this point in the history
  82. Slider:update currLevel->initLevel, and tweaks

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    bbb2907 View commit details
    Browse the repository at this point in the history
  83. Slider: add level to auto callback

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ee5e08d View commit details
    Browse the repository at this point in the history
  84. Slider: add FIXME: comment re error in callback

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    962d874 View commit details
    Browse the repository at this point in the history
  85. Slider: fix callback running prematurely

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9d532a8 View commit details
    Browse the repository at this point in the history
  86. Slider: move let statement out of function scope

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    b2a72dc View commit details
    Browse the repository at this point in the history
  87. Slider:make rounded mode dynamic, depend on width

    Fixes graphics for different size sliders.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    186832f View commit details
    Browse the repository at this point in the history
  88. Slider: add initial comments

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0a1e3a6 View commit details
    Browse the repository at this point in the history
  89. Slider: remove two lines of debug

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0fbcb34 View commit details
    Browse the repository at this point in the history
  90. Slider: scale default borders with appRect width

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ac27deb View commit details
    Browse the repository at this point in the history
  91. Slider: add comment tags

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    cd67e0d View commit details
    Browse the repository at this point in the history
  92. Slider: fix logic re roundedness

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c4ba51a View commit details
    Browse the repository at this point in the history
  93. Slider: update documentation at Slider.md

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    eb52a9a View commit details
    Browse the repository at this point in the history
  94. Slider: remove unnecessary condition check

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    7e01449 View commit details
    Browse the repository at this point in the history
  95. Slider: move and refactor step size calculation

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0c12bfa View commit details
    Browse the repository at this point in the history
  96. Slider: shrink borders if too big

    ... which would cause glitches.
    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    6c1fb8c View commit details
    Browse the repository at this point in the history
  97. Slider: add missing semicolons

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    4d6edb1 View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    5156b8a View commit details
    Browse the repository at this point in the history
  99. Slider: remove unnecessary spaces

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    4d7bcce View commit details
    Browse the repository at this point in the history
  100. Slider: update documentation

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    04c5cbd View commit details
    Browse the repository at this point in the history
  101. Slider: remove development try-catch statement

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    bdf7aab View commit details
    Browse the repository at this point in the history
  102. Slider: auto indentation

    thyttan committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    03a1f10 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Slider: add to documentation Slider.md

    thyttan committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    05e2ff8 View commit details
    Browse the repository at this point in the history
  2. Slider: add to documentation re timeout

    thyttan committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    8bd1cbb View commit details
    Browse the repository at this point in the history
  3. Slider: formatting Slider.md

    thyttan committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    71a445c View commit details
    Browse the repository at this point in the history