-
-
Notifications
You must be signed in to change notification settings - Fork 204
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 multiselect function to system module #1149
base: master
Are you sure you want to change the base?
Conversation
multiselect
function to system
moduleThere 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.
Sorry, didn't have much time to go through the whole thing yet but I do have a few more ideas I'll get to later.
src/core/functions/internal_functions/system/MultiSelectModal.ts
Outdated
Show resolved
Hide resolved
src/core/functions/internal_functions/system/MultiSelectModal.ts
Outdated
Show resolved
Hide resolved
It add new lines at the start of the file after the result is returned. I can't quite figure out why it's happening or is it just happening in my system, please let me know if it's just happening in my system or same happens on others as well. BUG.-.Adds.new.line.at.the.start.of.the.file.when.cursor.is.in.editor.view.mp4 |
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.
I really appreciate your work on this, I know a few people in the Obsidian Discord have been excited about this. Apologies for not getting to this sooner.
this.navigateSelection("UP"); | ||
break; | ||
|
||
case "Enter": |
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.
I'm not sure why, but hitting the Enter key while in the input is also adding a newline in the editor, causing a conflict and the following notice to pop up.
I also feels a bit off to have to click on the input then hit the Enter key if you're clicking or tapping on options instead of using the keyboard and hitting the Tab key to select options.
Maybe hitting the Enter key while the modal is open should close the modal, without having to have the input focused?
Might also be worth adding an "Okay" or "Done" button to make it easier for mobile and touch users.
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.
I also feels a bit off to have to click on the input then hit the Enter key if you're clicking or tapping on options instead of using the keyboard and hitting the Tab key to select options.
I will work on it so that we don't have to click on input field to select options and add "Done" button to make more mobile friendly.
I am trying to figure out how to fix the issue (adds a newline in the editor) but didn't get any results if you have any suggestions please fill free to let me know.
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.
I'll try to find some time to figure out why it's adding newlines. I don't think the suggester does this, or if it does, I haven't run into that issue yet.
this.renderSuggestions(); | ||
} | ||
|
||
removeLastItem() { |
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.
When this function is called, it isn't adding back the item to the list of available suggestions. I think it should be added back as an available item to select.
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.
Do you mean removeLastItem()
function?
It removes the selected item and re-renders suggestions by calling renderSuggestions()
.
renderSuggestions()
function filters out items which are selected and renders suggestions which are not selected.
Since we remove the selected item in removeLastItem()
it should be available for suggestions.
If you mean something else, can you please provide me more details.
I'm adding a +1 here. |
Sample.File.-.Playground.-.Obsidian.v1.3.5.2023-07-23.21-07-47.mp4
This PR solves the issue #461 & #1130 by adding multiselect internal function to the system module.
BUG.-.Adds.new.line.at.the.start.of.the.file.when.cursor.is.in.editor.view.mp4
It adds new lines to the start of the file.
Is it only happening in my system or same happens in others as well.
Please tell me if it is same on your system as well, and provide feedback on how to solve it if possible.