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

Enh: Add Support For Copy Existing Module to Control Panel #4030

Closed
zyhfish opened this issue Mar 20, 2024 · 5 comments · Fixed by #4198
Closed

Enh: Add Support For Copy Existing Module to Control Panel #4030

zyhfish opened this issue Mar 20, 2024 · 5 comments · Fixed by #4198

Comments

@zyhfish
Copy link
Contributor

zyhfish commented Mar 20, 2024

Reproduce Steps

  1. Create a new page, use "Add existing module" function to copy a module from home page.
  2. edit the module with some new content.
  3. browse to the home page.

Expected Result:
home page should keep it's original content.

Actually Result:
After make changes in the new page, home page's content will also be affected. at least we should give an option for whether it's a copy or reference action to avoid any confuse.

@sbwalker
Copy link
Member

sbwalker commented Mar 20, 2024

The option for "Add Existing Module" only supports copy by reference - so this behavior is not a bug, it is by design. I think it is only confusing to you because you have prior experience with DNN which has additional options. For users who are not familiar with DNN I think the current option should make sense. Perhaps in the future we could add a Copy option but for 5.1 I would like to focus on stabilizing the release. I will change this to an Enhancement.

@sbwalker sbwalker changed the title Bug: Make changes to the copied module will affect the original module Enh: Make changes to the copied module will affect the original module Mar 20, 2024
@sbwalker
Copy link
Member

The Control Panel could be enhanced to include an additional option in the dropdown for "Copy Existing Module" which would allow the Admin to choose the page/module (similar to Add Existing Module). For copying the module content, this would need to rely on IPortable - however not all modules implement the interface so it would only be useful for a subset of modules.

image

@sbwalker sbwalker changed the title Enh: Make changes to the copied module will affect the original module Enh: Add Support For Copy Existing Module to Control Panel Mar 20, 2024
@thabaum
Copy link
Contributor

thabaum commented Mar 20, 2024

Another idea would be to add a Copy (Mirror) and Sync (Duplicate) select options to the Add Existing module UI. This would help for clarity.
and added tool tip information:

    Copy (Duplicate):
        Description: This option duplicates the existing module, creating an independent copy that can be edited separately.
        Use Case: Choose this option if you want to create a standalone copy of the module with no connection to the original.

    Sync (Mirror):
        Description: This option creates a mirrored instance of the existing module, ensuring that any changes made to one instance are reflected in the other.
        Use Case: Select this option if you want changes made to one instance of the module to automatically propagate to the other instance.
[Add Existing Module]
[Select Page]
[Select Module]
[Select Mode]  <- Sync (Mirror)/Copy (Duplicate)
[Title]
...

I also remember an option of "Is Shareable" in DNN to allow or not allow sharing the module with other pages or group sites.

Just tossing in some feedback along with some additional ideas while we are discussing.

@sbwalker
Copy link
Member

One of the reasons the "Copy Existing" was not included in the Control Panel is because there is already the ability to accomplish this for modules which support IPortable. Basically you can use the Export/Import option for those specific modules which support it. The goal with Oqtane is not to replicate the functionality of DNN... it is to reduce the baggage and focus on creating a lean and high performance framework.

@thabaum
Copy link
Contributor

thabaum commented Mar 21, 2024

I agree with keeping it lean and mean while reviewing what options are ready to be cherry picked as needed to accomplish anything an app similar to DNN or any CMS can be designed to do. Building an app with component modules that can be inserted, moved and removed, we should look to add all the developer features at the core needed to provide this use case as well.

Although similarities can fool someone Oqtane is definitely NOT DNN and is in a more raw form, at the same time we should be able to build DNN with Oqtane. I suppose the "Shareable" feature could be introduced into module settings and would be another issue to create.

I was just feeling that if you do not want certain modules to accidentally get shared or copied on another page by another administrator this could be a way help keep them from being displayed in the list. I also liked how if you uncheck this feature or remove it from being mirrored it will set that module as it's own instance with the imported data going forward.

Enough said there, overall keeping on point I like the "Copy Existing" idea feature suggested.

zyhfish added a commit to zyhfish/oqtane.framework that referenced this issue Apr 27, 2024
zyhfish added a commit to zyhfish/oqtane.framework that referenced this issue Apr 29, 2024
sbwalker added a commit that referenced this issue Apr 29, 2024
Fix #4030: add copy module option for add existing module function.
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 a pull request may close this issue.

3 participants