Skip to content

Feature 115 header cards & exposed vb_codes#127

Merged
DarianGill merged 18 commits into
developfrom
feature-115-header-cards
Dec 17, 2025
Merged

Feature 115 header cards & exposed vb_codes#127
DarianGill merged 18 commits into
developfrom
feature-115-header-cards

Conversation

@DarianGill

@DarianGill DarianGill commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

What:
Closes #115 by adding header cards to the top of every detail view that contain bold green vb codes and relevant information for that entity. And closes #119 by adding small green vb codes below the primary columns for each table.

Why:
So that the vb codes are exposed as UIDs throughout the app in a reliable/consistent fashion and people can more easily find them for use with vegbankr.

How:

  • Added new header cards to the party, project, plot, and reference detail views
  • Updated the plant and comm concept header cards to contain the vb codes and removed them from below
  • Added other info like dates, other identifiers, and project where relevant in headers
  • Updated all the table columns to contain small green vb_codes in their primary columns
  • Renamed those primary columns to correspond to the entity type (eg: Observation instead of Code and Project instead of Name)

Testing & Documentation:
Updated all the tests to enforce the new behavior and added two tests to server.R to check state initialization. Devtools::check() passes with only warnings and notes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the VegBank web interface by exposing VB codes (unique identifiers) throughout the application. The changes add header cards to detail views containing bold green VB codes and other relevant information, and display small green VB codes below primary columns in tables.

Key changes:

  • Added new header cards to party, project, plot, and reference detail views with VB codes prominently displayed
  • Updated table columns across all entity types (projects, plots, parties, concepts) to display VB codes in green text below primary identifiers
  • Renamed primary table columns to better reflect entity types (e.g., "Name" → "Project", "Author Plot Code" → "Observation Code")

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/testthat/test_project_table.R Updates tests for renamed "Project" column with HTML-formatted VB codes
tests/testthat/test_plot_table.R Updates tests for renamed "Observation Code" column with HTML-formatted VB codes
tests/testthat/test_plant_table.R Updates tests for renamed "Plant Concept" column with HTML-formatted VB codes
tests/testthat/test_party_table.R Updates tests for restructured party data using party_label and HTML-formatted VB codes
tests/testthat/test_detail_reference.R Updates tests to use new "reference_header" output name
tests/testthat/test_detail_project.R Updates tests to use new "project_header" output name
tests/testthat/test_detail_plot.R Updates tests to use new "plot_header" output name
tests/testthat/test_detail_party.R Updates tests to use new "party_header" output name
tests/testthat/test_detail_helpers.R Updates test expectations for coalesce function to treat empty strings as falsy
tests/testthat/test_detail_concept.R Updates tests to use new concept header output names
tests/testthat/test_concept_table.R Updates tests for renamed concept columns with HTML-formatted VB codes
tests/testthat/test_community_table.R Updates tests for renamed "Community Concept" column with HTML-formatted VB codes
tests/testthat/helper-detail-mocks.R Changes elevation from string to numeric in mock data
R/ui.R Updates UI output IDs to use generic "header" naming for all detail views
R/table_project.R Adds format_project_name_column function to display project names with VB codes
R/table_plot.R Removes author_plot_code field and adds format_code_column function for displaying observation codes
R/table_party.R Switches from given_name/surname to party_label and adds format_party_name_column function
R/table_concept.R Adds format_concept_name_column function for displaying concept names with VB codes
R/detail_view.R Updates all output assignments to use new header naming convention
R/detail_reference.R Implements reference header card with VB code, type, and publication date
R/detail_project.R Implements project header card with VB code and date range
R/detail_plot.R Implements plot header card with VB code, project link, and date range
R/detail_party.R Implements party header card with VB code and full name construction
R/detail_helpers.R Modifies coalesce operator to treat empty strings as falsy and updates format_date_range to handle equal dates
R/detail_concept.R Updates concept header to display VB codes prominently and removes redundant code row from details table
R/detail_comm_class.R Updates VB code styling to use green color consistently

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

Comment thread R/table_plot.R Outdated
Comment thread R/detail_reference.R
Comment thread R/detail_project.R Outdated
Comment thread R/detail_plot.R Outdated
Comment thread R/detail_project.R
@DarianGill DarianGill requested a review from regetz December 17, 2025 02:39
@DarianGill DarianGill marked this pull request as ready for review December 17, 2025 02:40

@regetz regetz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @DarianGill for making these changes. I really like it for consistency of headers and making the vb codes available.

I installed from your branch onto the dev VM if you want to see it live.

@DarianGill DarianGill merged commit 51b086c into develop Dec 17, 2025
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.

Expose vb codes as UIDs throughout the app Add a header to all detail views that situates the user

3 participants