Skip to content

Conversation

@sbagg
Copy link
Contributor

@sbagg sbagg commented Nov 2, 2025

Issue #187

  • Created a edit.js for research-highlights block as well as its own php file that holds lookup in panel that takes aggie-expert id with generic box for holding place
  • Created a twig file that references the lit-element for block
  • Created a lit-element for block to use in twig file
  • Created script to add in main-wp-website
  • Only shows element results if in viewport with observer
  • handles loading and error states

@sbagg sbagg requested a review from spelkey-ucd November 2, 2025 22:53
@spelkey-ucd spelkey-ucd changed the base branch from stage to sandbox November 3, 2025 14:32
@spelkey-ucd spelkey-ucd requested a review from Copilot November 3, 2025 14:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a "Research Highlights" feature to the directory plugin, allowing profiles to display research publications pulled from the Aggie Experts system. The PR includes both frontend and backend components.

  • Adds a new custom element ucdlib-directory-research-highlights with lazy loading support
  • Creates a REST API endpoint to fetch research highlights from an external Aggie Experts API
  • Adds editor controls to configure the research highlights block
  • Updates package dependencies (@ucd-lib/theme-elements from ^3.0.5 to ^3.3.0)
  • Removes unused optional peer dependencies related to file watching

Reviewed Changes

Copilot reviewed 15 out of 21 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
ucdlib-special/src/public/package-lock.json Removes unused optional peer dependencies (chokidar, fsevents, etc.)
ucdlib-migration/src/editor/package-lock.json Updates @ucd-lib/theme-elements dependency to 3.3.0
ucdlib-locations/src/editor/package-lock.json Updates @ucd-lib/theme-elements dependency to 3.3.0
ucdlib-directory/views/blocks/person-research-highlights.twig Adds template for rendering research highlights on profile pages
ucdlib-directory/src/public/src/elements/ucdlib-directory-research-highlights.tpl.js Template file defining styles and markup for research highlights component
ucdlib-directory/src/public/src/elements/ucdlib-directory-research-highlights.js Custom element implementation with lazy loading and API integration
ucdlib-directory/src/public/index.js Registers the new research highlights custom element
ucdlib-directory/src/editor/package-lock.json Updates @ucd-lib/theme-elements dependency to 3.3.0
ucdlib-directory/src/editor/lib/plugins/profile.js Adds toggle control for hiding research highlights in profile settings
ucdlib-directory/src/editor/lib/blocks/ucdlib-directory-research-highlights/index.js Block registration and configuration
ucdlib-directory/src/editor/lib/blocks/ucdlib-directory-research-highlights/edit.js Editor UI for configuring research highlights block
ucdlib-directory/src/editor/lib/blocks/index.js Registers research highlights block in block collection
ucdlib-directory/includes/research-highlights.php PHP class for managing research highlights taxonomy and metadata
ucdlib-directory/includes/people.php Adds research highlights support to person post type
ucdlib-directory/includes/main.php Integrates research highlights into main plugin initialization
ucdlib-directory/includes/blocks.php Registers research highlights block with Twig template
ucdlib-directory/includes/block-transformations.php Contains commented-out transformation code for research highlights
ucdlib-directory/includes/api-people.php Implements REST API endpoint for fetching research highlights from Aggie Experts
ucdlib-assets/src/public/package-lock.json Removes unused dependencies and updates @ucd-lib/theme-elements to 3.3.0
ucdlib-assets/src/public/index.js Adds research highlights element to dynamic script loader
ucdlib-assets/src/editor/package-lock.json Updates @ucd-lib/theme-elements dependency to 3.3.0
Files not reviewed (6)
  • ucdlib-assets/src/editor/package-lock.json: Language not supported
  • ucdlib-assets/src/public/package-lock.json: Language not supported
  • ucdlib-directory/src/editor/package-lock.json: Language not supported
  • ucdlib-locations/src/editor/package-lock.json: Language not supported
  • ucdlib-migration/src/editor/package-lock.json: Language not supported
  • ucdlib-special/src/public/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@spelkey-ucd spelkey-ucd left a comment

Choose a reason for hiding this comment

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

You don't really need to do much server-side processing for this (just save the expert id and hide block option) - it's an unnecessary extra step. Fetch experts.ucdavis from the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants