Problem/Motivation
- Go to admin/structure/block and use the "Place block" button
- The "Place block" dialog provides a filter "Filter by block name"
When using facets, I know I want to use a "Facets" block. When I start typing "facet", I don't get any results.
Steps to reproduce
Proposed resolution
I think, we should change the filter to "Filter by black name or category".
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#42 | 2711735-nr-bot.txt | 150 bytes | needs-review-queue-bot |
Issue fork drupal-2711735
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dasjoComment #3
dawehnerComment #6
kthullHa! This is exactly the same use case that brought me looking to see if there is already an issue for this.
Comment #7
tetranz CreditAttribution: tetranz at Third and Grove commentedWorking on it ...
Comment #8
tetranz CreditAttribution: tetranz at Third and Grove commentedComment #9
tetranz CreditAttribution: tetranz at Third and Grove commentedhmm ... I guess a single text box that searches both would be better. Doing that now.
Comment #10
tetranz CreditAttribution: tetranz at Third and Grove commentedI think this is better.
Comment #13
tim.plunkettCombining it looks way better!
I think this could be
var $category = $row.find('.block-filter-category-source');
The new div around the category is causing some overly-specific tests to fail.
For example:
\Drupal\block\Tests\Views\DisplayBlockTest::testBlockCategory
$pattern = '//tr[.//td[text()=:category] and .//td//a[contains(@href, :href)]]';
Comment #14
tetranz CreditAttribution: tetranz at Third and Grove commentedThanks Tim.
Comment #15
Dinesh18 CreditAttribution: Dinesh18 as a volunteer commentedVerified the interdiff.txt. It implements all the comments mentioned in #13.
+1 to RTBC.
Comment #16
tetranz CreditAttribution: tetranz at Third and Grove commentedComment #24
ranjith_kumar_k_u CreditAttribution: ranjith_kumar_k_u at Zyxware Technologies commentedRe-rolled for 9.2
Comment #25
sonam.chaturvedi CreditAttribution: sonam.chaturvedi at QED42 for Drupal India Association commentedComment #26
sonam.chaturvedi CreditAttribution: sonam.chaturvedi at QED42 for Drupal India Association commentedVerified and tested patch#24. Patch applied successfully.
Testing Steps:
1. Go to Admin > Structure > Block Layout
2. Click on "Place block" button
3. Search block by category. For ex. core
4. Check no result is found
5. Now apply the patch
6. Again, click on "Place block" button
7. Search block by "block name"
8. Verify correct result is displayed
9. Search block by "block category"
10. Verify correct result is displayed
11. Search block by both "block name and category"
12. Verify correct result is displayed
Testing Results:
Block are searched and filtered correctly based on name, category and both
Before patch:
After patch:
Filter by name
Filter by category
Filter by both
Comment #27
sonam.chaturvedi CreditAttribution: sonam.chaturvedi at QED42 for Drupal India Association commentedComment #28
tim.plunkettAs it says at the top of this file:
DO NOT EDIT THIS FILE
You have to edit the block.admin.es6.js file and then compile this one.
Comment #29
vakulrai CreditAttribution: vakulrai as a volunteer and at QED42 for QED42 commented@tim.plunkett , I have updated the patch as per your inputs. The patch include changes to .es6.js and .js files.
Please review.
Comment #30
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #31
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #32
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #33
tim.plunkettCan't use const and then reassign it like that.
I'm not sure that
let categoryMatch = false;
is the best way to do this, but at least it's valid JS...Comment #34
mrweiner CreditAttribution: mrweiner as a volunteer commentedJust taking a quick look at the code without actually testing, some other ways you could keep categoryMatch as a const:
Comment #37
vikashsoni CreditAttribution: vikashsoni as a volunteer and at Zyxware Technologies commentedPatch not applying in drupal-9.3.x-dev
giving error while applying the patch
Comment #39
tim.plunkettHad to adjust based on #3239509: Add String.includes polyfill to support IE11 and Opera Mini.
This is still tagged needs issue summary update, can someone work on that?
Here's an MR of the latest patch.
Comment #42
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.