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

SHS-5979 and SHS-5982: Add dashboard views and custom view code #1730

Open
wants to merge 5 commits into
base: SHS-5913_Dashboard-initiative
Choose a base branch
from

Conversation

codechefmarc
Copy link
Collaborator

@codechefmarc codechefmarc commented Jan 28, 2025

Summary

  • Adds a new module hs_dashboard that contains custom view code and other changes for H&S dashboards.
  • Adds a view for dashboards to show the current users latest edits.
  • Adds a view for dashboards to find duplicated person nodes and allow to view, edit, and unpublish.
  • Note: The Tugboat changes are temporary only, these should be removed before merging. They are there to add the Chemistry site to Tugboat to test the source field in the view.

Need Review By (Date)

2025-02-05

Urgency

low

Steps to Test My Latest Edits

  1. Login to the site as a Developer
  2. Create a new Dashboard or "Edit layout" of an existing dashboard
  3. Click "Add Block"
  4. Under Lists (Views), verify there is a new block to place called "My Latest Edits"

Screenshot 2025-01-23 at 6 10 59 PM

  1. Click on "My Latest Edits", then clock "Add block"
  2. Click "Save dashboard layout"
  3. Visit the Dashboard - click "Dashboard" or go to /admin/dashboard
  4. There may or may not be items in the list, depending on if the role you are currently logged in as has made edits
  5. To verify the view works, edit some content and then return to the dashboard
  6. Verify that there are changes when you refresh the dashboard after making some edits

Screenshot 2025-01-23 at 6 13 09 PM

  1. Verify that, under the operations dropdown, there is a new link to access the revisions of the content
  2. Click on that link and verify that it takes you to the revisions for that content

Screenshot 2025-01-23 at 6 14 00 PM

Steps to Test Duplicate People

  1. Login to the site as a Developer
  2. Add a new dashboard or edit an existing dashboard by going to /admin/structure/dashboard
  3. Edit the layout of the dashboard
  4. Add a block, and search for "Duplicate"

Screenshot 2025-01-24 at 5 12 38 PM

  1. Add the "Duplicate People" view to the layout
  2. Save the dashboard layout
  3. Visit the dashboard at /admin/dashboard
  4. Depending on the site, there may or may not be any people listed
  5. To see a duplicate person appear, go to Content, filter the Content type by Person, copy a name there and create a new Person node with the same name
  6. Return to the dashboard and refresh and there should be the duplicate person listed

Screenshot 2025-01-24 at 5 15 08 PM

  1. Test the ability to edit and unpublish the person
  2. To test the Source column, there are imported and local duplicate people on the Chemistry site here: https://chemistry-k2zdlngrpctgye2b88oecw0aty54dle1.tugboatqa.com
  3. To login, use the Tugboat terminal and follow the instructions here: https://app.clickup.com/t/36718269/SHS-5979?comment=90130095989284&threadedComment=90130095989943

Review Tasks

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Are PHP functions and variables in snake_case and not camelCase?
  • Does Drupal code follow Drupal Coding Standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided?

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 18:36 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 18:53 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 19:04 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 19:25 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 28, 2025 19:51 Destroyed
@codechefmarc codechefmarc marked this pull request as ready for review January 29, 2025 00:11
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.

2 participants