Problem/Motivation
I need to move the 'Reset filters' button in Summary Block to the end of all the processors in the block. I attempted to rearrange via the UI, but I don't believe it is possible at this time, although I certainly could have missed something while configuring. No matter what I did, the applied filters would appear below them. Is there a way to do this currently?
Right now, my solution consists of an ugly preprocess hook that targets the processor by title 'Reset filters'. This is far from ideal as we now rely on the configurable title field, so maybe there is at least a better way to do it than that?
Proposed resolution
Ideally there would be a way to reorder the button through the UI and export, like a weight field or similar.
Remaining tasks
TBD
User interface changes
TBD
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | interdiff_15-18.txt | 3.78 KB | joao.ramos.costa |
| #18 | allow-reset-link-to-be-positioned-3054068-18.patch | 8.85 KB | joao.ramos.costa |
| #15 | allow-reset-link-to-be-positioned-3054068-rerolled-12.patch | 8.7 KB | joao.ramos.costa |
| #14 | reset-facets-link-position.png | 62.37 KB | capysara |
| #12 | interdiff_7-12.txt | 1.11 KB | antonnavi |
Comments
Comment #2
trwill commentedComment #3
trwill commentedComment #4
borisson_There is currently no option to do this. I assume that it would be a good idea to make this configurable though.
Comment #5
ilya.no commentedAttaching initial patch with update.
Comment #6
andypostNice approach! Meantime I think the option should be string instead of int (more readable for config interdiffs)
Comment #7
ilya.no commentedThanks for the tip! Attaching new patch and interdiff.
Comment #8
andypostNow it needs post_update hook to set default value to existing config
Comment #9
andypostNW for that
Comment #10
antonnaviHi, all here!
post_update hook was added.
Comment #11
andypostPlease use ConfigEntityUpdater for this kind of upgrades, see https://git.drupalcode.org/project/drupal/blob/8.8.x/core/modules/views/...
Comment #12
antonnaviUsage of
ConfigEntityUpdaterwas added.Comment #13
antonnaviComment #14
capysara commentedPatch applies cleanly to 1.4 and works great!
* /admin/config/search/facets/facet-summary/[my_facets_summary]/edit
* Under the reset facets link settings there's a new dropdown for Position (see screenshot). I tested all three options Show reset link before facets link (default), Show reset link after facets link, and Show only reset link.
Thanks!
Comment #15
joao.ramos.costa commentedRerolled against 2.x
Comment #16
baluertlComment #17
mkalkbrennerSince a proper default value is provided, I assume that this post update is not needed.
If it is needed an update hook should be used instead to modify the configs.
Comment is wrong.
Comment #18
joao.ramos.costa commentedHi @mkalkbrenner, thanks for the review. Comment is fixed and update hook is added instead of post_update.
Comment #19
joao.ramos.costa commentedComment #21
mkalkbrenner