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.
Aggregator blocks can use contextual to get back to the settings page for their feed.
See #53 for screenshots of the effects of this patch.
Beta phase evaluation
Issue category | Feature because this adds an extra contextual link to the aggregator block |
---|---|
Issue priority | Normal |
Prioritized changes | The main goal of this issue is usability, it adds a fast way to go from an aggregator block to the feed's settings |
Disruption | There is no disruption, this is just an UI change |
Comment | File | Size | Author |
---|---|---|---|
#64 | add_contextual_for-1020574-64.patch | 4.88 KB | AjitS |
#63 | add_contextual_for-1020574-63.patch | 4.5 KB | AjitS |
#53 | 1020574-feed-block.png | 77.98 KB | geertvd |
#53 | 1020574-feed-page.png | 197.81 KB | geertvd |
#51 | add_contextual_for-1020574-51.patch | 4.89 KB | geertvd |
Comments
Comment #1
vbouchetPlease find a patch creating the aggregator.links.contextual.yml and implementing the hook_block_view_BASE_BLOCK_ID_alter() in aggregator.module.
Comment #5
vbouchetI don't know why SimpleTest failed here. It's working properly on my local and I can't see any test which should be updated to the new feature.
Comment #6
vbouchetComment #9
vbouchetUpdate the patch to use the appropriate class.
Comment #10
AjitSShouldn't this be in 'needs review'?
Comment #11
vbouchetYou are right...
Comment #12
Nick_vhShould document the arguments here.
Any reason why you want to do empty and isset? I'd do only empty if you really want a value or isset if you just want to know if the key was set. I'd do only isset here as you only pass it to the route_parameters and you don't care of the content.
Comment #13
vbouchetPlease find an updated patch and interdiff. I kept only the isset() but didn't documented arguments of the function as it's a hook.
Comment #15
geertvd CreditAttribution: geertvd at XIO commentedLooks good, we still need tests for this though.
Comment #16
geertvd CreditAttribution: geertvd at XIO commentedAdded test
Comment #17
ParisLiakos CreditAttribution: ParisLiakos commentedwhy not add it to the static $modules property?
can we also have a test only patch that fails?
Comment #18
geertvd CreditAttribution: geertvd at XIO commentedI didn't think it was relevant for the other test, should I just added to the modules property?
Will add the test only patch tonight.
Comment #19
ParisLiakos CreditAttribution: ParisLiakos commentedbtw this also needs a beta evaluation, this might be 8.1.x material
Comment #20
geertvd CreditAttribution: geertvd at XIO commentedRemoved the module install from the test and added it to the $modules property.
I also added the beta evaluation to the issue summary.
Comment #22
ParisLiakos CreditAttribution: ParisLiakos commentedyes, we can file this under prioritized changes due to the usabilty impact
Comment #23
pjbaertI tested this. The link is available after I clicked the contextual link. See screenshot.
We shouldn't use format_string() here, it pollutes the safe string list. See #2549805: Remove all usage of FormattableMarkup in tests apart from explicit tests of that API
Comment #24
geertvd CreditAttribution: geertvd at XIO commentedGood point
Comment #25
pjbaertThanks!
This looks fine to me now.
Comment #28
geertvd CreditAttribution: geertvd at XIO commentedSetting back to RTBC as per #25
Comment #29
geertvd CreditAttribution: geertvd at XIO commentedComment #30
Wim LeersSorry guys, this is not quite ready yet!
FeedViewBuilder
should be updated too, similarly toNodeViewBuilder::alterBuild()
,TermViewBuilder::alterBuild()
etc.s/Configure/Edit/
AFAIK we use "Configure" for config entities only.
This doesn't do the same additional check that
menu_ui_block_view_system_menu_block_alter()
does. Why not?So we load all feeds just to check if it's an actual feed? Is this really necessary? This is very bad for performance. Let's at least only load the one we actually need.
Also, this means that the edge case of the feed not existing is not tested.
array()
->[]
Comment #31
AjitSWorking on it now.
Comment #32
AjitSalterBuild()
to theFeedViewBuilder
class.hook_block_view_BASE_BLOCK_ID_alter
. IMOshould be removed from
menu_ui_block_view_system_menu_block_alter
(in a separate issue). Checking for BLOCK ID in a hook which has it in the function name does not make sense to me.Comment #34
geertvd CreditAttribution: geertvd at XIO commentedCan't we just change this to
Since the feed id should always be an existing feed anyway. A block will only be build if it is a valid feed id anyway.
We stil need to change this to 'Edit feed' also.
For the test fails, i cant't check right now but i think you still have to add this to AggregatorFeedBlock.php
Comment #35
geertvd CreditAttribution: geertvd at XIO commentedI think this should be green.
Comment #36
geertvd CreditAttribution: geertvd at XIO commentedComment #38
geertvd CreditAttribution: geertvd at XIO commentedThat last patch was not complete.
Comment #39
geertvd CreditAttribution: geertvd at XIO commentedGetting late, ignore that last interdiff also :)
Comment #41
geertvd CreditAttribution: geertvd at XIO commentedComment #43
geertvd CreditAttribution: geertvd at XIO commentedComment #45
geertvd CreditAttribution: geertvd at XIO commentedComment #46
Wim LeersAlmost there now! :)
I see this now has an
entity
prefix.Node
also does this, so yay for consistency!This should be
aggregator_feed
, because aggregator provides two entity types: Feed & Item. In theory, we may add contextual links to Item entities in the future, so we should be sufficiently specific here.(Yes, this "group" concept for contextual links is totally WTF. But that's out of scope here.)
So much better!
Still
array()
.Also
array()
.Ugh, this is called
getLastModified()
instead ofgetChangedTime()
becauseFeedInterface
does not extendEntityChangedInterface
. Could you file an issue for that and add a@todo
?Comment #47
geertvd CreditAttribution: geertvd at XIO commentedComment #49
geertvd CreditAttribution: geertvd at XIO commentedreroll
Comment #50
Wim Leers@ParisLiakos remarked in #2554079-3: FeedInterface should extend EntityChangedInterface that
Feed::getLastModifiedTime()
is about the external feed's last modification timestamp.The patch in #46 that has
tricked me into thinking it was the feed entity's own last modification time!
Therefor this…
… and this should simply be deleted.
Sorry for having missed that!
Comment #51
geertvd CreditAttribution: geertvd at XIO commentedYup, that makes sense.
Comment #52
Wim LeersWhat'd be helpful for a committer is if this also had a screenshot showing the contextual link on both a feed block and a feed page.
Once we have that, this is RTBC :)
Comment #53
geertvd CreditAttribution: geertvd at XIO commentedHere you go.
Feed block:
Feed page:
Comment #54
geertvd CreditAttribution: geertvd at XIO commentedAnd thanks for reviewing, that was quite helpful.
Comment #55
Wim Leers#54: You're welcome :) Thanks for helping make D8 better!
Note that this may end up being postponed to 8.1 because it's a feature request. The only reason I've not moved it to 8.1 is because it's so tiny.
Comment #58
geertvd CreditAttribution: geertvd at XIO commented#56 was probably a random fail so setting this back to RTBC
Comment #61
geertvd CreditAttribution: geertvd at XIO commentedrandom fail, back to RTBC
Comment #63
AjitSRerolling.
Comment #64
AjitSMissed out a file from the patch above. Added it back.
Comment #66
AjitSWas a plain reroll. Setting back to RTBC.
Comment #68
alexpottThanks for working on this everyone. Unfortunately this is not eligible for the Drupal 8.0 release as it adds risks of breaking something. This is a feature and is not required to be part of Drupal 8 for release - we should target this for release in a minor version.
Comment #69
Wim Leers#68++
I already said something similar in #55:
Good to have this ready though :)
Comment #82
quietone CreditAttribution: quietone at PreviousNext commentedThe
aggregator
module has been removed from Core in10.0.x-dev
and now lives on as a contrib module. Issues in the Core queue about theaggregator
module, like this one, have been moved to the contrib module queue.Comment #83
larowlanComment #84
larowlanComment #85
larowlan