-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature - Line highlighting within code block #2469 #2682
Conversation
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.
Can you provide some info on how to use this feature?
Now iterates over highlighted lines instead of all lines of the snippet
Hmm...That's strange, I can't highlight the line by clicking on the gutter. Can you check it? |
This makes the default snippet also handle highlight on the lines, because this snippet is created in the code without the normal snippet constructor
Please fix your eslint error |
Also I discover that when my snippet doesn't contain |
Now iterates in the SnippetNoteDetail constructor the snippets and if linesHighlighted is not defined assigns an empty array
Fixed the issues you pointed. |
I can still reproduce the old bug. You should fallback |
Could you please tell me how to reproduce that bug? |
It's an old default snippet note generated by Boostnote. |
I've been trying to replicate this old bug but with no sucess. |
I've tested in several computers and I can't replicate the bug anymore, please give me detailed instructions to replicate your bug. |
I've also added this functionality to markdown notes. |
Fixed a bug where a note or snippet is created before the pull request and you ran Boostnote for the first time after the pr and you firstly created a note or markdown and only then returned to the old default notes and you couldn't highlight
I've made the necessary corrections to fix the bug. |
I've been testing more the pr and I found another bug that I will try to solve by tomorrow. |
Lines now save correctly with different inputs, making sure that different inputs like enter, delete, paste and where it's deleted stay consistent when saving. Included in the create/update snippet/note tests the structure from lines highlighting saved to the files.
This new commit contains two main parts:
|
@ZeroX-DG I'm also part of the same class that has recently contributed to Boostnote. As some of them mentioned It would really help my group's grade if we knew if the pull request is going to be accepted. Thank you very much! |
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.
Everything works fine now, please change your code before I can approve the PR.
Made the changes you asked, @ZeroX-DG . Thank you for explaining π |
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.
LGTM π Thank you for your contribution and good luck with your course!
Thank you very much, and thank you for guiding us on submitting our pull request! Hope our work benefits Boostnote π |
Description
This PR solves the #2469 issue, it allows the user to highlight lines of code within a snippet of code by clicking on the line number. This highlight is not temporary, it persists when exiting Boostnote. Used CodeMirror built-in functionality to do this.
To use this feature you just need to click the line number of the respective line you want to highlight.
Before
After
Issue fixed
Issue #2469 Line highlighting within code block
Type of changes
Checklist: