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

Add support for multiple comments on the same Range #458

Open
Ivanov1ch opened this issue Apr 20, 2024 · 0 comments
Open

Add support for multiple comments on the same Range #458

Ivanov1ch opened this issue Apr 20, 2024 · 0 comments

Comments

@Ivanov1ch
Copy link
Contributor

What is the use case for the feature?
Making multiple comments without specifying a range - eg custom unpackers automatically adding comments with file metadata to be displayed in the GUI.
Does the feature contain any proprietary information about another company's intellectual property?
No
How would you implement this feature?
Refactor CommentsAttributes.comments to from the current comments: Dict[Optional[Range], str] to comments: Dict[Optional[Range], List[str]]. Keeping the Dict would mean less changes to the existing codebase and quicker lookup times for specific comments at scale when compared to another approach like a List of comments.
Are there any (reasonable) alternative approaches?
The current approach handles the creation of a new comment on the same range as an existing comment by appending a newline. This combines the comments into one larger comment, which both messes up the # Comment formatting on the GUI and means that it is impossible to delete one comment without deleting both, making it a bad alternative.
Are you interested in implementing it yourself?
Yes. PR incoming

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