Skip to content
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

move goal feat #2067

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

move goal feat #2067

wants to merge 49 commits into from

Conversation

vinaybadgujar102
Copy link
Collaborator

@vinaybadgujar102 vinaybadgujar102 commented Oct 25, 2024

resolves #1918

Copy link

vercel bot commented Oct 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
zinzen ✅ Ready (Inspect) Visit Preview Nov 16, 2024 3:07pm

@tijlleenders
Copy link
Owner

Looking good.
Especially interested in the sharing behavior.

Awesome to see you're tackling this complex issue!

{newParentTitle === "Non-shared goal" && (
<div className="warning-message">
<InfoCircleOutlined />
<span>The new parent goal is not shared. Changes will be ignored if accepted.</span>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, sharing should be per goal - independant of what the parent goal is.

If I/you change the parent goal of our shared goal - that should not affect propagation of changes on our shared goal, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for the situation when child is moved out of the shared goal. the above code is stale.

If I/you change the parent goal of our shared goal - that should not affect propagation of changes on our shared goal, right?

this is handled differently. if we move the root shared alltogether then the suggestion will discarded altogether by the reciever.

Copy link
Owner

@tijlleenders tijlleenders Oct 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, what I'm saying is that maybe we should be dropping the whole concept of letting shared status depend on some 'root-goal'?

In my view, when you share a goal - all descendants are also shared (or not with opt-out).
From then on out - they are 'autonomous' from each other.

Of course if you delete a tree - all descendants will also be suggested to be deleted - even the ones your partner has moved since the sharing (since they are handled one-by-one). The ones you moved out of the tree will then not be deleted.

Basically, this makes sharing/deleting a tree the equivalent of individually sharing/deleting all goals in the tree. The advantage is that after that you are free to move things around individually without any extra complexity/dependency on other goals.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that dropping root-goal dependency and treating each goal independently would make the system more flexible and intuitive.

I'll start implementing these changes.

@vinaybadgujar102
Copy link
Collaborator Author

@tijlleenders when there is a change in shared descendant, where should the notification be displayed. root or the parent (if new goal added) / goal itself.

@tijlleenders
Copy link
Owner

@vinaybadgujar102 The idea is that the notification dot travels up the tree to the highest level - just like now.

A possible difference with the current situation is that the dot should not care about sharing when 'travelling up' the tree. It is also realtime (not a property of ancestors) - as things are always moveable.

Does this make sense?
Do you see any problems?

@tijlleenders
Copy link
Owner

tijlleenders commented Nov 10, 2024

Great, some minor corrections:

  • Split the long sentence into two short sentences:

    • Navigate to the new location.
    • Press the + button to move.
  • Don't Capitalize Every Word

    • Move here
    • Cancel move

@vinaybadgujar102 vinaybadgujar102 changed the title move goal feat (wip) move goal feat Nov 11, 2024
@vinaybadgujar102 vinaybadgujar102 marked this pull request as ready for review November 11, 2024 07:55
@@ -237,6 +299,23 @@ const DisplayChangesModal = ({ currentMainGoal }: { currentMainGoal: GoalItem })
init();
}, [currentMainGoal]);

const getChangedGoalFromRoot = async (rootGoal: GoalItem, relId: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'getChangedGoalFromRoot' is assigned a value but never used.

src/components/GoalsComponents/GoalSublist/GoalSublist.tsx Outdated Show resolved Hide resolved
src/helpers/InboxProcessor.ts Outdated Show resolved Hide resolved
@tijlleenders
Copy link
Owner

@vinaybadgujar102 is this excluding LWW?

@vinaybadgujar102
Copy link
Collaborator Author

@vinaybadgujar102 is this excluding LWW?

I have implemented the function to handle the conflict resolution just have to integrate it with the existing code.
Should i do it in this PR only or separate?

@tijlleenders
Copy link
Owner

Yes, please implement the sharing with LWW too, if it's ready to add.

Currently, in this branch - if I rename a shared goal - it completely disappears from the other persons' partner page. The moving works fine, congrats!

@vinaybadgujar102
Copy link
Collaborator Author

@tijlleenders, integrated the LWW for collaborated goals for all actions excluding change of adding new subgoals to shared goals and movement of non shared goals to collaborated goals. Check if it is working correctly?

Is there need to implement lww on partner goals?

@tijlleenders
Copy link
Owner

@vinaybadgujar102 This is AWESOME!!!

Copy link
Owner

@tijlleenders tijlleenders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some issues with the default goals being populated sometimes. Do you experience any issues after clearing memory?

Screencast.from.2024-11-15.08-55-28.webm

@vinaybadgujar102
Copy link
Collaborator Author

vinaybadgujar102 commented Nov 15, 2024

I have some issues with the default goals being populated sometimes. Do you experience any issues after clearing memory?

Yeah. Sometimes only 2-3 starter goals are created after memory refresh. Its not introduced in this pr, I have been experiencing it from long time ago.

Can be handled in another issue

tijlleenders
tijlleenders previously approved these changes Nov 15, 2024
Copy link
Owner

@tijlleenders tijlleenders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, please add an issue for that then.
Super excited for this new move feature, thanks!

@tijlleenders
Copy link
Owner

@Tushar-4781 Can you review the code?

Copy link
Collaborator

@Tushar-4781 Tushar-4781 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cut down css. use the short classes defined in shot.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Move/Paste Goal/Budget in hierarchy
3 participants