-
Notifications
You must be signed in to change notification settings - Fork 33
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
Improve item detail fields #1051
Conversation
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.
Some comments for ItemDetailState.Data
struct:
isAttachment
inData
should probably a constant? "Normal" item can't become an attachment, so that flag won't ever change.creators
andcreatorIds
can be converted toOrderedDictionary
too.maxFieldTitleWidth
,maxNonemptyFieldTitleWidth
don't see to be used anymore, can they be deleted?- should
attributedTitle
maybe be exluded from equatability of this struct? If for example font size changes (from iOS accessibility settings), theNSAttributedString
would differ even if title never changed? It's quite an edge case, but no need to compare attributed string when we already compare the original.
What happens, if the user starts editing, the RItem.changesSyncPaused
flag is set to true
and then the user crashes at some point while editing? When they open the app, that RItem
's sync is still disabled, right? Maybe on app launch/activation we should reset all of these flags to false?
I also noticed a UI bug. When you edit some field and quickly tap "Done", the field change is debounced and since we tap "Done" before the debounce triggers, our UI then shows old state. It's stored in database and synced properly.
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
18a6a8c
to
20126a8
Compare
Changed in e7309d4
Changed in 0ad0e2d
Changed in d0bfd3c
Changed in 5bad313
This would apply only to newly created items, as editing existing items is fully live-updating now. In theory there should be only one such entry, but just to be safe, assuming they could be more, we could offer an alert with choices to the user:
This should be fixed in 20126a8 |
Right, I didn't notice that The whole |
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailCollectionViewHandler.swift
Outdated
Show resolved
Hide resolved
Zotero/Scenes/Detail/ItemDetail/Views/ItemDetailCollectionViewHandler.swift
Show resolved
Hide resolved
Delay item fields editing in action handler instead of debouncing row text fields Update collection view snapshot when individual rows change
5bad313
to
287b66f
Compare
Zotero/Scenes/Detail/ItemDetail/ViewModels/ItemDetailActionHandler.swift
Outdated
Show resolved
Hide resolved
Fix app delegate migration
|
Done
is pressed.Done
is pressed to quickly.