Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Apr 2013 at 17:57 UTC
Updated:
29 Jul 2014 at 22:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xjmRelated: #1968596: New displays are not ordered correctly. @damiankloip said in IRC that this issue will probably solve that one.
Comment #2
damiankloip commentedComment #3
damiankloip commentedOops, we can remove the declaration in views_ui_theme too.
Comment #5
damiankloip commented#3: 1968020-3.patch queued for re-testing.
Comment #7
damiankloip commentedDoh, rerolled after #1963976: Remove theme_views_tab() and theme_views_tabset() declarations from views_ui_theme(). All because it added a comment in that it shouldn't have! :)
Comment #8
xjmThis is sort of out of scope, but I was about to file a separate issue for it that will just collide with this: Can we change this title to "Reorder displays" (sentence case)?
Comment #9
xjmSo, something's not working yet:
https://www.dropbox.com/sh/sv7ullcn9i7wpxk/Bwkhf5Et-i#f:reorder.mp4
Comment #10
damiankloip commentedI think that's totally in scope, we are ripping the whole form apart anyway.
Comment #11
xjmActually, it appears that #9 also happens in HEAD, if there are no new displays being created. If you save the view with the patch, though, the displays are in the correct order once you go back to edit a second time. So basically there are like four kinds of broken with display ordering currently, and we can solve those other bugs in the other issue.
Comment #13
damiankloip commentedWith the fixed form, the logic doesn't hold together in submit. I think now it all works properly it should do something more like this. This should fix the tests.
I cleaned up the submit a little while I was there, and moved the increment on $position, so it's easier to read in the code.
Comment #14
damiankloip commentedRerolled after #1820414: CHANGE NOTICE: Move views_ui.module directly into /core/modules/ went in.
Comment #15
dawehnerIsn't the code doing exactly the same as before? Why bother with adding a new line.
You must be really good, if you manage to have no displays at all :)
You can use the element-hidden class.
Isn't the code doing exactly the same as before? Why bother with adding a new line.
Comment #16
damiankloip commentedThanks for the review!
Yep, exactly the same. I just thought it would make it easier to read if the code explicitly used $position then incremented. Otherwise it may not be obvious (or people may forget) that the variable will be used, then incremented. I guess it's just a personal preference :) I have changed it back though.
You never know, someone might manage something with no displays, that should not be possible, and should break before that anyway. I think it might as well stay there.
Comment #17
dawehnerI really love to kill all these totally useless theme functions! That's a great patch.
Oh I absolutely agree. It should stay there and is it just because of consistency.
What about just using foreach ( ... $id => $display)
Just wondering whether it is necessary to set an empty class here.
Comment #18
damiankloip commentedThanks again. I made those changes too.
Comment #19
dawehnerI just had a manual try and realized that the remove link is not working. What can we do about it?
Aside from that, do you think we should hide the link for NON-js users? The link will not work for them anyway.
Comment #20
damiankloip commentedWell I think the remove link doesn't work currently before this patch, and neither do any of the remove links actually. So I think that should be another issue.
We could hide the link for non js users, as they will just have the checkbox anyway. What do you think, hide the link and make it visible with js? I will take a look at adding that.
Comment #21
dawehnerYeah that's what I meant. 'js-show' is the needed css class for that.
I had in mind that changing this to a proper build array would maybe solve the loading of the javascript, but well maybe it's just a bug in the ajax system
which will be solved over time.
Comment #22
damiankloip commentedAlas, if we add this now the link will disappear because the js isn't working properly for the modal. There is already an issue that will fix this though, right? I remember we had the same discussion in another issue.
I have changed the link to use a build array, that is much better!
Comment #24
damiankloip commentedComment #25
dawehnerManually using the patch works pretty fine, but there are just a few minor things in the code (points etc.).
Comment #26
dawehnerRemoving and reordering works fine, though there is a unrelated problem that the reorder just happens on a save on the actual views page (but this is unrelated for now).
The idea was to actually remove the hook_theme entry.
Comment #27
damiankloip commentedok, let's do that. We have manually tested this today and things are looking good.
Comment #28
alexpottCommitted d556b32 and pushed to 8.x. Thanks!