Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
It would be nice to have disabled blocks sorted by name, not by weight. When you have more then 10 blocks, it's getting messy. To find block that you are looking for, often you have to use searching. With blocks sorted by name, it would be much easier to find block that you are looking for. Instead of searching, you just scroll down block's page and find it.
Comment | File | Size | Author |
---|---|---|---|
#38 | block_354133.patch | 852 bytes | NancyDru |
#36 | block_354133.patch | 877 bytes | NancyDru |
#22 | blockordering.patch | 743 bytes | yoroy |
#19 | block.admin_.inc-D7.patch | 704 bytes | AlexisWilke |
#9 | block_001.patch | 737 bytes | NancyDru |
Comments
Comment #1
yoroy CreditAttribution: yoroy commentedThis would be helpful indeed. I didn't realize disabled blocks are sorted by weight now, but I do know that it does get messy quick. If sorted alphabetically, then knowing the title of the block provides a shortcut, you can 'guesstimate' where to start looking in the list. Now, you have to go through the whole list to find it.
Comment #2
ultimateboy CreditAttribution: ultimateboy commentedI am not completely sure about this one. Often, I use the fact that you can sort the disabled blocks to my advantage by ordering them by importance and placing blocks that will not be used on a specific site near the bottom of the list. Maybe I am alone on this one.. but I kinda like the way it currently works.
Comment #3
yoroy CreditAttribution: yoroy commentedI never even imagined the disabled blocks were sorted by weight, let alone actively 'weighting' them to my advantage. But I can see how that is useful too.
So, do we need to make it more obvious that even disabled blocks are sorted by weight or change the sort? I certainly learned something new from your comment. I wonder how we can make that more clear.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedMaybe it could be set in blocks page settings -> new tab with option to choose weight or title sorting(only for disabled blocks), or ahah select above disabled blocks.
Comment #5
AlexisWilke CreditAttribution: AlexisWilke commentedMy personal comment, I would say that for most people the alphabetical order would be best.
It should be easy to reset the weight of disabled blocks to 0 and voila. The rest would work automatically already.
In regard to those block we'd never want to use, maybe adding a "hide" feature and a "show hidden blocks" would solve the problem? That way, block that I know I do not want to use I can just hide forever.
And speaking of alphabetical order, the "Component" of the Drupal issues are NOT in alphabetical order. Very annoying too. 8-)
Thank you.
Alexis Wilke
Comment #6
NancyDruActually I solved this with a simple "if" statement in function _block_compare following
Do this:
Unfortunately, a Windoze problem temporarily prevents me from creating a patch file. If someone else can do that, it would help a lot.
This is identical on 6.x. Frankly, I consider this a bug and it should be back-ported.
Comment #7
AlexisWilke CreditAttribution: AlexisWilke commentedHi Nancy,
Nice to see you around 8-)
One thing, btw, switch to Linux!
There are two patches: D6 & D7.
Thank you.
Alexis Wilke
Comment #8
NancyDruThanks, Alexis. I was given another PC with which to begin my transition to Linux. Unfortunately, my current PC's CD writer has a CD stuck in it, so I can't create a CD to build Linux with yet. It will happen soon though.
Comment #9
NancyDruWe never had this marked CNR. Also tagging so it might get looked at for D7.
Here's a simpler version that is identical for 6.x and 7.x.
Comment #10
NancyDruYee haw! Got past the test bot in the first try.
Comment #11
yoroy CreditAttribution: yoroy commentedFeatures are frozen for D7
Comment #12
NancyDruThis is neither a feature nor an API change. It is a UI improvement, which should make it a good candidate for 7.
Comment #13
yoroy CreditAttribution: yoroy commentedFair enough :)
Patch in #9 doesn't apply anymore. Sorting disabled blocks alphabetically would be good, I find myself scrolling up and down disabled block lists in D6 every time.
Looking at D7 head, I see disabled blocks are now sorted alphabetically. Already fixed then?
(and: use #d7ux tag only for proposals from the d7ux project, other ux issues use the generic 'usability' tag, thanks!)
Comment #14
AlexisWilke CreditAttribution: AlexisWilke commentedyoroy,
By default, the disabled blocks are sorted. If you move them around, Save, and they come back in alphabetical order, then it is indeed done (it could be that disabled blocks have their weight reset in D7?) D6 was like that. After a while, it's all messed up. But a Fresh install looks good. Most certainly why it was not noticed by the author.
Thank you.
Alexis
Comment #15
NancyDru#9: block_001.patch queued for re-testing.
Comment #17
yoroy CreditAttribution: yoroy commentedAlexisWilke: ah of course, that was shortsighted of me, thank you for explaining. Yep, still worth doing for D7, this is.
Comment #18
NancyDruI don't currently have the capability to re-roll the patch, and it may take a few days to do so. Can someone else re-roll it?
Comment #19
AlexisWilke CreditAttribution: AlexisWilke commentedUpdated D7 patch
Comment #20
yoroy CreditAttribution: yoroy commentedNeeds review for testbot
Comment #22
yoroy CreditAttribution: yoroy commentedHow's this then. Untested.
Comment #23
NancyDruIt's tested now. Thanks, Roy.
Comment #24
AlexisWilke CreditAttribution: AlexisWilke commentedYoroy,
I guess the test server does not like the -D7 on the filename... 8-)
Thank you.
Alexis
Comment #25
NancyDruNow, if we can just get Webchick or Dries to look at this...
Comment #26
yoroy CreditAttribution: yoroy commentedThey only look at patches that are RTBC :)
Would be good to have one more reviewer actually apply the patch, give this a thumbs up and mark this rtbc
Comment #27
NancyDru@Alexis, have you tested this patch? If so, I think three is adequate for such a trivial patch.
Comment #28
AlexisWilke CreditAttribution: AlexisWilke commentedNancy,
I run the patch on all my D6 sites. This was a D6 post at the start... I have not tested on D7, although the code is exactly the same so I don't see a problem with it... I just don't have the time to run a D7 yet!
Sorry,
Alexis
Comment #29
yoroy CreditAttribution: yoroy commentedThat should work then :)
Comment #30
aspilicious CreditAttribution: aspilicious commentedCode looks good
Comment #31
Dries CreditAttribution: Dries commentedIf region is none, why do we calculate the weight?
Comment #32
NancyDruWe don't, Dries, at least not with this patch. Using the weight when the region is "none" (i.e. disabled) is what led to the blocks being out of order to start with. This patch ignores weight when the block is disabled. It was originally developed and tested on 6.x and now ported to 7.x, so it can be applied to both versions to greatly improve the user experience on both.
Comment #33
Dries CreditAttribution: Dries commentedWe do calculate $weight, even though it might not be used. If
$a['region'] != BLOCK_REGION_NONE
evaluates to FALSE, $weight is never used. I know -- it is a minor code optimization. Not sure it is worth it. :)Comment #34
NancyDruAh, I see. Yes, we were trying to modify the code as little as possible, so we stuck the extra condition on the end of the existing IF. Considering that there are sites with hundreds of blocks, it might make a small difference (the page is so slow anyway).
Comment #35
webchickSounds like this still needs work, or discussion, or something.
However, I think it's worth doing.
Comment #36
NancyDruHere's what he wants, I think.
Comment #38
NancyDruline endings, bah humbug!
Comment #39
AlexisWilke CreditAttribution: AlexisWilke commentedJust wondering, how come we're not checking that $b['region'] is not defined?
Thank you.
Alexis
Comment #40
NancyDruBecause this is only supposed to affect unenabled blocks, so both regions would be the same. If the block is enabled, you want to use the weight.
I hope someone remembers to put this back to RTBC.
Comment #41
yoroy CreditAttribution: yoroy commentedvoila
Comment #42
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #43
NancyDruFabulous! Thanks, Dries. I don't suppose there is any chance of back-porting this to 6.x?
Comment #44
yoroy CreditAttribution: yoroy commentedOne more yay for actually improving the blocks page a bit!
Comment #45
AlexisWilke CreditAttribution: AlexisWilke commentedCan we have that back ported to D6 or was it already added there and I missed it?!
Thank you.
Alexis
Comment #46
NancyDruNo, it is not in 6.x, AFAIK. IMHO, this patch does not violate the no-changing rule for 6.x. Other than possibly line numbers, it will apply just as well to 6.x.