-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat(examples): add interactive realm r/stefann/home
#2918
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2918 +/- ##
==========================================
+ Coverage 63.11% 63.12% +0.01%
==========================================
Files 563 563
Lines 79274 79274
==========================================
+ Hits 50030 50043 +13
+ Misses 25872 25863 -9
+ Partials 3372 3368 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
- Add profile picture, background image, and about section rendering - Implement dynamic background and tip jar rendering - Add functions to update cities and tip jar link - Integrate sponsor leaderboard - Home realm is still a work in progress
- Ensure city index increments with each donation, resetting after the last city - Implement full GNOT validation to enforce valid donations - Complete sponsor leaderboard functionality with maxSponsors limit - Refine sponsor list display logic to prevent visual issues - Fully integrate tip jar mechanics with donation tracking - Fix AssertAuth issue in config
- Remove ownership management logic from `config` and rename it to `registar`. - Integrate `Ownable` for ownership management in the home package. - Add a comment to clarify the purpose of `jarLink` and its expected update process. - Remove the unused `caption` parameter in the `UpdatePFP` function. - Replace `OrigPkgAddr()` with `CurrentRealm()` in `CollectDonations`.
- Run `gno mod tidy` to clean up dependencies. - Run `gno fmt -C ./examples` to format code. - Clean up by fixing the undefined `owner` reference and other minor bugs.
I’ve resolved some issues with the latest commits and will be addressing the remaining problems soon. Thank you for your comprehensive suggestions! |
- Refactor the `currentCityIndex` update using modulo (`%`) to prevent manual resetting and ensure correct rendering. - Merge sponsor and donation logic into a single structure, simplifying data handling. - Replace sponsor list iteration with a map for direct access, enhancing performance. - Remove `CollectDonations` function; `Donate` now directly sends funds to the owner, simplifying fund management. - Move sponsor sorting from the donation step to the render step, reducing gas fees for donors. - Generalize the `UpdateAboutMe` method to support dynamic content updates without column restrictions. - Group related variables (e.g., `pfp`, `cities`, `aboutMe`, `jarLink`) into common objects for improved organization. - Apply minor optimizations and clean up code for better readability and maintainability.
- Re-add UpdateMaxSponsors function, accidentally removed earlier. - Replace DonationStats with DonationsCount field. - Update logic to derive total donations directly from the sponsors map by summing "ugnot" coins.
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.
Thank you for applying the suggestions 🙏
@stefann-01 |
@stefann-01 Can you check the leftover comments, so we can merge? 🙏 |
Yes, I will fix them all tonight. Thanks! @zivkovicmilos |
- Add AddCities function to append one or more cities to the travel list without replacing the existing entries. - Add AddAboutMeRows function to append one or more rows to the aboutMe section. - Implemented unit tests for home realm.
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.
Looking good 😎
I hope it’s ready now, thank you for your patience! I tried to resolve the issue in the CI pipeline during the |
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.
Not a fan of the code, but I think we should be pretty liberal on what we have in the home realms, and I think it's a good example.
You make heavy use of HTML which we have dropped support for: #2964. You can make a new PR to amend your usages; and perhaps drop the r/stefann/registry realm which I see is not actually being used much (especially wrt. the "backup address").
r/stefann/home
Description:
This PR finalizes the core functionality of my home realm project, focusing on a dynamic and interactive home realm experience, driven by GNOT donations. The following key features and enhancements are introduced in this PR:
Key Features:
Dynamic Background Change:
Sponsor Leaderboard:
maxSponsors
setting.Donation Validation:
Owner Withdrawal of Donations:
Home Realm Configurations:
maxSponsors
setting.