-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fyne History Page Implementation #439
base: master
Are you sure you want to change the base?
Conversation
27f62f5
to
0f77b1d
Compare
The history page seems to work when using one wallet. However, it's not fully functional with multiple wallets. First, how multiple wallets are displayed. A dropdown would be more suitable for displaying users' wallets. You can use the "receive" page as a reference for that. I get an empty transactions result when I try switching between wallets and that's just one of the issues. Kindly create multiple wallets and test. |
7dec5c7
to
4db9223
Compare
Please remove this file https://github.com/raedahgroup/godcr/blob/28a531acf89b55f9ab87a2e920240d443c6cef9b/cmd/godcr-fyne/.~bash-profile.swp from your PR |
… basedd on review, minor code clean up
…nt function, cleaned up code
…tails popup, cleaned up code
… when a filter with smaler no of tx
…wn when they are initialized
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.
You should try to split components to separate functions and place them in the handler package for easy review also scrolling seems very slow, can we reduce transaction table per scroll to 15 instead of 25?
As a matter of uniformity, across all godcr interfaces, the txperpage is 25. |
Scrolling is slow and table contents distorts while scrolling we should reduce table contents. |
Is the recommendation that i remove the icon? |
} | ||
|
||
// Append widget adds to the bottom row of a table. | ||
func (table *Table) Append(data ...*widget.Box) { |
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.
You changed quite a number of code in the table.go. It's a widget I used on the overview page. It seemed to work well, any reason for the change? Would my existing implementation work without an issue if I used this?
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.
I had this these codes already before the overview page was implemented. Anyways have you tested your implementation on the overview page just to be sure there are no issues because overview page seems fine to me.?
so basically the issue is the change @metaclips suggested that we reduce the width of the history page. this also affected the txdetails popup as its wider than the current history page. Two things can done here.
|
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.
scrolling seems to be much better, still needs little changes to UI.
- Status table contents should be centered.
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.
You should add an init prefix to component on history page and make the component that is to be initialised the first calling function and other helper functions below on each files for easy review and so that others wont have issues implementing features on the page.
} | ||
|
||
if prepend { | ||
txTable.Prepend(txBox...) |
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.
You should try as much as possible not to use Prepend and Append function especially when users change to history page, can we instead call A NewTable instead for faster rendering , if users view history page?
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.
This will function more like pagination reason is for every update a new table will be called and this will have only data from the last tx fetched.
|
||
txCountForFilter, err := historyPage.MultiWallet.WalletWithID(historyPage.selectedWalletID).CountTransactions(allTxFilters["All"]) | ||
if err != nil { | ||
historyPage.errorMessage = fmt.Sprintf("Cannot load history page page. Error getting transaction count for filter All: %s", err.Error()) |
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.
why are we passing error messages here? isn't there already a widget that handles that? Also, if err!=nil parameter is met, the app crashes, all component functions that require using dcrlibwallet should have a return parameter "error", you should stop all history page initialisation if any function throws an error.
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.
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.
This is what is shown when I make err == nil
here, you are showing parts of history page components even when there was an error.
You shouldn't be passing errors to variables and then making a return
You are still calling up functions even if there was error on other functions called recently and then checking if any of the functions returned an error here
This shouldn't be as any of the functions that errors and returns early without initialising struct variable "HistoryPageData struct" could cause a panic in other functions if they use the uninitialised variable, you should instead pass return parameter "errors" to all functions that uses dcrlibwallet also InitHistoryPage function and then if any of the dcrlibwallet library functions return an error,
- Stop the failed function, return the error
- Stop history page initialisation in the handler package, return the error passed to InitHistoryPage
- Check if InitHistoryPage function which is to be called in history.go file returns an
err
if there was an error, only show on history page a label indicating that there was an error initialising history page.
Fixes #439