OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Admin Theme - Widgets - Sort Icons Not Correct #7269

Open rtpHarry opened 7 years ago

rtpHarry commented 7 years ago

The sort icons on the widgets admin index page aren't correct:

image

This is because:

Old icons:

image

Skrypt commented 7 years ago

I think in this view it's used differently than what it should do. The thing is that the switchable is meant to display in grid view or list view. Here we are using to hide zones that don't have any widgets. So maybe we should have a version of that script that would be named "hideable". Or just extend the current script to be able to have custom icons.

rtpHarry commented 7 years ago

Yeah, it could be easily extended to accept optional params that will give alternative classes for the icons.

Skrypt commented 7 years ago

We still need to fix the problem with the widget order controls. They don't work.

rtpHarry commented 7 years ago

@Skrypt are you sure you have ruled that out? For me they were definitely not working the first time through, then when I came back to do the widgets issues they were working and then since then it seems you have seen them not working? Could be some edge case that is cropping up?

The funny thing is when I did test them the 2nd time I did experience a kind of bug but couldn't recreate it. I had been testing widget create in a different branch but the same db so I had about 6 recentblogpost widgets and a blogarchives widget. When I pressed the first up button the blogarchives widget jumped from the end of a list of 6 recentblogpost widgets up to the top of it. All subsequent moving around was normal even when I put it back down to its original spot and pressed up.

Skrypt commented 7 years ago

I've seen them not working because I had only one widget in a zone. I forgot we could'nt move them from one zone to an other by using those arrows. So, I created 2 widgets in the same zone and it worked. Apart from that I looked at that view code and nothing changed really for the new admin theme. So, if we got a bug on that it is more likely to not be only related to the new admin theme.

I think a scenario that could have happened is that you created different widgets in different zones. Their display order would have been = 1. Then you probably merged those widgets in the same zone and they had the same display order. So it ordered them by name simply. And when you clicked on the last one it has set it's display order to 0. Which made it move on top. Somehow it worked like it should.

I think, if that's what's happening, then we should just rethink this by using drag and drop of widgets inside zones intead.