0.4.0 #141
Replies: 19 comments 42 replies
-
I spent a little time looking through this and doing some quick analysis. As you might already know, I like standardization, and I'm happy to lend a hand with this. That said, before we go any further, I think we need to come up with a good process. If we just start individually adding a bunch of constants, I think it will lead to unnecessary duplication and complexity. My proposal is starting with a plan to organize and arrange the constant file before doing any more substitutions. Once aligned on how that should be structured, it will make it much easier to add one-off things that come up and ensure we're keeping it as simple as possible. (It is a bunch of work) I'll put together a quick high level overview. One other clarification... Is your intent to replace the majority of all hard-coded text in those files? i.e. both the things that are programmatic, as well as the content that would be exposed to the user? |
Beta Was this translation helpful? Give feedback.
-
FYI - I'm just now seeing that you made a lot of changes to constants since I was looking at this earlier today. I'll have a look at that a little later because maybe you're heading in a little different direction which could be fine. I just want to ensure it's clear where everything should go and easily recognizable by the way it is grouped, named, or sorted. One thing I would add, is that there is a lot more misc. text to add as I looked through the config flow, so this is going to grow quite a bit. |
Beta Was this translation helpful? Give feedback.
-
My changes on const are broken in a different way than your proposal. Your idea seems good, but I would try to get together by key types, breaking down by section might be tricky in some parts, like sensor attributes, for example, where there are many similar ones. Anyhow, as always, fully open to ideas and changes 👍 |
Beta Was this translation helpful? Give feedback.
-
Looks like you've made a lot of progress and are probably pretty tired today! Sorry, I've been busy and haven't been able to jump in yet. I did take a quick look through to get a feel for how you are structuring things. I see a lot of duplication, that I'm questioning whether it could or should be simplified. Or maybe it's because you are moving to a new standard like CFOF for config and options flow, but leaving the other constants in place until all the changes are made? Here are my questions:
Quick list of Potential Duplicate Constants:
|
Beta Was this translation helpful? Give feedback.
-
Hi, Finally I was able to get OptionsFlow finalized with the const revision. Also made a lot of progress on Coordinator data management structure as well, although a lot is still outstanding... 🙄 If you have time, you may check the files updated on 0.4.0 pull in dev. Cheers |
Beta Was this translation helpful? Give feedback.
-
Got it. I didn't realize I could do that, so I'm sure that's why it isn't working as I expected. I'll try that out a little later. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Spending a little more time looking through all the changes, it is really coming together nicely! You've put a lot of effort into improvements here! As I was doing some testing, I realized there’s quite a bit of duplication between config_flow and options_flow, and both need to be maintained, as well as tested independently. I also noticed some functional differences too — for example, badges only allow cumulative mode in config_flow, which isn’t consistent with options_flow. (I generally understand why that is) To help reduce this complexity, I’d like to propose two possible approaches: Option 1 – Minimal Initial Setup Option 2 – Reusable Flow Helpers for create/add Personally, I lean toward Option 1 for its simplicity and lower long-term maintenance burden. Also, I'm sure you would have much preferred that I bring this option up before you did all the refactoring for constants, but regardless, it could still further simplify things for the future changes. Let me know what you think. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
FYI - I"m working through a number of changes on the options flow for the various badge types that I"ll submit later. Just didn't want you to duplicate any effort. |
Beta Was this translation helpful? Give feedback.
-
Couple of questions on badges before I can wrap up these option flow changes. Special Occasion badge - Is the "Recurrent" option supposed to be there, and if so, how is it intended to be used since there are no schedule options? Periodic Badge - This one looks to have really good potential
|
Beta Was this translation helpful? Give feedback.
-
Thanks, digging in deeper is leading me to more questions... Cumulative badges:
|
Beta Was this translation helpful? Give feedback.
-
Now a bit more on Periodic Badges. I don't think they are working exactly as you listed above.:
|
Beta Was this translation helpful? Give feedback.
-
I just submitted a pull will a list of changes that should get the config and options flow pretty well cleaned up for badges. There may still be some small adjustments depending on the outcome of the questions above. I'll take a closer look at all of your responses tomorrow, but thanks for providing. I mentioned in the pull request too, but there are a couple of comments I listed that you should take a look at within the code. They are noted with "#### **** CLS" No rush on my side, get some rest and let me know if you have questions about anything I sent over. |
Beta Was this translation helpful? Give feedback.
-
I don't see where special occasion badges are removed. I understand for other badge types, but I think this type should be removed if the date does not match. Otherwise kids would have birthday and holiday badges every day of the year. Thoughts? One other question... I think we should provide more instruction / hints on the CFOF forms. Specifically for things like the "Recurrent" toggle as it shows on the special occasion form. I know we can use the data_description in the translation files to add that when adding badges, which I was starting to do, but then realized that when choosing the edit_badge option that is all done in one function, so the same description is used for editing all forms. For instance it would be good to have a better description at the top of each form that could state that cumulative badge is points only or that recurrent button on the special occasion badge is for annual recurrence. Any thoughts on best way to handle? |
Beta Was this translation helpful? Give feedback.
-
I just created a pull request you've probably already seen, so I won't duplicate the details here, but there are a few things to decide on as a result.
--a. When a reset date occurs for cumulative, should the awards be processed again? i.e. if the badge has a 50 award points listed, should that be given upon every reset?
Open Items - |
Beta Was this translation helpful? Give feedback.
-
Thanks! |
Beta Was this translation helpful? Give feedback.
-
@ad-ha - I'm guessing you've had a busy week since it's been quiet here. I have some pretty significant updates coming later tonight or tomorrow, so just wanted to let you know it might be good to hold off doing anything until I get all these changes integrated in. (I touched a lot of core pieces doing cleanup primarily related date / time scheduling as well as of course badges. Also, don't spend any time trying to answer my questions from the other day on badges, I think I've come up with good solutions to most of them. |
Beta Was this translation helpful? Give feedback.
-
I'm putting the required items to get to the next release in the issues list with a tag of [DEV]. That said, there are some things I've been noting down as I worked through all the changes over the past few weeks. The items below are my top 5 enhancements I'd like to see. They aren't in any particular order, and none of them are critical to get done before the next release, but I also don't want to lose track of them. A lot of the logic and functions I built in recent updates were done in a "common" way that would allow re-use in many of the enhancements below. Let me know if there are any in particular that you would want to push for prior to the next release, otherwise we can copy them into requests if they are longer term.
1. High-Level Plan: Unified Badge Award/Penalty Multi-Select1. Configuration/UI Changes
2. Backend Logic
3. Dynamic Option Generation
4. Migration
5. Documentation & UX
6. Summary
2. Reward claims, approvals and possible fulfillmentCurrently, reward claims are reset at midnight. This means:
This can lead to confusion and unfulfilled rewards, reducing trust in the system for both parents and kids. ProposalShort-Term SolutionRemove the midnight reset on reward claims.
Long-Term SolutionImprove reward claim and fulfillment tracking. Options:
Benefits
3. Proposal: Individualized Chore Handling with Per-Kid Chore DataIssue/BackgroundCurrently, chores assigned to multiple kids share state and due dates, which is not intuitive. Each kid should have their own independent progress and deadlines for the same chore. The groundwork for this is already in place with the The idea to handle chores this way was inspired by the process used to build the badge system, which required individualized schedules and state management for each kid. The badge system demonstrated the benefits and flexibility of per-kid data handling, and made it clear that a similar approach would be ideal for chores as well. Importantly, Plan
Benefits
Implementation Notes
4. Proposal: Rework Achievements and Challenges Using Badge InfrastructureBackgroundThe badge system was designed with flexible, individualized scheduling, target tracking, and progress monitoring. Many of the requirements for achievements and challenges overlap with what has already been implemented for badges, such as:
ProposalLeverage and extend the badge system’s infrastructure and helper functions to enhance achievements and challenges. Key Points
Benefits
Implementation Notes
5. Proposal: Centralized Notification HandlingProblemNotification logic is currently scattered throughout the codebase, with direct calls and custom formatting in many places. This leads to duplicated code, inconsistent messages, and makes it harder to update or extend notification behavior. High-Level Solution
Summary: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is something that I had in mind from the beginning and went leaving aside, to get things moving forward, but as this is growing so much I believe we need to step back a moment and get it addressed.
For next 0.4.0 release, aside from the revamping of badges, I am also refactoring all hard-coded text and defaults to pull everything from constants. It will be easier to manage the whole code and changes, making it all more organic and manageable.
I just push a whole set of updates for
const
andflow_helpers
. I will keep going withconfig_flow
,options_flow
andcoordinator
. These also include pulling constants generally and not individually on each file, which eases a lot the maintenance and coding.I was thinking also into addressing some key issues with naming that, since I did some poor decisions not to breakdown by sections when I started this project, but as this may cause a lot of breaking changes or require a bigger migration, I may leave those aside as they are not as relevant.
This is a major manual task, which may take some time to get grips with, but I believe it will be worth of and pay off in the long run.
Cheers
Beta Was this translation helpful? Give feedback.
All reactions