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

Allow merging of files at some path relative to the root #2776

Open
abraemer opened this issue Feb 12, 2025 · 0 comments
Open

Allow merging of files at some path relative to the root #2776

abraemer opened this issue Feb 12, 2025 · 0 comments

Comments

@abraemer
Copy link
Contributor

abraemer commented Feb 12, 2025

It is conceivable that some parts of the file tree either have information due to previous work (e.g. code that didn't change) or was scanned with a different scanner or similar. In such a case, one needs the option to not just merge to opossum files but also specify a relative location where one should be integrated into the other.
This reflects the relative merge operation from opossum.lib.hs (yet to be implemented in opossum-file: see opossum-tool/opossum-file#55).

They way this could be implemented in OpossumUI is by using a new context menu (aka right-click menu) in the file tree. This context menu allows the user to select the desired merge directly:

Image

Image

Selecting the Menu point (tentatively named "Import as subfolder...") opens up the usual import dialog (restricted to opossum files?) and then performs the merge-relative operation behind the scenes integrate the new information into the existing document.

Things to consider:

  • Is the name of the subfolder always clear? Do we need an option for the user change it? I think currently for all opossum files "in nature", the root folder "/" always has a single child. Thus the new structure is always clear. However I don't think this guaranteed in principle and just caused by the methods of construction (e.g. ScanCode always has a single root directory). If the root has multiple children, do we just put them beneath the selected folder?
  • Related to above: Do we want to allow adding new subfolders to "/"?
  • Should this merge never "create" new directories but rather replace the selected one? This could also resolve the above issue
  • What if the user has unsaved changes? We could probably just show the same popup that we used for Open/Import/Export. See Show save dialog before open/import/merge/export #2775
  • Are there other - perhaps simpler - solutions to this workflow?
    • Option for import: Risks making the import more complicated for a function considered for expert users. Specifying the merge location seems difficult and would require some thinking
    • Standalone menu entry: Menu gets longer and longer. Same issue with specifying the merge location
    • Button somewhere else in the UI? Conceptually the place for file operations is the file tree. Maybe there could be a Toolbar between the Header "All Resources" and the actual tree?
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

No branches or pull requests

1 participant