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

Change link/unlink behaviour to directly apply changes without showing modal or message #2523

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

KenyShah24
Copy link
Contributor

Link/Unlink behavior updated to not show the confirmation/summary modals or message when the link/unlink is successful.

Resolves #2273

@KenyShah24 KenyShah24 requested a review from jrchudy August 20, 2024 16:45
@KenyShah24 KenyShah24 self-assigned this Aug 20, 2024
Copy link
Member

@jrchudy jrchudy left a comment

Choose a reason for hiding this comment

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

The functionality is good but the refactored code looks like you did some refactoring but didn't finish the changes.

As I mentioned in my inline comments, we should do 1 of 2 things. Either:

  1. keep deleteResponse and deleteError the way they were and undo the change to call deleteBatchAssociationTuples in the function
    • deleteResponse would be changed to:
      setShowPureBinarySpinner(false);
      setUnlinkPureBinaryModalProps(null);
      updateRecordPage(true, LogReloadCauses.RELATED_BATCH_UNLINK);
      
  2. rename deleteResponse to deleteTuples since it's now calling the delete function and handling both the "delete response" and "delete error"
    • remove deleteError as a named function and put its contents directly in the catch block here since the function is only used in 1 place

src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
Copy link
Member

@jrchudy jrchudy left a comment

Choose a reason for hiding this comment

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

Functionality is good, changes to test cases are good too. Only need to cleanup the changes based on my inline comments.

A good rule to follow is to review your own changes here on github in the browser so you can see how all your changes look compared to everything else.

src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
src/components/record/related-table-actions.tsx Outdated Show resolved Hide resolved
test/e2e/specs/all-features/record/related-table.spec.ts Outdated Show resolved Hide resolved
@jrchudy jrchudy merged commit cedfb0e into master Sep 4, 2024
@jrchudy jrchudy deleted the unlink branch September 4, 2024 19:12
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.

Improvements related to link and unlink behavior
2 participants