Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DarianGill
Copy link
Collaborator

@DarianGill DarianGill commented Nov 27, 2025

What:
Closes #55 by implementing dataTablesAjax server-side search and paging functionality and adding a obs_count column to the party table.

Why:
To further minimize the data stored in the shiny server session and align with the approach taken for concept tables.

How:

  • Removed the cached party rds file and server.R logic that read it
  • Created a spec constant and helper functions to generate the party table configuration
  • Added helper functions in table_party.R to coerce party pages returned by vegbankr into dataframes (For parity with concepts where this is necessary because of nested lists of dataframes) and normalize party data
  • Replaced project placeholder in party detail view with a broader Contributions card that contains the number of observations contributed

Docs and Testing:

  • Updated party table tests to enforce new configuration and test processing function normalizes rows
  • All tests pass and devtools::check() runs with only a warning about using unexported get_all_resources from vegbankr

Copy link
Contributor

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 PR implements server-side search and paging for the party table using the dataTablesAjax approach, adds an obs_count column, and removes the cached party data file along with its associated loading logic. This aligns the party table implementation with the approach already used for concept tables.

  • Removes server-side caching and replaces it with on-demand AJAX fetching
  • Adds observation count column to party table display
  • Introduces helper functions for data normalization and schema enforcement

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/testthat/test_party_table.R Updates tests to verify remote table configuration and new processing functions
inst/cached_data/py_20251014.rds Removes cached party data file
R/table_party.R Implements remote table configuration with AJAX, adds obs_count column, and creates normalization helpers
R/server.R Removes cached party data loading and updates build_party_table call

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

Copy link
Contributor

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.


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

@DarianGill DarianGill requested a review from regetz December 1, 2025 19:51
@DarianGill DarianGill marked this pull request as ready for review December 1, 2025 21:24
Copy link
Collaborator

@regetz regetz left a comment

Choose a reason for hiding this comment

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

Nice! Super excited to see more tables fully working against the API, without requiring cached local data.

@DarianGill DarianGill merged commit 2f92371 into develop Dec 2, 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.

Add obs_count and dataTableAJAX processing to Party Table & detail

3 participants