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
New constraints and defaults (forbid DUE=START) #309
Conversation
06a53eb
to
487c9f3
Compare
@dmfs Please review. It looks like you have currently no time for this project. But particularly in this case, it would be cool to merge all open pull requests and then publish a new version of the app. 😃 |
I agree, some of them solve long-standing issues... |
@lemonboston please help to review this PR. |
I started to check this out, but as I am not very much familiar with the details involved here, all my comments should be considered more just as questions and inputs rather than recommendations.
|
Thanks for your feedback!
I can do that, if favored. However, this would require to extend
Okay, I will change this (only relevant if the general approach is kept, see "strategic decission" above).
I think it should be possible to replace the param
I don't understand what do you mean with this. What do you want to achieve with this? |
I think keeping one
concretely (may not be correct, just for indication):
Would it make sense? So no It's still a question for me though whether |
I think it's just a matter of programming style. I will adapt the style of this PR to whatever style you want ;-)
As far as I know, the default value calculation of |
I've also double-checked it now and I didn't see any other usage either, so it's good news, I think it would be better then to use |
I began the refactoring, but I have the problem, that the new
I think the third one is too complicated. But what would you think is the best solution? I've made a new commit which should show the problem (currently, it has compile errors due to the problem). |
You're right
I think we should just check
FYI: we're trying to get away from inheritance and move towards composition, hence the change request. In our recent projects we don't use inheritance at all, which worked out pretty well. |
Okay. I'm fine with that. Should we integrate that in this Pull Request or make a new one? (It's also possible to outsource the spell changes (`contraint` to `constraint`) into a separate PR in order to keep this one simple.)
However, I can only do anything in a week, at least. Maybe you want to realize your proposed changes in the meanwhile ...
|
I've just opened PR #335 which removes the stale methods. Would you do the review? |
I've just merged #335 into staging. You can rebase now. |
c5b6b93
to
1389252
Compare
- forbid DUE=START; - use defaults satisfying DUE>START; - shift DUE if START violates constraint
1389252
to
9700eae
Compare
I've rebased this PR and it's ready for a detailed review (again)! |
@dmfs @lemonboston Any news on this? Do my changes comply with your requirements, now? |
Doesn't seem to work for me:
I got this when I tried to open the details of a task. Looks like there are still some places where |
From a code style and design perspective I have no objections. |
Strange, that those were still there. I've fixed this, now. Please test again! |
This is also ready for testing 😉 |
Looks fine, thx. |
CustomizedDefaultFieldAdapter
: Introduce customizable default values (new interfaceDefault
) in order to provide different defaults forDUE
(should be afterSTART
: new classDefaultAfter
) andSTART
(should be beforeDUE
: new classDefaultBefore
).After
: requires that a value is after another value (e.g.DUE
must be afterSTART
); if constraint is violated, set value to the default (DefaultAfter
); similar to the oldNotBefore
.BeforeOrShiftTime
: requires that a value is before another value (e.g.START
must be beforeDUE
); if constraint is violated, then the reference value (e.g.DUE
) is shifted with respect to the duration of the task.With the two new constraints, we prohibit
DUE=START
and therefore fix #262. The constraintBeforeOrShiftTime
is a tradeoff between shifting always (cp. constraintShiftTime
) and shifting never (cp. constraintNotAfter
); maybe this is sufficient in order to close #197.