Conversation
…ilot instructions
…flowcharts, improved examples and tests
… and improved helpers for managing units
- Updated .Rbuildignore to exclude docs directory. - Added CI workflow for R-CMD-check in GitHub Actions. - Modified DESCRIPTION file to reorder and add package dependencies. - Improved parameter documentation in boxGrobs_align.R and boxGrobs_connect.R. - Refactored validation logic in boxGrobs_align_pr_helpers.R for better error handling. - Updated examples and documentation to reflect parameter name changes from .sub_position to sub_position. - Added new tests for performance and deprecated functions. - Enhanced vignettes with updated examples and corrected parameter usage.
… clarity in documentation and code
…tests for validation - fix issue #69
… S3 method registration - add equalizeWidths() for grouped/nested flowchart boxes - add boxGrob txt_padding argument and global option boxGrobTxtPadding add vignette example showing grouped width alignment and global text padding - add tests for equalizeWidths and box padding option update NEWS for 3.3.0 - register prCalculateConnector S3 methods to silence roxygen warnings and regenerate docs
…th corner options; update documentation and remove obsolete SVG test files
…list references; add tests for validation Fixes issue #69
There was a problem hiding this comment.
Pull request overview
This PR enhances the Gmisc R package’s flowchart/box-layout tooling and documentation, while also expanding the test suite (including visual regression coverage) and updating release metadata.
Changes:
- Added/expanded flowchart helpers (notably deep-path subelement support and width/box sizing behavior) and associated internal utilities.
- Expanded automated tests, including new unit tests for helpers and optional
vdiffrvisual regression tests. - Updated vignettes and release metadata/notes with various corrections.
Reviewed changes
Copilot reviewed 145 out of 146 changed files in this pull request and generated 45 comments.
Show a summary per file
| File | Description |
|---|---|
| R/boxGrobs_move.R | Updates moveBox() for nested/deep-path targets (but currently contains a duplicate/stub definition that must be fixed). |
| R/boxGrobs_distance.R | Updates distance calculations (but currently assigns converter_fn via ifelse(), which breaks at runtime). |
| R/boxGrobs_boxPropGrob.R | Adjusts label sizing/measurement logic (but currently mixes width/height conversion for label height). |
| R/boxGrobs_spread_npc_norm_helpers.R | Adds axis default/normalization helpers (has a duplicated roxygen title line affecting generated Rd). |
| CRAN-SUBMISSION | Updates release submission metadata (version currently mismatches DESCRIPTION). |
| NEWS.md | Updates release notes (has a stray trailing fragment line to remove). |
| vignettes/transitionPlot.Rmd | Minor vignette text correction. |
| vignettes/Transition-class.Rmd | Minor vignette text updates (has a stray trailing backtick to remove). |
| vignettes/Descriptives.Rmd | Minor vignette text updates (includes a remaining grammar issue on an edited line). |
| tests/visual_tests/flow-chart.R | Adds a manual visual test script for flowcharts. |
| tests/testthat/test-yaml_hmisc_helpers.R | Adds tests for YAML dump and Hmisc label/unit helpers. |
| tests/testthat/test-vdiffr.R | Adds optional vdiffr visual regression test for boxGrob. |
| tests/testthat/test-vdiffr-connect.R | Adds optional vdiffr visual regression test for connectors. |
| tests/testthat/test-transitionPlot.R | Adds basic functionality/error-path tests for transitionPlot(). |
| tests/testthat/test-spread-move-deep-path.R | Adds tests for deep-path spread*/moveBox() behaviors and nested list preservation. |
| tests/testthat/test-spread-horiz-endpoint.R | Adds regression coverage for numeric endpoints + subelement selection. |
| tests/testthat/test-setConnectorLabels.R | Updates tests to new argument names for spreadHorizontal(). |
| tests/testthat/test-labelConnector.R | Updates tests to new argument names for spreadHorizontal(). |
| tests/testthat/test-prLineMidpoint.R | Adds tests for midpoint helper return types/values. |
| tests/testthat/test-prIsNestedListHelpers.R | Adds tests for nested list detection helpers. |
| tests/testthat/test-print-Gmisc_list_of_boxes.R | Adds coverage for printing nested plain lists of boxes. |
| tests/testthat/test-prGetNpcValue.R | Adds tests for npc conversion helper behavior. |
| tests/testthat/test-prGetNpcSize.R | Adds tests for npc size conversion helper behavior. |
| tests/testthat/test-prFindSubelementTarget.R | Adds tests for subelement target resolution. |
| tests/testthat/test-prAddEmptyVals.R | Adds tests for helper ordering/NA handling behavior. |
| tests/testthat/test-docx_document.R | Updates/extends fixture-based testing (currently contains a JS typo in the fixture that should be corrected). |
Comments suppressed due to low confidence (6)
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
NEWS.md:554
- NEWS.md has a stray trailing line `plot2`` which looks like an accidental fragment and should be removed to keep release notes clean.
- Fixed a few bugs to the `forestplot2`
plot2`
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ropGrob; improve distance function logic; clean up moveBox function; refine documentation and examples in vignettes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements and maintenance updates to the Gmisc R package, focusing on improved flowchart and box layout features, expanded documentation and testing, and better project infrastructure. The most notable changes include the addition of new API functions for box width equalization and header boxes, deep-path support for alignment and movement helpers, new and updated documentation (including project-specific AI agent instructions), and improvements to CI/CD and code linting configuration.
Key changes:
New Features & API Enhancements
equalizeWidths()to allow selected boxes (including nested or grouped boxes) to share a common width while maintaining their center positions; includes support for deepsubelementand list-of-boxes targets. (F46cb217L4R4)boxHeaderGrob()for creating flowchart boxes with a distinct header and body layout, compatible with all flowchart helpers. (F46cb217L13R13, NAMESPACER62-R67)txt_paddingargument toboxGrob()and support for a global default viaoptions(boxGrobTxtPadding = ...). (F46cb217L5R5)Improved Alignment, Spreading, and Movement
alignVertical,alignHorizontal,spreadVertical,spreadHorizontal, andmoveBoxto support deep-path and multiple-targetsubelement/referencearguments, enabling nested selection and assignment within box lists. (F46cb217L14R14)referenceargument. (F46cb217L18R18)Documentation, Testing, and Examples
tests/testthat/test-equalizeWidths.Randtests/testthat/test-boxGrob-padding-option.R. (F46cb217L8R8)Project Infrastructure & Maintenance
.github/copilot-instructions.mdwith project-specific conventions, architecture, and AI agent guidance..github/workflows/ci.yaml) for automated R CMD check, linting, test coverage, and documentation site builds..Rbuildignoreto exclude new generated artifacts (e.g., visual test outputs, HTML/CSS ininst/extdata/). [1] [2].lintr(e.g., longer line/object lengths, disabled some linters for flexibility).Versioning and Metadata
DESCRIPTIONandCRAN-SUBMISSION; updated maintainer info with ORCID. [1] [2]equalizeWidths,boxHeaderGrob,flowchart,align,append,connect,insert,move, andspread. [1] [2] [3] [4] [5] [6] [7]These changes collectively deliver major improvements to the package's functionality, usability, and maintainability.