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 multiselect function to system module #1149

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sujyotraut
Copy link

@sujyotraut sujyotraut commented Jul 23, 2023

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.

@sujyotraut sujyotraut changed the title Add multiselect function to system module Add multiselect function to system module Jul 24, 2023
Copy link
Collaborator

@AB1908 AB1908 left a 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.

@sujyotraut
Copy link
Author

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

@sujyotraut sujyotraut marked this pull request as ready for review August 10, 2023 12:37
Copy link
Collaborator

@Zachatoo Zachatoo left a 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":
Copy link
Collaborator

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.

image

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.

Copy link
Author

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.

Copy link
Collaborator

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() {
Copy link
Collaborator

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.

Copy link
Author

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.

docs/documentation.toml Outdated Show resolved Hide resolved
@nirodaonline
Copy link

I'm adding a +1 here.
I'd really like to see this feature.
Thank you both for your work.

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

Successfully merging this pull request may close these issues.

4 participants