Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated #107
Title says it all.
Details
- The recent comments block had a very simple setting that allowed to configure the number of comments to show. Because one can easily configure the number of items (and more) in Views, this is "dropped" from the Block configuration screen.
- This patch reproduces an inconsistency that existed with the old block and should be fixed in a follow-up: The comments are sorted by their creation date, but their modification/updated date is displayed. Although the use-case of editing comments is not common (although, *cough* Drupal.org *cough*) the block may show, e.g. "sadf 2 hours ago", "asdf 1 second ago" and that (wrong) order. See #1938664: Recent comments block sorts by creation date but displays updated date for fixing this.
- The Views configuration files are very inconsistent in terms of their explicit-ness. Some settings are left out of the default config and, thus, saving a view without changing anything will result in a non-empty "diff" of the resulting configuration. Explicitly declaring all keys would make the config files *very* large, but I think there is no way around that, ultimately. Either way, this is not for this issue to solve. Because I generated the view by clicking it together in the UI, it is explicit in some parts and not in others (just like all other default views currently). See #1938654: Export all properties of all views handlers and plugins for fixing this properly.
Discussion items
- As shown in the screenshot, the "3 hours" part of "3 hours ago" is wrapped in an < em > element by the view, whereas previously this was not the case. Because the view simply uses the default "Time ago (with "ago" appended)" display plugin, if we want to retain the previous behavior, I think we should change the output of that plugin in general (i.e. for every view that uses it) instead of overriding the markup specifically for this view. I have no opinion on whether we want to remove the < em > or keep it, though.
- The plugin name is kept as comments_recent as it was before. Because it belongs to comment module (without s) it might be better to name it comment_recent. I guess we should just leave this as is for now and wait for #1862600: Entity type names/IDs are not properly namespaced by owner (e.g., taxonomy.term vs. taxonomy_term) to happen.
Steps to test
- sudo rm -r sites; git checkout sites;
- git pull --rebase
- drush am 1938062
- drush -y si --account-pass=admin --db-url="mysql://root:root@localhost/d8-patch" --site-name=1938062
- get devel (git clone --branch 8.x-1.x http://git.drupal.org/project/devel.git)
- under Extend, enable the Devel generate module
- generate nodes and comments admin/config/development/generate/content be sure to change maximum number of comment per node (I used 4)
- ?
Oops. devel gets an error to. Can use filtered html instead of wysiwyg formatter to get around error when making comments.
Remaining Tasks
These are blocking this issue.
- wont fix: #1967460: Display the block title and populate the machine name for views blocks
- doing it here: #1957276: Let users set the block instance title for Views blocks in the Block UI
- #1956134: Provide helpful editing links on "admin/structure/block" for deriver blocks (menu, views, block content, etc.)
- #1957346: Add some settings on the block display to allow overrides on the block instance configuration (will enable us to fix usability regression caused here.
- (done) #57 address machine name (can be/should be done in this patch)
- make sure usability is addressed (http://drupal.org/core-gates#usability)
- (done) profiling #76
- (done) shows "items per block" #2072181: Change title in blocks form for items_per_page
UI Changes
After screenshots
placing the block
editing the block
the block
hovering on the block, shows contextual edit. both the configure block and edit view links work.
Follow-up issues
- #1954968: Required CKEditor fields always fail HTML5 validation (see #43)
- (need to create issue) major styling issues (see #43 and #45, #47, #49)
- #1862600: Entity type names/IDs are not properly namespaced by owner (e.g., taxonomy.term vs. taxonomy_term) will take care of plugin name comments_recent vs comment_recent (see second discussion item)
- need to open one for the time ago use of < em > (see first discussion item and #43)
- #2054993: Remove (untested, unused, broken) comment_get_recent()
- (needs issue created) collapse machine name field on place (edit) block screen. See #98
Related Issues
- #1807322: Filter comments taking into account the current content language might not be needed when we get this issue done.
- #1987396: Refactor & Clean-up comment.module theme functions (twig collision. see #78)
- #19734: add 'Pending Comments' block
- (needs issue created) dialog will not scroll correctly. See #98
Comment | File | Size | Author |
---|---|---|---|
#144 | comment_recent-fu.patch | 448 bytes | andypost |
#141 | vdc-1938062-141.patch | 32.45 KB | olli |
#136 | Screen Shot 2013-12-11 at 5.33.36 PM.png | 88.56 KB | webchick |
Comments
Comment #1
tstoecklerHere we go. I also updated the issue summary. I have not updated the comment block tests, and thus this is not ready for testbot-primetime. It should be ready for (human) review, though.
See also the issue summary for questions/discussion items.
Screenshots of the old and new block attached. (They were made before ripping out the legacy code as this patch does.)
Comment #1.0
tstoecklerUpdated issue summary.
Comment #2
tstoecklerDamn, the previous patch didn't pick up the deletion of the old config that views module had.
Even though I used that as a starting point for the "new" view, I could not get Git to pick this up as a rename... Don't know why.
Comment #3
tstoecklerAll right, this passes the comment block tests. Let's see what else I broke. Go, testbot, go!
Comment #4
tstoecklerTagging.
Comment #5
tstoecklerRegarding upgrade path tests. I'm currently not able to upgrade due to #1784312-84: Stop doing so much pre-kernel bootstrapping. Also we already have #1871700: Provide an upgrade path to the new Block architecture from Drupal 7 anyway, which means that this part of the upgrade path is missing anyway. I would therefore suggest handling that in a follow-up. But I'm obviously not an authority on that.
Comment #6
tstoecklerComment #7
damiankloip CreditAttribution: damiankloip commented:)
Otherwise, I think this is looking good!
Comment #8
larowlanAny chance we could postpone this in hope of getting #731724: Convert comment settings into a field to make them work with CMI and non-node entities in first? It's a hell of a re-roll.
Comment #9
damiankloip CreditAttribution: damiankloip commentedSeems reasonable, that is a pretty big patch!
Comment #10
dawehnerOh yeah more queries converted to views!
Are you talking about the views files provided by core, or also the ones which are saved new? Many of the default views, which are part of core, has been saved in a time when only needed values where exported. Afaik nowadays every value get in there. If you wonder about the test files, ... there are people which write views config by hand. Let's talk about that tomorrow if you want.
It totally does that, see #1222324: Fix query access control on relationships (comments)
Just wondering, have you saved the view or also rearranged some of the lines?
These lines look odd.
$label is an unused variable here.
I'm wondering whether we should use xpath() instead of assertText() to determine the printed comments.
This code ordering is odd, kind of similar to _filter_xss_attributes, but yeah it's technical right.
Just wondering, have you saved the view or also rearranged some of the lines?
These lines look odd.
Comment #12
tstoecklerReplying to some of the comments. The other ones I will fix in the re-roll I'll do now.
I did re-arrange some of the lines. In the re-roll I will recreate the view from scratch and include it unmodified. I opened #1938654: Export all properties of all views handlers and plugins for the larger issue.
I just kept it as it currently is. I personally think it's fine that way, but if not, let's debate that in a follow-up.
Yes it felt strange to write that. Do you have concrete suggestions, though? I couldn't figure out a nicer way to write this.
I also don't mind at all this being postponed for now, this is pretty trivial to re-roll.
Comment #13
tstoecklerOpened #1938664: Recent comments block sorts by creation date but displays updated date for the issue mentioned in the OP.
Attached patch should pass tests. As promised I recreated the view from scratch. The only change that I had previously missed is that with this the administrative label of the created block is set to "Recent comments". Before it was using the default "Views: Recent comments". Also the view now contains an explicit relationship for the comment.nid <-> node.nid join, which I think was left out before.
Setting to needs review for the bot, if someone wants to set it to postponed per #8 that's fine. (I also wouldn't mind hashing this out further, though, even if we don't commit it now.)
Comment #15
tstoeckler...and I'm an idiot. Sorry
Comment #16
tstoecklerAhhhrrrgggg, Drupal.org is not my friend today...
Comment #17
tstoecklerHere's a re-roll. I also removed the UUID, which I had previously forgotten. I hope I didn't mess up anything this time.
Also removing the upgrade path tags for now.
Comment #19
damiankloip CreditAttribution: damiankloip commentedLooks like a random failure there.
Sorry if I missed something, but do we want this enabled by default? I would say maybe not.
Awesome! I'm glad that we are using this :) The right empty handler to use with default views.
Comment #20
tstoecklerActually I think we do. Because the view provides a block type (but not a block instance) this only means that one can actually add a "Recent comments" block (just like before). By default no block instance is actually shown anywhere.
Comment #21
damiankloip CreditAttribution: damiankloip commentedThat's a good point. Sounds good to me.
Comment #22
xjm#17: 1938062-17-3.patch queued for re-testing.
Comment #23
dawehnerThis looks ready for me. There might be some discussion that DefaultRecentCommentsView.php tests got removed, but hey we test the block already in the other test, so this seems fine.
Comment #24
tstoecklerRight, the only actual assertion that is removed is that the changing of the number of comments to show works. But since that is just a simple view setting it seems redundant to test that here.
Just a note to committers that we should check #1938664: Recent comments block sorts by creation date but displays updated date whether it conflicts with this. I plan to do that (and potentially see how hard it would be reroll that) in the next few days, but we shouldn't commit this if we break that, IMO. This one is pretty easy to re-roll.
Comment #25
xjmI think we removed the empty exported values from
/node
?Patch looks great to me other than that. However, it would be good to have confirmation that someone has actually manually tested this. :)
Comment #26
damiankloip CreditAttribution: damiankloip commentedHmm, not sure, those values are for fields, and we don't have fields on /node.
Comment #27
dawehner#17: 1938062-17-3.patch queued for re-testing.
Comment #28
dawehnerYeah damian is right about this.
This god remove on the frontpage view, because when you actually add a view during the UI you always end up with at least one field, even you configured it to be a node-view one. This not-needed fields then got removed.
Comment #30
xjmComment #31
YesCT CreditAttribution: YesCT commented#1807322: Filter comments taking into account the current content language might not be needed when we get this issue done. (I'll add it to the summary.)
Comment #31.0
YesCT CreditAttribution: YesCT commentedAdded screenie and link to plugin namespacing issue.
Comment #31.1
YesCT CreditAttribution: YesCT commentedadded related issue about multilingual filter of comments
Comment #32
dawehnerJust a rerole.
Comment #33
dawehnerI'm confused about the size of the patch but it seems to be that DefaultViewRecentComments.php landed? Why is this file actually tested, as it doesn't edn with "Test"?
Comment #35
dawehnerThere we go.
Comment #37
xjmHm? Test classes are tested based on whether they live in the module's PSR-0
Tests/
directory. Ending the file names inTest
is just a naming convention for clarity. However, I'm not seeing the file you're referring to? The fail is inCommentBlockTest
and sounds like it might be caused by needing to rebuild the derivative cache.Edit: I posted in reply to an earlier comment, disregard. This is what happens when you open all your issues in tabs at once.
Comment #38
dawehnerTobias removed this test from his patch.
Comment #39
tstoecklerRight, as I explained in #24:
I just noticed that I'm still assigned, which is no longer accurate. I do plan do bring this home, in case @dawehner doesn't beat me to it ;-), but I certainly don't want to hold people off from helping out. Thanks also @dawehner for the reroll.
Comment #40
tim.plunkettThese are missing plugin_id.
Otherwise, this looks awesome!
Comment #41
dawehnerThere we go.
Comment #42
dawehnerups.
Comment #43
jibranDone some testing. Looks great.
Comment block without patch.
Comment block with patch.
Visible no difference only block config page is changed.
Number of recent comments
field is moved to views pager settings.Code is verified by @tim.plunkett in #40 and interdiff looks good in #42. It is RTBC if it'll came back green.
Non related to issues
An invalid form control with name='comment_body[und][0][value]' is not focusable.
Dono about any active issue related this.
Dono about any active issue related this as well.
Comment #44
xjmCan we also add before/after screenshots for the block admin workflow for adding and configuring this block?
Comment #45
YesCT CreditAttribution: YesCT commentedwith regards to #43
#1954968: Required CKEditor fields always fail HTML5 validation is the follow-up for not being able to submit to add a comment.
@jibran
What were the major styling issues exactly?
Comment #45.0
YesCT CreditAttribution: YesCT commentedUpdated issue summary. Added links to related issues.
Comment #45.1
YesCT CreditAttribution: YesCT commentedadded follow-up section
Comment #46
YesCT CreditAttribution: YesCT commentedupdated the issue summary with follow-up issues section.
next: steps to test
going to try using devel to get some comments.
Comment #46.0
YesCT CreditAttribution: YesCT commentedadded follow-up todo for time ago em and plugin name
Comment #47
jibranJust to be clear #1954968: Required CKEditor fields always fail HTML5 validation is not due to this patch.
@YesCT from #45
In D7 bartik shows comments like this
In chrome D8 bartik shows comments like this
In firefox D8 bartik shows comments like this
Comment #48
jibran@xjm #44
Before
After
Comment #49
xjmHmm, the last screenshot in #48 makes it look to me like Views blocks aren't working properly with the new block title behavior from #1875260: Make the block title required and allow it to be hidden. (That's not introduced by this patch, but it is a concern.) Can we get a followup issue for that?
Comment #50
xjmHere's the block on the block library page. Mostly unchanged other than that it of course shows up under the "Views" category now rather than "Comments".
Comment #51
YesCT CreditAttribution: YesCT commentedin #47
1.
It looks like before the patch, the body and the login/edit-delete links line was inside the area with the boarder.
after the patch, the body and the login/edit-delete links line is outside of that area with the boarder.
2.
and the difference between firefox and chrome is if the boardered area is taking up the full width, or if it is scaled in the case of a narrow comment.
Also in #48
3.
Before the patch it has a 'number of recent comments' select which defaults to 10.
after the patch it does not. (I did not check to see what the view defaults to, if it's 10, but just is not showing the select, or if there is no limit)
Comment #52
xjmThat's because this configuration is moved to the view. (The same is true of the title actually.)
Comment #53
xjmAlso, #47 is out of scope for this issue; it looks to be a bug in HEAD if I understand the screenshots. Let's open a followup for that and for #49.
Comment #54
xjmThis does actually raise a good point -- it's not obvious to end users how to configure this block (using Views). Maybe we need a link on the views' block form (or in the dropbutton in the block library?) to edit the View display. (This also could extend to menus, custom blocks, etc.--anything with a derivative based on an entity.) Another followup. :)
Comment #55
dawehner@xjm
This is indeed a nice idea! Opened a follow up for that: #1956134: Provide helpful editing links on "admin/structure/block" for deriver blocks (menu, views, block content, etc.)
Comment #56
webchickNote: Haven't read the issue yet, just tested before/after the patch.
Copy/pasting "after" screenshot from above:
So as much as I'm all about this movement of converting dumb one-off listings to views, the current patch represents a significant reduction in the UX around both placing and editing this block. :(
Most notably:
If we were before feature freeze, I might be inclined to let this in and do some kind of nice UX wrapper as a follow-up, but we're not before feature freeze, and we already have one critical task to make the block UI shippable, which is a sprawling morass of sub-issues, so I'm very disinclined to add more to it. So I really think these two problems need to be worked on before this is committable. Obviously, we can discuss it if people feel very strongly, but then I think my next move is assigning this to Dries to make the call. This is one of those things that spans the chasm between site builder and content creator, and it doesn't make sense to spend tons of time trying to make the content creator experience better in one place if we keep significantly chipping away at it in others.
Additionally, since this is the first such block we've converted, makes sense to get some before/after profiling data here.
Comment #57
xjmI have mixed feelings about this point. On the one hand, I can see the point of "I just want to change the number of items listed" and that there is a (IMO not too serious) UX regression from D7 here. On the other, one of the goals of converting core listings is to make the Views module's functionality discoverable. If we hide away the Views UI from people, we're losing some of that value, which I almost think is more important than just removing legacy code.
Edit: Integrating the Views UI with the Blocks UI was, back in October, a fairytale dream of mine for D8, and the original reason I reviewed the BAP patch. Now it's D9 material and then some, and there's no avoiding that.
On the other other hand, do people really care about the number of items that much?
Edit: The title/machine name thing I consider a bug, and I suggested filing it separately above in #49. I'm fine with addressing that before this goes in.
Comment #58
webchick"If we hide away the Views UI from people, we're losing some of that value, which I almost think is more important than just removing legacy code."
The problem with applying that logic to "# of things to show here" is that it's perfectly conceivable that a completely non-technical person wants to change that value for a particular block placement because they're putting together some landing page for mobile phones and that block that normally shows 10 things is going to take up the whole screen, so they want to restrict it to 3 things instead. That, in fact, is basically one of the only gains we got from SCOTCH at this point: the possibility to alter things like titles and "number of things to show here" on a per-instance basis.
Pushing Views UI at non-technical people with such a use case is not only a disaster waiting to happen, it's actually potentially a tremendous security risk, because with access to "administer views" permissions they can (accidentally or otherwise) pull up a list of content their role shouldn't necessarily be able to see.
So I really do think we need some kind of workaround for Views blocks that's maybe not the crazy "fairytale dream" we were originally hoping for, but still doesn't require giving administer views access to everyone with administer blocks access.
Comment #59
xjmFiled #1957276: Let users set the block instance title for Views blocks in the Block UI.
Comment #60
dawehnerReading the post in #58 let's me think of a system like ctools views integration has. You can configure in your view, what settings are available to be changed on the panels configuration. The following options have been available in D7:
What do you think about adding such a system to the block integration?
This would be then solved with this kind of override system.
#1956134: Provide helpful editing links on "admin/structure/block" for deriver blocks (menu, views, block content, etc.) would certainly also help us here, because we could not only place a link on the two different block listings,
but we could move this extra links to local actions as well, so you can already access them from the block configuration page.
Btw.: Isn't the actual reality of most sites, that you just have one person actually building the website, and maintaining it? Only big sites actually care about permissions for certain administration pages. Based on that and the statistics of the install-base of views you could maybe argue that most people actually have seen this page.
Comment #61
dawehnerSee #1957346: Add some settings on the block display to allow overrides on the block instance configuration for the follow up.
Comment #62
jibranI think #59 and #61 addressed the issues raised in #56and #58. We can fix these issues in followups. So RTBC form me. I don't think we have to postpone this on above issues.
Comment #63
xjmI would be +1 on that, or maybe a somewhat simplified subset of the options.
Comment #64
xjmSince it's during feature freeze, we need to fix these related issues before commit, not in followups. Usability is a gate, after all. This is okay. We will get it done, and Drupal will be better for it. :)
Comment #65
damiankloip CreditAttribution: damiankloip commentedWe should give this the 'default' tag, like other default views, I think.
Comment #66
dawehnerGood point!
Comment #66.0
dawehnerwith attempt at steps to reproduce
Comment #67
dawehner#66: drupal-1938062-66.patch queued for re-testing.
Comment #69
dawehnerRerolled.
Comment #70
xjmI filed a new, re-scoped issue to handle the title UX problem: #1967460: Display the block title and populate the machine name for views blocks.
Comment #70.0
xjmadded remaining tasks section which should clarify what is blocking this.
Comment #71
jibran#69: drupal-1938062-69.patch queued for re-testing.
Comment #73
damiankloip CreditAttribution: damiankloip commentedRerolled.
Comment #74
slashrsm CreditAttribution: slashrsm commentedReroll
Comment #75
slashrsm CreditAttribution: slashrsm commentedAdd files that I missed in previous patch.
Comment #76
slashrsm CreditAttribution: slashrsm commentedI did some profiling on this.
Tests were done on a fresh install (8.x vs. 8.x+#75). Recent comments block was the only view on the page. I displayed it in the sidebar while loading "Basic page" node. Before testing I generated 1000 nodes using devel_generate. Every node had at most 100 comments.
Request was much longer after I applied the patch. Query itself was much faster but it looks like time increase happened also due to entity loads that happen inside Views.
Memory footprint also increased significantly.
XHProf data is attached.
Results summary:
-----
In-depth results
Before
After
Comment #78
andypostThis have collision with twig in #1987396: Refactor & Clean-up comment.module theme functions
This is a API change and now needs approve
Comment #79
andypostAlso related #19734: add 'Pending Comments' block #1059608: Fix comment_get_recent ordering
Comment #80
andypostSeparate issue to remove comment_get_recent() - #2054993: Remove (untested, unused, broken) comment_get_recent()
Comment #81
dawehnerPeople can just use entity query instead, so I don't think this is a problem at all.
Comment #82
xjm@andypost, I have tentative approval for Dries on minor API changes for these conversions generally, but he of course will also need to look at them on a case-by-case basis.
#1957346: Add some settings on the block display to allow overrides on the block instance configuration has also landed, so let's incorporate that here.
Comment #83
dawehnerI am wondering whether it is a good investment of time for dries to look at these minor API changes, because seriously, if someone ports a module now, the person will, at least from my perspective, not expect that the api is frozen. It seems to be the case that we communicate that different, but maybe it is better to be honest.
Comment #84
xjm@dawehner, the core maintainers have stated that this is what they prefer. And yeah, I think it's actually not unreasonable to expect APIs to be frozen after... API freeze...
Comment #85
dawehnerI am sorry about my comment.
Comment #86
xjmLet's not touch
comment_get_recent()
here, and discuss it in #2054993: Remove (untested, unused, broken) comment_get_recent() instead. IMO this issue should only remove the block plugin since that's what the Views block deprecates.Comment #87
slashrsm CreditAttribution: slashrsm commentedRe-roll and added comment_get_recent() as suggested in #86.
Comment #88
tim.plunkettThis was removed in #1978914: Convert comment_permalink() to a Controller, why is it readded?
Also did you roll this patch with git copies turned on?
Comment #89
dawehnerYeah this needs to be fixed but then let's get it in, finally.
Comment #90
slashrsm CreditAttribution: slashrsm commentedComment #91
slashrsm CreditAttribution: slashrsm commentedHere we go.
@tim.plunkett: I don't think so. Should I use it?
Comment #92
tim.plunkettYou're missing the new view file there. This is #87 + the interdiff from #90, which was correct.
Turns out its not similar enough for copies to kick in.
Comment #93
dawehnerThank you very much. I did another simplytest check and it worked how I would expect a view block to work.
Comment #94
Dries CreditAttribution: Dries commentedGiven that webchick reported UX issues in #56 and that we're not addressing them in this patch, it would be good for her to sign off on the proposal to do this later.
Comment #95
tim.plunkettWe fixed that in #1957346: Add some settings on the block display to allow overrides on the block instance configuration.
Comment #96
Dries CreditAttribution: Dries commentedOh neat. I hadn't seen that yet. Based on that, this look pretty darn committable. ;-)
Comment #97
tim.plunkettManually tested after rerolling to be sure.
The conflict was just in a file we were outright deleting ($this->node->type vs $this->node->getType()).
Comment #98
webchickRambly review coming up! Summary below.
So first order of feedback is I couldn't find the block at all. This is because it is showing up categorized as "Views"; I would expect it to be under "Comments," or else "Content" if we want to rename "Node" to Content and make it a general bucket for all content-related thingies.
Second order of feedback is the "Machine name" field is expanded for some reason on the place block screen. I would expect this to be collapsed. This looks like it's not the fault of this patch though, as other blocks are doing the same thing. I also can't close the dialog because the X box keeps moving back up under the Toolbar which is "special." ;) Also weird that the button label is "Save" and not "Place." However, none of these are the fault of this patch, and might be revised in the new UI anyway.
Here's that same screen in D7 btw, for comparison:
- The block title isn't shown here. Therefore, how do I know if I want to display it or not? (the checkbox to do this is not pictured, because it annoyingly keeps scrolling below the toolbar where I can't reach it. This is not introduced by this patch, though.)
- We lost the ability to set a custom block title here. :( But yet we have this on all other blocks. A user is not going to understand why this block is special.
- Similarly, what does "Use default settings" mean in terms of number of things in a block? We should tell people what the value is. (e.g. "10 (default settings)")
- "Items per page" is a misnomer; it's "Items in block." Maybe "Items to show" or something more generic that could cover both cases?
- The labels "Show pages" / "Show content types" / etc. don't really make any sense. I think we mean "Show on pages" / "Show for content types / roles" etc. Once again, not the fault of this patch.
- Even though I checked "Show title," no title is in fact shown. This is because I had the block in the "header" region of the Bartik theme, which must do some magic to strip this out. I don't know that we can actually do anything about that, but figured I'd mention it because it caused me to think this was buggy until I tried "Sidebar first" instead.
----
So, to sum up:
- We need to put this block in a smarter category than "Views." Requiring people caring for the content of the site to understand what modules things come from is unrealistic.
- We need to expose the block title in order for the "Display title" checkbox to make any sense.
- We should also give the user the ability to override the title, for feature compatibility with D7.
- "Items per page" should be renamed to something that makes sense for blocks.
- Rather than saying "Default settings" (how do I know what the default settings are if I don't have access to Views UI?) it should say what the setting is and say (default) next to it.
- Follow-up issue for the bug about the machine name being auto-expanded.
- Follow-up issue to fix the &@^*#ing scrolling.
- We still have some more work to do on polishing the updated block UI. :) Waiting for updated specs on those though, which may address some of the other stuff identified here.
I realize most of this wasn't introduced by this patch, but was introduced in whatever the issue was that enabled overrides of views settings from this screen. I also realize that some of this was discussed before, but it's been a few months and I forget all the details. Since this is the first view to actually be converted to a block so feels like we ought to clean some of these views block-specific issues up here, too. I'm open to pushback on that, though.
Code-wise, this looks very yummy, and "7 files changed, 251 insertions, 768 deletions." is a wonderful diffstat. If we can just do a few final tweaks, I think this is good to go.
Comment #99
tim.plunkettFollowup #1: #2071019: Allow the block category for Views block displays to be edited
Comment #100
dawehnerHere is a follow up: #2072181: Change title in blocks form for items_per_page
Talking about feature compability, it would be really important to get #2051917: Test contextual links feature of page displays in, so we ensure this feature in views. I know that there are plans to remove it.
Yeah this comment was 100% offtopic :p
If you want to motivate people to work on things during the night, go the other way round, just saying. If people experiment with the new blocks provided by default, they will have ideas how to improve it.
Well, it is kind of unfair because the configured view existed before, so some additions aren't really counted. We should look more in terms of code, which is for sure even better.
Comment #101
tim.plunkett#2072181: Change title in blocks form for items_per_page is in.
Comment #102
andypostsort by created is not needed according #1059608-7: Fix comment_get_recent ordering
Comment #103
dawehnerJust to be sure: views adds both a node_access and comment_access tag, so there is a relationship to node in that view.
Thanks for providing the order criteria.
If it is a comment view, the comment_access tag is automatically added.
Waiting for the fifth RTBC ... I don't think that the block issues should block to let this patch going in,
simply because once we have views in core, people will be motivated to continue to work. Believe me or not but rerolling patches for the sake of rerolling
is just nice from a academical point of view.
Comment #104
andypostWhen block UI would be ready, just a small nitpick
please add comment_update_N() function to properly get rid of it
Comment #105
dawehnerWell, the non existing
Comment #106
YesCT CreditAttribution: YesCT commentedfixing this small thing.
https://drupal.org/node/1354#functions
"These use a different syntax, because the documentation summary (first line) is displayed to someone running update.php to tell them which updates need to run. ...
Note that the first line should start with an imperative verb, so it will make sense to people running update.php."
----
also, there was a newline added by accident that I took out.
Comment #107
YesCT CreditAttribution: YesCT commentedprofiling was done in #76
adding some screenshots of the most recent patch.
I'll update the issue summary with them, and try and itemize the concerns and what needs new issues.
Comment #107.0
YesCT CreditAttribution: YesCT commentedUpdated issue summary.
Comment #107.1
YesCT CreditAttribution: YesCT commentedadding tasks and issues, screenshots
Comment #107.2
YesCT CreditAttribution: YesCT commentedreorganizing related, follow-up, etc
Comment #108
tim.plunkettThis is a straight reroll. No changes yet.
Comment #110
dawehnerNo wonder the tests fail ... we remove the page display in this patch and sort by CID instead of created.
Comment #112
dawehnerAnd fixed.
Comment #114
dawehner#112: vdc-1938062-112.patch queued for re-testing.
Comment #114.0
dawehnersizing img
Comment #115
dawehnerRan into a related issue: #2135335: Adding a views block results in an empty block title on the admin screen
Nevertheless this patch works fine, see the screenshot.
Comment #116
tstoecklerSorry, but #102 in this issue is wrong. We definitely need to sort by created. Otherwise, if an admin changes the created of a comment to be in the past it will not actually result in the comment to show up lower in the block. This was pointed out by @alexpott in #1059608-37: Fix comment_get_recent ordering and other comments in that issue. With migration this is can also be an issue. Although it might be most common to import starting with the lowest ID (and thus, the oldest comment) that is by no means a requirement. It's perfectly valid to do it the other way around, in which case this block would show the comments in the wrong order.
Comment #117
dawehnerI totally agree. Have you seen the comment which changed that?
Let's be consistent with the way how comment_get_recent() work at the moment.
Thank you to provide such an easy to adapt test.
Comment #119
tstoecklerWell it was requested in #102 and then implemented in the following patch, I think.
Comment #120
pcambraAdapted DefaultViewRecentComments test to created descending order instead of changed.
Comment #121
webchickStill applies, and looks good here. Tagging for an alpha target. The only thing we'll want to do is not commit the update_N function in favour of migrate module, but I can easily just remove that hunk from the patch on commit.
Comment #122
dawehnerIt feels wrong to not add update functionality for things which cannot be done by migrate yet. If we don't add the update function here I fear that we really easy forget all those usecases. I did another review of #120 and everything was fine in there.
Comment #123
andypostI'd like to point to Alex #1059608-37: Fix comment_get_recent ordering comment about order and do we really wanna to remove the fallback implementation in #2054993: Remove (untested, unused, broken) comment_get_recent()
Comment #124
webchick@dawehner: Fair point, I guess it's not hurting anything.
@andypost: I believe this patch supports Alex's comment about comment ordering:
So if an editor was is inclined to change the created date after the fact, the comment would moves to the top of the list, which is exactly how the node front page works, so IMO it is fine (that seems to also support Alex's stance). If I'm wrong about that, hey, it's a view, it's super easy to change the sort. :)
#2054993: Remove (untested, unused, broken) comment_get_recent() presumably should just move to a call to whatever views_build_view() is these days. But I guess we can talk over there. It seems like a 2/10 in the importance scale though, so I think there are far more important, especially beta-blocking things we can focus on than that, personally.
Just gave this another run-through and does what it's supposed to do, including the comment-publish-date-editing use case, soooo!
Committed and pushed to 8.x. YEAH. :D
Comment #125
alexpottThis was committed in http://drupalcode.org/project/drupal.git/commit/f7e75db as part of #2020395: Convert "Who's new" block to a View. Unfortunately this resulted in fails in
Drupal\comment\Tests\Views\DefaultViewRecentComments
andDrupal\views\Tests\DefaultViewsTest
. Going to press retest now I've reverted the commit.Comment #126
alexpott120: vdc-1938062-120.patch queued for re-testing.
Comment #128
alexpottFailed... so needs work
Comment #129
dawehner120: vdc-1938062-120.patch queued for re-testing.
Comment #131
webchick&!^@^!@*^&*!^@ Damn it. :( Twice in two days. :( Sorry once again. :(
Comment #132
dawehnerReuploading the patch to see whether it still fails (both fails do work locally).
Comment #134
dawehner132: vdc-1938062.patch queued for re-testing.
Comment #136
webchickHm. 4 fails each time. These at least look like they could conceivably be related, rather than random.
Comment #137
dawehnerWell sure, I am just desperated because this just runs fine locally via the UI/run-tests.sh
Comment #138
webchickIs it a PHP 5.3 vs. PHP 5.4 thing maybe?
Comment #139
olli CreditAttribution: olli commentedThis fixes run-tests.sh for me.
Comment #140
olli CreditAttribution: olli commented#2151427: Convert COMMENT_NOT_PUBLISHED & COMMENT_PUBLISHED to a constant on the comment interface
Comment #141
olli CreditAttribution: olli commentedComment #142
dawehnerOh nice, this remember myself alot when we worked on using the current user service.
Comment #143
webchickYeehaw!! Thanks, olli! :D
Committed and pushed to 8.x. Thanks!
Comment #144
andypostAs I mentioned in #104 the function was not fixed, so deprecated code is commited
Comment #145
dawehnerThis looks good
Comment #146
alexpottCommitted a274193 and pushed to 8.x. Thanks!
Thanks for the quick turnaround - we don't need new calls to
variable_del()
at this stage :)