Skip to content

Conversation

@stemangiola
Copy link
Owner

  • 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.

- 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.
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 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 .color and .size parameters to layer_symbol and layer_text methods
  • 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.
Copy link

Copilot AI Oct 24, 2025

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.

Suggested change
\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.

Copilot uses AI. Check for mistakes.
stemangiola and others added 2 commits October 25, 2025 09:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stemangiola stemangiola merged commit e075db2 into master Oct 27, 2025
4 checks passed
Copy link

@cursor cursor bot left a 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)
Copy link

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.

Fix in Cursor Fix in Web

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.

feature request: use "free text" symbol in layer_symbol(), and add color, size options

2 participants