-
Notifications
You must be signed in to change notification settings - Fork 630
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 indexing of dropdown entries #2004
Add indexing of dropdown entries #2004
Conversation
…oenvanwijk/blockly-samples into Add-indexing-of-dropdown-items
We have a partial fix for this on the OSD branch: #1971 It adds the indexing but doesn't fix the blocks. We're planning to merge that early next week (we're doing a design sprint this week) so I'll come back to this after that is done so we can get it rebased and integrated! |
FYI I got assigned to the original issue #1940 and was looking into the part 2 of fix. I was looking into how to represent blocks in json and was about to raise questions around this. |
Thanks, created #2013 for the osd branch. |
We ended up having to close the other PR, so circling back on this! I gave it a test and there are a few issues, but generally looks good. Are you still interested in working on this @koenvanwijk ? |
Yes, I assumed the other solution would be integrated... consequently, I waited. What are the issues?
Regards,
Koen
…________________________________
From: Beka Westberg ***@***.***>
Sent: Monday, November 27, 2023 22:58
To: google/blockly-samples ***@***.***>
Cc: Koen van Wijk ***@***.***>; Mention ***@***.***>
Subject: Re: [google/blockly-samples] Add indexing of dropdown entries (PR #2004)
We ended up having to close the other PR, so circling back on this! I gave it a test and there are a few issues, but generally looks good.
Are you still interested in working on this @koenvanwijk<https://github.com/koenvanwijk> ?
—
Reply to this email directly, view it on GitHub<#2004 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB6YZCOJLQ3PHJXHPCXQ4ITYGUEIVAVCNFSM6AAAAAA5SSH6G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGY4DOOBYGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
-------- Disclaimer --------
This email and any files transmitted may contain proprietary and confidential information of ICT Group or any of its subsidiaries (“ICT”) and is intended only for the (use of the) named recipient(s) above. If you have received this message in error or are not the intended or named recipient(s) of this message, please immediately notify the sender by return and delete this email message from your computer. Any views or opinions presented are solely those of its author and do not necessarily represent those of ICT. You are hereby notified that unauthorized disclosure, use, dissemination, forwarding, printing or copying of this e-mail and its attachments either whole or partial of its contents is strictly prohibited. ICT cannot guarantee that email communications are secured and error-free and does not accept any liability for damages resulting from the use of email. The general terms and conditions of purchase respectively sale and delivery of ICT are applicable to all transactions and undertakings resulting therefrom.
|
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.
Thanks for still be interested in this! Appreciate your patience =)
I saw an issue yesterday where searching for variable names would create new variables in the workspace. But I'm not sure if that's actually an issue or if I just rebased your code incorrectly.
Could you rebase this and then make the changes requested? Then I'll give this another manual test!
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.
Changes to this file are unnecessary because the other PR added indexing.
@@ -161,9 +161,45 @@ export class ToolboxSearchCategory extends Blockly.ToolboxCategory { | |||
this.flyoutItems_ = query ? | |||
this.blockSearcher.blockTypesMatching(query).map( | |||
(blockType) => { | |||
// check the block if it has dropdowns |
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 remove the inline comments throughout? I think the code is self-explanatory!
Yes indeed the code is readable. But I wrote the comments not the code 😉. I agree the comment can be removed now.
Is creating a new variable a side effect of const block = this.workspace_.newBlock(blockType); ?
________________________________
From: Beka Westberg ***@***.***>
Sent: Tuesday, November 28, 2023 20:28
To: google/blockly-samples ***@***.***>
Cc: Koen van Wijk ***@***.***>; Mention ***@***.***>
Subject: Re: [google/blockly-samples] Add indexing of dropdown entries (PR #2004)
@BeksOmega requested changes on this pull request.
Thanks for still be interested in this! Appreciate your patience =)
I saw an issue yesterday where searching for variable names would create new variables in the workspace. But I'm not sure if that's actually an issue or if I just rebased your code incorrectly.
Could you rebase this and then make the changes requested? Then I'll give this another manual test!
________________________________
On plugins/toolbox-search/src/block_searcher.ts<#2004 (comment)>:
Changes to this file are unnecessary because the other PR added indexing.
________________________________
In plugins/toolbox-search/src/toolbox_search.ts<#2004 (comment)>:
@@ -161,9 +161,45 @@ export class ToolboxSearchCategory extends Blockly.ToolboxCategory {
this.flyoutItems_ = query ?
this.blockSearcher.blockTypesMatching(query).map(
(blockType) => {
+ // check the block if it has dropdowns
Can you remove the inline comments throughout? I think the code is self-explanatory!
—
Reply to this email directly, view it on GitHub<#2004 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB6YZCOLXTW5ETMWJNFPLUDYGY3M5AVCNFSM6AAAAAA5SSH6G6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONJTG4ZDGOJVGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
…-------- Disclaimer --------
This email and any files transmitted may contain proprietary and confidential information of ICT Group or any of its subsidiaries (“ICT”) and is intended only for the (use of the) named recipient(s) above. If you have received this message in error or are not the intended or named recipient(s) of this message, please immediately notify the sender by return and delete this email message from your computer. Any views or opinions presented are solely those of its author and do not necessarily represent those of ICT. You are hereby notified that unauthorized disclosure, use, dissemination, forwarding, printing or copying of this e-mail and its attachments either whole or partial of its contents is strictly prohibited. ICT cannot guarantee that email communications are secured and error-free and does not accept any liability for damages resulting from the use of email. The general terms and conditions of purchase respectively sale and delivery of ICT are applicable to all transactions and undertakings resulting therefrom.
|
Hm ok so I looked at this again, and I think we should actually reorganize this a bit. I think the BlockSearcher should handle saving the field values in the trigrams map, instead of re-searching for the dropdown fields in the ToolboxSearchCategory. That way we can also easily match the alt text (which is currently being indexed, but not selected when searching), and it's more performant. So the trigrams map will change to be:
And |
As an end user of the
|
Yes please open an issue for this with reproduction steps! |
Fixes: google#1940 Uses the Block State as suggested here: google#2004 (comment)
Heya @koenvanwijk are you still interested in working on this? I'll check back in a week and close it if not! |
I found a colleague that works on it. Expect a pull request next week. |
A colleague of mine is working on this one now.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Beka Westberg ***@***.***>
Sent: Friday, January 5, 2024 5:32:04 PM
To: google/blockly-samples ***@***.***>
Cc: Koen van Wijk ***@***.***>; Mention ***@***.***>
Subject: Re: [google/blockly-samples] Add indexing of dropdown entries (PR #2004)
Heya @koenvanwijk<https://github.com/koenvanwijk> are you still interested in working on this? I'll check back in a week and close it if not!
—
Reply to this email directly, view it on GitHub<#2004 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB6YZCJAPWUIXGWOSRHDY73YNATIJAVCNFSM6AAAAAA5SSH6G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYHE2DOMRRGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
-------- Disclaimer --------
This email and any files transmitted may contain proprietary and confidential information of ICT Group or any of its subsidiaries (“ICT”) and is intended only for the (use of the) named recipient(s) above. If you have received this message in error or are not the intended or named recipient(s) of this message, please immediately notify the sender by return and delete this email message from your computer. Any views or opinions presented are solely those of its author and do not necessarily represent those of ICT. You are hereby notified that unauthorized disclosure, use, dissemination, forwarding, printing or copying of this e-mail and its attachments either whole or partial of its contents is strictly prohibited. ICT cannot guarantee that email communications are secured and error-free and does not accept any liability for damages resulting from the use of email. The general terms and conditions of purchase respectively sale and delivery of ICT are applicable to all transactions and undertakings resulting therefrom.
|
I'm going to go ahead and close this PR =) Looking forward to reviewing a new one with the change! |
Fixes: google#1940 Uses the Block State as suggested here: google#2004 (comment) Fixes: bug that didn't indexed the last trigram from a word
The basics
The details
Resolves
Fixes #1940
Proposed Changes
The search should find the block and select the dropdown item.
Reason for Changes
The search fails to find blocks with dropdown.
Test Coverage
The manual test show the blocks are found and that the option is selected.
Documentation
No update of the documentation is required. Although an remark could be made.
Additional Information