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

#4802 - Copy/Past operation works wrong #4910

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Guch1g0v
Copy link
Collaborator

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@Guch1g0v Guch1g0v linked an issue Jun 27, 2024 that may be closed by this pull request
@NataliaLoginova NataliaLoginova requested review from svvald and rrodionov91 and removed request for rrodionov91 June 28, 2024 09:37
if (sg.atoms.some((aid) => !atomSet!.has(aid))) return;
const notInGroup = sg.atoms.some((aid) => !atomSet!.has(aid));
const atomsInSet = sg.atoms.filter((aid) => atomSet!.has(aid));
if (!atomsInSet.length && notInGroup) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I'm missing something here but why do you need notInGroup? Conditions in .some and .filter are mutually exclusive so if there are no elements satisfying the atomSet.has(aid) condition, there is definitely at least one element which satisfies the inverse !atomSet.has(aid) condition

Copy link
Collaborator Author

@Guch1g0v Guch1g0v Jul 1, 2024

Choose a reason for hiding this comment

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

Sometimes (when we copy a attachment point label) we are not in the group, but we need still filter some atoms,
but if we are not in the group and there are no atoms, we exit. Also, we must support the previous realization of mergeInto.

Screenshot from 2024-07-01 21-51-11
Screenshot from 2024-07-01 21-49-11

Perhaps there is another way to solve the problem.

@Guch1g0v Guch1g0v changed the title #4802 - Copy/Past operation works wrong WIP: #4802 - Copy/Past operation works wrong Jul 9, 2024
@Guch1g0v Guch1g0v changed the title WIP: #4802 - Copy/Past operation works wrong #4802 - Copy/Past operation works wrong Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy/Past operation works wrong
3 participants