Commit Graph

23 Commits (4e5def4282ebafe4eb0d089ecdd6a4af5448f96e)

Author SHA1 Message Date
NiLuJe 4e5def4282
Tame a few tests that relied on `pairs` being somewhat deterministic (#6371)
* Mangle stupid defaults test so that it compares tables, and not a non-deterministic string representation of one.

It's still extremely dumb and annoying to update. (i.e., feel free to kill it with fire in a subsequent PR, I think everybody would cheer).

* Rewrite DepGraph to be deterministic

i.e., fully array based, no more hashes, which means no more pairs randomly re-ordering stuff.

Insertion order is now preserved.

Pretty sure a couple of bugs have been fixed and/or added along the way
;p.

* Resync frontend/apps/filemanager/lib/md.lua w/ upstream

And use orderedPairs in the attribute parsing code, just to make that stupid test happy.
4 years ago
Frans de Jonge 83cdb9cb9a
[fix] MenuSorter: don't add empty menu item (#4848)
Fixes #4845.
5 years ago
Frans de Jonge 1cba60765b
[feat] MenuSorter: add sorting_hint support (#4399)
By adding a `sorting_hint` to a menu item, the program will put orphaned items in the relevant (sub)menu instead of in the first menu with a NEW prefix.

Fixes #4393.
5 years ago
onde2rock 941df475b6 [Menusorter] Ignore warning for the plus_menu. (#3903)
The plus_menu break the assumption of the menusorter about a tab beeing
always present.
See : https://github.com/koreader/koreader/pull/3844#issuecomment-383092219
6 years ago
onde2rock d7a7a78731 [fix] MenuSorter: don't leave ghost top level items (#3844)
See https://github.com/koreader/koreader/pull/3773#issuecomment-379181517
6 years ago
onde2rock 43c2c92194 [UX] FileManager: Tapplus access for non-touch devices (#3773) 6 years ago
Frans de Jonge 8c9fdfbb1a [fix] MenuSorter: don't ignore user order without counterpart in default menu (#3166)
Fixes #3164.
7 years ago
Frans de Jonge 829e2fffd8 [fix] MenuSorter: take care of orphaned submenus
See https://github.com/koreader/koreader/pull/3167#issuecomment-326805768
7 years ago
Frans de Jonge 177485f84f [UX] Add exit menu (#3167)
* fixes #2898 (prevents accidentally triggering reboot or poweroff)
  Add ConfirmBox before reboot/power off
* increases clarity by preventing second page
* add "sleep" menu entry
* Add exit menu hold callback
7 years ago
Frans de Jonge 4513718a2a [fix] MenuSorter: ignore separator as first item
See https://github.com/koreader/koreader/pull/3107#issuecomment-323581851
7 years ago
Hzj_jie 970f2e7306 Several improvements of AutoFrontlight plugin and enable it by default (#2975)
* Force refresh when kindle is out of screensaver or usb is unpluged.

* Improve AutoFrontlight

* More plugins sub menu

* Last brightness should always be updated

* Finish autofrontlight improvement and enable it by default.

* More tets

* onFlushSettings

* MenuSorter can now correctly sort sub menus
7 years ago
Frans de Jonge c847d628e1 Docs: cosmetic updates and additions
* Content from wiki had some cosmetic leftover glitches
* Added/adapted some docs for other modules
7 years ago
Frans de Jonge da48a54727 Fix LuaCheck error
"frontend/ui/menusorter.lua:110:13: value assigned to variable 'sub_menu_content' is unused"

Kind of the point, I'm assigning it nil after all. This way it probably shouldn't complain.
7 years ago
Frans de Jonge 3982170886 MenuSorter: fix findById 7 years ago
Frans de Jonge 8b7e18a7d7 MenuSorter: resolve review comments
* simplify user config loop
* simplify unit test for Travis memory use
* remove unused util variable
7 years ago
Frans de Jonge 33c848f813 MenuSorter: first unit tests 7 years ago
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge 653ff64438 MenuSorter: handle disabled 7 years ago
Frans de Jonge 8f31a81601 MenuSorter: some documentation
MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
7 years ago
Frans de Jonge 56659ddb20 MenuSorter: avoid recursion in findById 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
7 years ago
Frans de Jonge aa0bf60ccb MenuSorter: pass config prefix for proper user override 7 years ago
Frans de Jonge 5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
7 years ago