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

Feat/ Import collection summary #4086

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

Pragadesh-45
Copy link
Contributor

@Pragadesh-45 Pragadesh-45 commented Feb 21, 2025

Description

This PR is an initial implementation of the concept idea for the Import Summary tab in the collection, along with storing a JSON file called import-summary.json. This file will store the import source, the entire Postman collection, and two types of Bruno collections:

  1. brunoCollectionUntranslated: Contains the untranslated Bruno collection of Postman scripts.
  2. brunoCollection: Contains the exact Bruno collection that will be created at that point.

(While this approach is not the best, it is implemented as a prototype) The import-summary.json will be used by the Import Summary tab inside the collection settings.

This tab will display a small tree-view, allowing us to choose specific items (folders/requests) and view the corresponding scripts. This view will show the differences between the scripts translated from Postman to Bruno.

Ideally, the view should be editable and have the capability to save changes, similar to resolving merge conflicts on VSCode. It will be a place to view and fix any bugs in the imported scripts. Since this is an Import Summary, it should also provide the necessary details about what was imported from Postman and allow users to fix any issues with missing imports like (auth, vars, and other details).

This code needs a lot of improvements and optimization, particularly in design and functionality.

  • If you have any comments or suggestions, please leave them in the comments.

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Demo:

Import-summary-demo.mp4

Pragadesh-45 and others added 25 commits January 23, 2025 19:15
- Implemented resizable tree view with drag-and-drop functionality
- Added tabs for code and diff views with script type selection
- Improved DiffViewer with theme-aware styling and script comparison
- Refactored ImportSummary component to support more interactive script exploration
- Updated styled components to support new UI interactions and theming
…er handling

- Updated TreeView to support folder and request interactions
- Enhanced DiffViewer to handle different script types and source types
- Modified ImportSummary to support more flexible script comparison
- Added support for comparing folder-level scripts and tests
- Improved navigation and selection in import collection summary
- Enhanced diff generation logic to handle line comparisons more robustly
- Updated StyledWrapper to improve diff visualization and theme support
- Adjusted diff viewer settings for better readability
- Removed unnecessary display settings for unchanged lines
- Added dark theme compatibility for diff views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant