Comments

chx created an issue. See original summary.

chx’s picture

StatusFileSize
new1.47 KB
dawehner’s picture

  1. +++ b/src/FlaggingViewsData.php
    @@ -24,6 +24,33 @@ public function getViewsData() {
    +      'argument' => ['id' => 'standard'],
    

    One could leverage a numeric argument handler, but nevermind

  2. +++ b/src/FlaggingViewsData.php
    @@ -24,6 +24,33 @@ public function getViewsData() {
    +      'field' => ['id' => 'field'],
    

    This one is for entity fields, I doubt this is one here

chx’s picture

StatusFileSize
new704 bytes
new1.32 KB
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Works for me

chx’s picture

I tentatively say this might not need testing -- we would be testing Views, pretty much. But if the maintainers want, I can look into creating a test or two.

socketwench’s picture

Status: Reviewed & tested by the community » Needs work

If you could modify flag_follower's views to leverage counts, and use that for tests it'd be great.

socketwench’s picture

Status: Needs work » Needs review
StatusFileSize
new7.66 KB
new6.08 KB

Augmented the follower view, modified test to include count cases.

socketwench’s picture

I was thinking about this last night, and it occurred to me that we only are showing the flag count, not the other kinds of counts provided by the FlagCountManager. These aren't database fields, so maybe that's out of scope for a view.

chx’s picture

Issue tags: -Needs tests

Perhaps in another issue we could a) use hook_entity_extra_field_info to expose them to entity API b) provide Views field handlers for them.

socketwench’s picture

I was thinking view field handlers.

frankcarey’s picture

Status: Needs review » Reviewed & tested by the community

Working well for me. Counts work on items that haven't been flagged as well (shows zero).

joachim’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/flag_follower/src/Tests/FlagFollowerUITest.php
@@ -144,12 +144,12 @@ class FlagFollowerUITest extends WebTestBase {
-   * User A follows user B. B follows A and C. C follows no one.
+   * User A follows user C. B follows A and C. C follows no one.
    */
   public function doUserFlagging() {
-    // User A follows user B.
+    // User A follows user C.
     $this->drupalLogin($this->userA);
-    $this->drupalGet('user/' . $this->userB->id());
+    $this->drupalGet('user/' . $this->userC->id());

Are these all whitespace fixes or whitespace damage?

amit.drupal’s picture

comment #8 Working well for me.

socketwench’s picture

Status: Needs work » Needs review

Are these all whitespace fixes or whitespace damage?

There are actual changes in the comments, 'B' instead of 'C'.

  • socketwench committed 7079d8f on 8.x-4.x
    Issue #2729095 by chx, socketwench: Expose flag count to views.
    
socketwench’s picture

Status: Needs review » Fixed

Committing, as it's been reviewed as per #14. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

amit.drupal’s picture