-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Replace JFXDatePicker with DatePicker #750
Conversation
Looks like we can fix this issue while keeping JFXDatePicker by following Bisq's upstream change:
|
I had originally not attempting using this fix because of the comment on the PR claiming it did not work in Dec. 2023, and because the fix was similar to something else I had tried, which had done nothing; I'll check back in after testing |
Using the fix, most of the behavior is gone; However, when clicking on the datePicker, growth begins occurring; I'll look further into this fix and see if it can be improved further. (Same caveats about the overall functionality of the page still apply) |
If JFXDatePicker is still not working and your solution is fully functional, we can move forward with that for now, depending on what you find. |
Looking into it further, it appears that there is a lot of weird stuff going on in JFoenix overall. For one, the version on Maven isn’t….right? (There are minute differences in the codebase, but the big giveaway is that the version on Maven is Apache….despite the license for JFoenix being changed to MIT over 3 years ago) Using the most up-to-date version of JFoenix and building it as such, I cannot reproduce the infinitely growing datePicker, so I think it may be fixed in that version. Theoretically, we could remove the Maven dependency and use a “custom” (not really custom since it’s the unmodified version on their GitHub) build of JFoenix instead, though that might cause unexpected issues in other parts of the UI. As far as functionality is concerned, using datePicker should work just fine. JFXDatePicker is mainly just a css wrapper for datePicker anyway, so the difference should be mostly aesthetic. |
Yeah I don't think we want to change a major dependency like that, since it can introduce many quirks in the UI which are difficult to catch and debug. So I think it makes sense to simply switch away from JFXDatePicker. |
@@ -106,6 +106,8 @@ protected void initialize() { | |||
displaySeedWordsTextArea.setEditable(false); | |||
|
|||
datePicker = addTopLabelDatePicker(root, ++gridRow, Res.get("seed.date"), 10).second; | |||
//note: on MacOS this datePicker does not actually list a date...is it |
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.
Please remove this comment since it's a separate bug which will be fixed separately.
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.
The comment is now removed
The code is still using JFXDatePicker in add2TopLabelDatePicker. Thinking that should be switched over too? |
I have switched that code over as well; it isn't currently in use in the project, but just in case someone tries to use it in the future.... |
The unused import needs removed too, to fix the checkstyle error: /home/runner/work/haveno/haveno/desktop/src/main/java/haveno/desktop/util/FormBuilder.java:21:8: Unused import - com.jfoenix.controls.JFXDatePicker. [UnusedImports] |
Remove unused import
The import is now removed |
Thanks, please post or DM an XMR address for payment. :) |
You are welcome :) 48pre1andu3Z8E186es2mZYBcHMTyowcn1DQ3htN6rLCGwG39ycDCeP8kSa3b7rqaZ6to3L1K7bd92fERMex3nEpJashdga |
Payment sent. |
This PR replaces JFXDatePicker with DatePicker in the Account Seed View. This is a temporary fix for the "growing DatePicker" issue in #527.
It should be noted that I was unable to use the Seed Recovery feature on the Account Seed View, nor was I able to see the date associated with the current wallet seed. This issue was present both before and after the PR, and is likely unrelated to the "growing DatePicker" issue.