-
Notifications
You must be signed in to change notification settings - Fork 0
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
sorting: its not working lol #45
base: main
Are you sure you want to change the base?
Conversation
i did a major refactor and changed some behaviors a little:
ideas for further improvs:
|
noticing:
hmm and i am having trouble reproducing this, but there was a moment upon first loading when pressing enter would not add an item (the input text would disappear but the item would not be created)! i'll keep my eyes peeled if it happens again |
i love the wrapping to the next storage when reaching the edge tho 🤩 |
i thought it might make more sense to just have the parsing happen in StoragePlace instead of the store, which avoids the add/import naming confusion |
wondering why sorting is non responsive and then works after a little bit for me nvm!! might have been the item.name as id |
ok so i added an apple just now, and then i updated its dateAdded to be 14d ago. when sorting by newest it should be the middle item, but it seems like it still treats it as the newest might also make sense to start with |
i could not reproduce that bug you had, but added the |
* item count was not reactive, can't make $derived value with parameter so a record of itemCounts was created * fixed: tests that used text="delete" broke after swapping it to an icon
|
@@ -23,7 +23,10 @@ export default { | |||
customise: (content, name, prefix) => { | |||
switch (prefix) { | |||
case 'tabler': | |||
return content.replaceAll('stroke-width="2"', 'stroke-width="3"') | |||
if (name === 'x') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow nice
src/lib/stores/item.svelte.ts
Outdated
if (!storages.includes(storage)) { | ||
storages.push(storage) | ||
items[storage] = [] | ||
await db.foodItems.where('storage').equals(storage).toArray() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the result of this supposed to be stored anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm no that can be removed it seems, no need to query there. i'm still not 100% sure how dexie works
* should work on mobile too
* should not scroll when an item is selected
huh! pulled the latest updates and encountered this bug where clicking on an item in the 1st storage place ended up selecting an item in 2nd one. after that error, clicking anything else stops working 😮 Screen.Recording.2024-07-17.at.10.30.20.PM.movi tried going back one commit at a time, and it seems like the bug doesnt happen until after c02e645, refactor: change sort dropdown handling for tests? checking out 8e6ac1b and running the app, clicking on items seems to work as expected its the removal of untrack, isnt it? |
ah sryyyy, it was untrack. |
the placement of the sorting select input is just temporary - could imagine this just being moved into a settings box or be something like cickable table headings on a grid layout, like spotify
anyway i was just trying to see if i could get it to work but . i don't think i fully understand svelte reactivity cause i initially just tried to mutate
list
and changed it to this when it wasn't visibly updating anything. it still doesn't visibly update 😞this is the error i got
after switching to "a to z"
i wonder what a proxy array / object is & why its not just a regular list?
im also finding it interesting that this null error comes after sorting and assigning. is it happening somewhere in the components?