Closed (fixed)
Project:
Views (for Drupal 7)
Version:
8.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Aug 2012 at 10:57 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tim.plunkettComment #2
tim.plunkettThat was a bad title.
Since as of now CMI does not handle UI import/exports, but will in the future, the only part we need is listing, with the operations (hopefully in a dropbutton still, separate issue).
The closest thing to it in core is admin/structure/types.
What would be really great is VBO in core, and a view of views.
Comment #3
tim.plunkettIn the meantime, #1764194: Convert export_ui to annotations was committed so the current export UI implementation needs to become an annotated plugin.
I hope I get this right on the first try, or the branch tests might fail.
Comment #4
tim.plunkettMarking back to active.
http://drupalcode.org/project/views.git/commit/ec66628
Comment #5
xjmLots of related stuff in the CMI space:
Comment #6
tim.plunkettDamian started http://drupal.org/sandbox/damiankloip/1778654 and it is AWESOME.
Just to try it out, I went and implemented it for Views.
It's just the listing, so the "add new view" and friends should be moved to views_ui_menu or something.
Comment #7
tim.plunkettThis is against the 8.x-list-links branch. It now looks exactly like the regular admin/structure/views, which is now at admin/structure/views2.
The only thing missing is the sorting.
Comment #8
aspilicious commentedCan we use links here? Mapping confused me a lot. Maybe we should rename actionLinkMappings to actionLinks. It doesn't rly map anything it just builds a list of action links.
Views-admin.ctools.css contains ctools export css. Should we remove that too?
Comment #9
aspilicious commentedwhoops stupid dreditor
Comment #10
tim.plunkettI pushed up a branch for this http://drupalcode.org/sandbox/damiankloip/1685040.git/shortlog/refs/head...
Here's a patch too.
Comment #11
dawehnerWe could probably get rid of these custom callbacks as well.
Comment #12
tim.plunkettAgreed, pushed that up as well.
Comment #13
damiankloip commented@tim.plunkett Nice start on this! :) I had an implementation on my local too, but as you have started here, we might as well go with this one. Here is an updated patch to work with the current '8.x-list' branch in the sandbox.
Most notably, I have changed the action links definitions to use 'href' instead of 'path' to be consistent with theme_links. I have also moved the hook_menu implementation into the plugin class. So we now have a hookMenu method that can be overridden/extended. Seems to be a better idea?
Comment #14
damiankloip commentedOk, here is a patch that includes the work from the core sandbox moved into a views_ui_listing module. This is the diff from the export-ui branch of the views sandbox. It is not anything permanent, we just want to maybe include this as an interim until we can get the listing stuff into core. Anyway, worth seeing what the testbot says. I just quickly did a diff againt 8.x-3.x, haven't had any time to check it and the patch in general is about all I had time to get done just now, so maybe the views_ui stuff is pretty rough.... But hey, It's temporary!
Comment #16
tim.plunkettI'm reasonably sure that #1780396: Namespaces of disabled modules are registered during test runs is causing these error. Added a workaround.
Comment #18
tim.plunkettOkay, I reverted the views_api and hook_hook_info stuff for now, that might just have to wait until the sandbox.
Comment #20
tim.plunkettviews_ui_listing depended only on views, not views_ui
Comment #22
tim.plunkettThis should make the enable/disable work with AJAX.
Comment #24
tim.plunkettAh! My hack for #1780396: Namespaces of disabled modules are registered during test runs was backwards.
Also commented out the test for 'clone' for now (added a @todo).
Comment #26
tim.plunkettAlright, these last 3 were tests for functionality removed in this patch:
Comment #27
tim.plunkettAfter spending a good deal of time with this code, I don't actually think that listing should be done by plugins. It should be controllers, like the new form controllers for content entities.
The reason is this: all listing plugins are all gathered, instantiated, and run. Always. If someone wants to subclass ViewListing and use a new one, I don't know how they'd get it to run after ViewListing. Also, the View object doesn't even know that ViewListing exists, only the other way around.
Therefore, I think we should be adding a key like "listing controller class" or "list controller class" to hook_entity_info. ConfigEntityListingInterface can become either ConfigEntityListControllerInterface or just EntityListControllerInterface, because maybe someone doesn't want to build their listing with Views? Who knows.
Comment #28
tim.plunkettThis is what I had in mind.
Pushed to a new branch 1760284-export-ui-controller in case you guys dislike the idea.
Also attached a patch without the dependencies hack since its not using plugins.
Comment #30
tim.plunkettStill too soon to remove that hack, back to CNR for the regular patch.
Comment #31
tim.plunkettI debugged that problem. I think.
Comment #32
gábor hojtsyThis would be great as well for getting layout module (and its objects such as admin defined regions and layouts themselves) to core in Drupal 8. It is great seeing the general nature of the listing interface and base class is kept.
Comment #33
tim.plunkettMerged in! I'll link to the core issue for this when I create it next.
Comment #34
tim.plunkettI opened #1781372: Add an API for listing (configuration) entities.
Reopening and postponing this issue on that, we'll need to switch our code over.
Comment #35
tim.plunkettRerolled for upstream fixes
Comment #36
tim.plunkettThe core patch has noticeably diverged from our implementation. Here is an updated version of it that I think we should commit now, and then the do-not-test patch will be the one to commit later (which will probably still change more).
Comment #38
tim.plunkettWhoops, missed a change.
Comment #39
tim.plunkettOkay, I merged in #38, and updated 1760284-export-ui-controller with the do-not-test patch. Back to postponed.
http://drupalcode.org/project/views.git/commit/cb54638
Comment #40
tim.plunkettYAY! The core patch went in.
Comment #41
dawehnerAwesome
Comment #42
tim.plunkett7 files changed, 37 insertions(+), 277 deletions(-)
http://drupalcode.org/project/views.git/commit/505fa87