Closed savage13 closed 11 months ago
Haven't looked at the code, just some high level comments:
Uses the Tasks pane: spane-dummy
If you re-added the Tasks pane, its ID shouldn't be spane-dummy.
Markers
I think it might be better to just hide the marker entirely? Makes it easier to see which map points are left. (Though if we hide completed points there should be an option to show all completed points so that users can undo their mistakes.)
Storing checklist in the Settings (localStorage)
- Checklist item storage seems large; would it be better to populate the list when needed (using a query) instead of storing all the items. The checklist does not store if an item is marked.
Most browsers seem to have a 5MB size limit for localStorage, so we should avoid storing large amounts of data (especially when drawn markers are also in localStorage).
I would suggest looking into IndexedDB as that has a much higher size limit and checklist data is easy to store in a DB. Browser support seems decent: https://caniuse.com/indexeddb
Lists are stored in Settings under checklists. Each checklist has a name, query and the items in the list (hash_id, name, ui_name, map_name, pos).
Do we actually need to store ui_name? I think we can just derive that from the name.
Also, we should store map_type + map_name.
indexeddb looks good to me. Will write an updated version.
This adds IndexedDB using the library idb
src/util/Checklist.ts
is a wrapper around the checklist implementation (state and db)
I have not rebased the PR, but it appears to be able to merge without conflict.
Sorry the PR is so big. It seems to touch almost everything in the codebase.
Orignal version was closed as I made a mess of the history.
Added a checklist functionality
spane-dummy
MapGenericLocationMarker
MapMarkerCanvasImpl
(only Koroks and Location Names)_updatePath
to draw the check mark / badge_updateBounds
to include the badgeSettings
underchecklists
. Each checklist has aname
,query
and theitems
in the list (hash_id, name, ui_name, map_name, pos).hash_id
.Toggle Completed
)Not sure about:
_updatePath
This change is![Reviewable](https://reviewable.io/review_button.svg)