Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YALB-1303: Finding content tagged with a specific tag #421

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

codechefmarc
Copy link
Contributor

@codechefmarc codechefmarc commented Sep 12, 2023

YALB-1303: Finding content tagged with a specific tag

Description of work

  • Filter "Content" view and "Manage Pages" by tags
  • Filter "Manage Posts" by tags and/or post categories
  • Filter "Manage Events" by tags and/or event categories
  • Filter "Manage Profiles" by tags and/or affiliation

Functional testing steps:

  • Login and visit the "Content" page (/admin/content)
  • Verify that there is now an exposed filter for "Tags", the "Tags" field is now in the table, and that filtering on this field works as expected.
  • Visit Content -> Manage Pages (/admin/content/manage-pages)
  • Verify that there is now an exposed filter for "Tags", the "Tags" field is now in the table, and that filtering on this field works as expected.
  • Visit Content -> Manage Posts (/admin/content/manage-posts)
  • Verify there are 2 exposed filters for "Tags" and "Categories" and that filtering works as expected for these filters (Categories may need to be added to some posts to test this)
  • Visit Content -> Manage Events (/admin/content/manage-events)
  • Verify there are 2 exposed filters for "Tags" and "Categories" and that filtering works as expected for these filters (Categories may need to be added to some events to test this)

Screenshot 2023-09-12 at 5 30 04 PM

  • Visit Content -> Manage Profiles (/admin/content/manage-profiles)
  • Verify there are 2 exposed filters for "Tags" and "Affiliation" and that filtering works as expected for these filters (Profiles may need to be added to test)

@github-actions
Copy link

Visit Site

Created multidev environment pr-421 for yalesites-platform.

@jvaughn-johnson
Copy link
Contributor

I went through all functioning testing steps and everything works as expected for me. Thank you.

For the exposed filters on "Tags" and "Categories", is it possible to have the exposed filter to be typed into (i.e. typing "admin" into the search bar) and also be a dropdown? I'm not sure if that's worth it, but I'm thinking of the potential extreme case where someone might know what's available to them.

@codechefmarc
Copy link
Contributor Author

@jvaughn-johnson - I've added Chosen to the exposed filters. Note the threshold for it to be enabled is 15 items or more, so if the list has less than 15, it's a simple dropdown select. After 15, you'll get both an autocomplete with dropdown. Let me know if this works for you.

@dblanken-yale
Copy link
Contributor

dblanken-yale commented Sep 13, 2023

@codechefmarc Unrelated to this PR, just wanted to throw it out there since you're in "Chosen" mode and I noticed it while testing this. 😁

I noticed that in the create profile contact info, the tags field is not using chosen, but instead is using the drupal select. Didn't know if you wanted to incorporate the fix in this or wait for a new ticket, but my worry is we'd run into a backward compatibility problem if we don't address it soon.

Screenshot 2023-09-13 at 2 13 09 PM

Copy link
Contributor

@dblanken-yale dblanken-yale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally works great! I love seeing this as part of the views. Great work!

@codechefmarc
Copy link
Contributor Author

@dblanken-yale - good call, that is easy to add to profiles so I'll do that and let you know when finished.

@dblanken-yale
Copy link
Contributor

@codechefmarc Awesome; will be easy to test with this PR I think as I've already created the profile. We can see what it will do and then test a new one. Just ping me and I'll test. :D

@codechefmarc
Copy link
Contributor Author

@dblanken-yale - OK, you're good to go - Profiles tagging is Chosen enabled!

@dblanken-yale
Copy link
Contributor

@codechefmarc Just verifying; did you happen to add "generic" as a tag to Davy Jones? I ask because while admin is showing, which is what I had entered, I didn't remember entering "generic" as a term, and of course that's taxonomy id 1, which makes me suspicious. If you did, that makes me feel better.

@dblanken-yale
Copy link
Contributor

The other profile works great, and doesn't have generic so I bet I either added it and forgot or someone else did. I think that looks good now! Good fix!

@codechefmarc
Copy link
Contributor Author

😆 Yes, that was me adding it to test. So, not an error! We should ban any taxonomy term with id 1. Hehe.

@jvaughn-johnson - would you like to take another look before I merge? Thanks!

@codechefmarc codechefmarc merged commit 6580203 into develop Sep 19, 2023
3 checks passed
@codechefmarc codechefmarc deleted the YALB-1303--management-filters branch September 19, 2023 17:17
@jvaughn-johnson
Copy link
Contributor

Hi @codechefmarc. Somehow I missed your comment from 5 days ago. The update looks good to me and I think the logic behind when Chosen decides to show both the dropdown and autocomplete makes sense. I think people will appreciate this new feature overall. Thank you.

@nJim nJim mentioned this pull request Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants