Share one SyncModal between the repository sync actions - #363
Open
warisshaikh1 wants to merge 1 commit into
Open
warisshaikh1 wants to merge 1 commit into
warisshaikh1 wants to merge 1 commit into
Conversation
ansible-repository-sync and file-repository-sync each carried a byte identical copy of the modal, some ninety lines apiece, so the mirror and optimize wording had to be changed in two places. Moved to src/components/sync-modal.tsx as it stood; the only edit is the inline prop type becoming an IProps interface, as the other components declare theirs. No behaviour change. Each action keeps its own permission check, its own disabled reasons and its own sync call. Refs pulp#347 Assisted By: Cursor (Claude Opus 5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggested by @Redtigercod4 while reviewing #347, as a precursor to it.
ansible-repository-syncandfile-repository-synceach carried a byte identical copy of the sync modal, about ninety lines apiece, so the mirror and optimize wording had to be changed in two places. This moves it tosrc/components/sync-modal.tsxas it stood -- the only edit is the inline prop type becoming anIPropsinterface, the way the other components declare theirs.No behaviour change. Both actions keep their own permission check, disabled reasons and sync call; only the modal is shared.
One thing I noticed but deliberately left alone, since this is meant to be a pure move:
file-repository-syncgates onfile.change_collectionremote, which looks like it was copied from the ansible original -- pulp_file has no collection remote, so I would expect something likefile.change_filerepositorythere. Happy to fix it here or in its own PR, whichever you prefer.Assisted By: Cursor (Claude Opus 5); reviewed by me before submitting.