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

UI & data source refactor #10

Merged
merged 17 commits into from
Jan 16, 2024
Merged

UI & data source refactor #10

merged 17 commits into from
Jan 16, 2024

Conversation

Luki120
Copy link
Owner

@Luki120 Luki120 commented Jan 16, 2024

  • Refactored all the UI to use bigger cells with spacing between them & clean good looking shadows
  • Refactored the data source again to switch to MVVM

• completely refactored IssuerCell ⇝ bigger cell with clean good looking shadows, bigger issuer image, circular view & pin code + now shows the issuer's name & account labels (latter is hardcoded right now until NewIssuerVC is refactored to include a field that'll let you type the account)
• IssuersDataSource is no longer a class owned by IssuersVC, rather by IssuersVCView, as the view should be the one interacting with the view model, not the view controller directly (this ain't strictly a view model yet, but it will be if the app gets refactored to use MVVM)
• removed as many instance variables as possible
• removed code that became obsolete with this refactor
• the search & filter logic is handled now by IssuersDataSource ⇝ less loc in IssuersVC + makes more sense
• UICollectionView > UITableView ™️ ⇝ gives the ability to add spacing between the cells, making it look nicer + native drag & drop, which looks better than UITableView's editing feature
• made issuers @ Published so we can listen for changes & update the UI on the fly + privatized its setter ⇝ created funcs to append & set the issuers to encapsulate
• created IssuerCellViewModel & renamed IssuersDataSource to IssuersViewViewModel
• fixed the issuer's index var not updating after deleting one
• created NewIssuerFormCell & NewIssuerAlgorithmCell ⇝ bigger cell with nice clean shadows & corner radius
• switched to MVVM to handle the data
• renamed ModalSheetDataSource to ModalChildViewViewModel + created view models for NewIssuerOptionsCell & NewIssuerOptionsHeaderView ⇝ MVVM
• better layout structure
• renamed ModalChildViewViewModel, ModalChildView & ModalSheetVC to NewIssuerOptionsViewViewModel, NewIssuerOptionsView & NewIssuerOptionsVC respectively
@Luki120 Luki120 added enhancement New feature or request refactor Chadifications labels Jan 16, 2024
@Luki120 Luki120 merged this pull request into main Jan 16, 2024
1 check passed
@Luki120 Luki120 deleted the ui-refactor branch January 16, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Chadifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant