We should be able to tag type of "modals" that appears in app.
YES/NO
DataConflict
DataError
DataDelete (Movements)
MonthlyCongrats
NukeData
NukeMovements
(coming) BeforeExit
CHANGES DATA
BankEditor
CategoryEditor
MovementFilters
Currencies
FOR THEIR OWN
Import Data
Export data
All the dialogs can be transformed into non-navigational ones, but there are some disadvantages:
loading complex logic inside an "embedded" one causes that page to be slow
there is need to reference and calling always .current instead of just .navigate(modal)
we should have a separation between what's a YES/NO suitable for embedded modals and what's for manipulating data
There is a big advantage using embedded ones:
instead of using context, you can directly pass data, setData to the children
Probably the best way is using navigation for "their own" (you're doing completely unrelated things) and refactor the "Changes Data" with embedded (you are still in that screen and changing its data). Do not try to over-group things: modal currencies should receive its data and setter and don't have the async returning show. You can for sure keep DataError and DataConflict because they're too similar to be separated.
You should also implement a common "header" or "Container + Header" combo for both Navigation and embedded ones, but do not include buttons.
We should be able to tag type of "modals" that appears in app.
YES/NO
CHANGES DATA
FOR THEIR OWN
All the dialogs can be transformed into non-navigational ones, but there are some disadvantages:
There is a big advantage using embedded ones:
Probably the best way is using navigation for "their own" (you're doing completely unrelated things) and refactor the "Changes Data" with embedded (you are still in that screen and changing its data). Do not try to over-group things: modal currencies should receive its data and setter and don't have the async returning show. You can for sure keep DataError and DataConflict because they're too similar to be separated.
You should also implement a common "header" or "Container + Header" combo for both Navigation and embedded ones, but do not include buttons.