-
Notifications
You must be signed in to change notification settings - Fork 25
Enhance layer functionality with colors #155
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
Conversation
- Added color and size parameters to `layer_symbol` and `layer_text` methods for improved customization. - Updated documentation to reflect new parameters and provide examples of usage. - Introduced unit tests to validate the new color functionality across different layer types.
There was a problem hiding this 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 enhances the layer functionality of tidyHeatmap by adding customizable color and size parameters to layer methods. The changes enable users to specify colors for symbols and text overlays on heatmaps, either as direct values or through data frame columns.
Key Changes:
- Added
.colorand.sizeparameters tolayer_symbolandlayer_textmethods - Updated internal data structures to store color information for each layer type
- Extended documentation with comprehensive examples demonstrating the new color functionality
Reviewed Changes
Copilot reviewed 8 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| R/methods.R | Modified rendering logic to use dynamic colors from layer data instead of hardcoded values |
| R/functions.R | Added .color parameter to layer_symbol function signature and implementation |
| R/classes.R | Extended layer_symbol and layer_text tibbles to include color column |
| man/layer_text-method.Rd | Updated documentation to describe new .color parameter |
| vignettes/introduction.Rmd | Added complex examples demonstrating color and size customization |
| tests/testthat/test-color-functionality.R | Comprehensive test suite validating color functionality across all layer types |
| inst/NEWS.rd | Added release notes for version 1.13.0 and reorganized version history |
| DESCRIPTION | Updated package version to 1.13.0 and RoxygenNote version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
inst/NEWS.rd
Outdated
| \itemize{ | ||
| \item Improved custom palettes for annotations (e.g. add_tile). Now it is possible to choose a custom circlize::colorRamp2 scale. | ||
| }} | ||
| \item the argument `.scale` is now deprecated in favour of `scale`, and it is non by default. After few requests from the user-base. This change change the meaning of old code! To help with this destructive behaviour we added a warning to inform the user. The application of such impactful change is an absolute exception, in the development of tdyHeatmap. |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate word 'change' should appear only once.
| \item the argument `.scale` is now deprecated in favour of `scale`, and it is non by default. After few requests from the user-base. This change change the meaning of old code! To help with this destructive behaviour we added a warning to inform the user. The application of such impactful change is an absolute exception, in the development of tdyHeatmap. | |
| \item the argument `.scale` is now deprecated in favour of `scale`, and it is non by default. After few requests from the user-base. This change the meaning of old code! To help with this destructive behaviour we added a warning to inform the user. The application of such impactful change is an absolute exception, in the development of tdyHeatmap. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on November 13
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| pch = ind$shape , | ||
| size = unit(ind$size, "mm"), | ||
| gp = gpar(col = NULL, fill="#161616") | ||
| gp = gpar(col = NULL, fill=ind$color) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Symbol Color Rendering Issue
Symbol layer rendering uses gpar(col = NULL, fill=ind$color) which only works for filled shapes (point, square, diamond, arrows). Line-based symbols like "star" (pch=8) and "asterisk" (pch=42) require col= instead of fill= to be colored. These symbols will not display the specified color correctly. The fix should use gpar(col=ind$color, fill=ind$color) to support both filled and line-based symbols.
layer_symbolandlayer_textmethods for improved customization.