Repository navigation
Move panel scale training to core - #567
Conversation
There was a problem hiding this comment.
LGTM, but there are two things we should pay attention to; either move to new issues or address here.
- Currently either all panels or no panels have free scales. There is no partial sharing of free scales that
ggplot2::facet_grid(free)has (within column for x, within row for y). I think it'd be nice if users can choose all/none/some for this, but may have to overhaul settings a bit for sugary syntax. - It is currently valid to set
MAPPING 'Adelie' AS panelsbut not valid to setSETTING panels => 'Adelie', whereas I think they should both be valid (likewiserowandcolumnaesthetics). In particular forPLACEclauses it'd be sweet to do panel-specific annotations in this way.
|
Also related, but can be deferred to separate PR: According to the grammar, ggsql/tree-sitter-ggsql/grammar.js Lines 1013 to 1028 in 92bf584 However, we are only handling one aesthetic per dimension. We should either grammatically accept a single identifier, or warn/error when multiple are given. For table stuff there isn't a reason why we couldn't handle multiple identifiers in the wrap situation. |
| if matches!( | ||
| param_name.as_str(), | ||
| "panel" | "row" | "column" | "facet1" | "facet2" | ||
| ) { |
There was a problem hiding this comment.
I think we have is_facet_aesthetic() and is_user_facet_aesthetic() to capture these patterns
There was a problem hiding this comment.
oh yeah... I guess that is in a later batch of knowledge I have to hydrate
Fix #516
This PR moves the training of free positional scales in facets to core so that writers can read the required information directly rather than reimplement scale training logic