-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Supporting moving files from one project to another [INS-3865] #7849
Conversation
3ae9ebf
to
52f822e
Compare
Do we need to add some description text to prompt the user that the mock server URL will change after move to another project? |
packages/insomnia/src/ui/components/modals/workspace-move-modal.tsx
Outdated
Show resolved
Hide resolved
const [selectedProjectId, setSelectedProjectId] = useState(''); | ||
useEffect(() => { | ||
(async () => { | ||
const organizationProjects = await database.find<Project>(models.project.type, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just leave a comment here and need a discussion:
@gatzjames We want to move db calls out of UI, but it seems unnecessary to create a new loader in this situation. The DB query will invoke the main process logic through IPC.
8b3a472
to
a963f75
Compare
a963f75
to
594e6ae
Compare
594e6ae
to
5f76e8e
Compare
5d1fc6b
We initially intended to implement the feature to move files to another project, but we discovered that due to issues with cloud synchronization, true file movement couldn't be achieved. Therefore, we have enhanced the existing copy feature, allowing users to now choose the organization and project to which the files will be copied. Why we can't implement real move: |
5d1fc6b
to
87ba6a0
Compare
Add some error tip for user. Prohibit user from moving mock files.
87ba6a0
to
135f037
Compare
…ate workspace modal.
135f037
to
4925888
Compare
Support moving files(collections/documents/mocks/envs) from one project to another.Due to the cloud synchronization mechanism, the move operation is implemented by first copying the file to new project and then deleting it in previous project. This may lead to some unexpected results:1. Since the deleted files will not be automatically removed from the clients of other collaborators within the same organization, when User A moves a file from Project X to Project Y, User B will have two identical files in both Project X and Project Y.2. The IDs of the files and their subfiles will change after the move, so if a mock file is moved, the mock URL will change, and the old mock URL will no longer be available.