You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I started out with officer, I was initially confused by the ph_withlocation argument which expects the output of one of the ph_location_* functions. Now, all make perfect sense. Still I think it would be useful (especially for newcomers) to also offer the option of supplying a simplified location arg input (string or numeric), instead of a having to call a ph_location_* function.
Providing a string or numeric can - I think unambiguously and without loss of generality - cover most of the common ph_location_* use cases. While the ph_location_* functions allow for more customized settings and additional features, I think the simplified version would be a nice UI addition and suffice the most common use cases.
NB: Behind the scenes, the simplified input would just be automatically plugged into one of the ph_location_* functions.
What do you think?
x<- read_pptx()
x<- add_slide(x, "Title Slide")
# >>>> consecutive lines would be identical with the UI simplification <<<<<# string to specify ph labelx<- ph_with(x, "A title", location= ph_location_label("Title 1"))
x<- ph_with(x, "A title", location="Title 1")
# numeric for location idx<- ph_with(x, "A subtitle", location= ph_location_id(3))
x<- ph_with(x, "A subtitle", location=3)
# string with special format `type[type_idx]` for typex<- ph_with(x, "A date", location= ph_location_type("dt", 1))
x<- ph_with(x, "A date", location="dt [1]")
# string with keyword: `left`, `right`, or `fullsize`x<- ph_with(x, "A left text", location= ph_location_left())
x<- ph_with(x, "A left text", location="left")
The text was updated successfully, but these errors were encountered:
I've been thinking about this and I think it's a good idea, it's similar to what we use for the ggplots position argument, a parameterizable function or a simple string. You're welcome to implement it, of course, or I can help you (or do it myself) :)
I'm not a fan of the numerical index idea, but I'll leave the decision up to you.
When I started out with officer, I was initially confused by the
ph_with
location
argument which expects the output of one of theph_location_*
functions. Now, all make perfect sense. Still I think it would be useful (especially for newcomers) to also offer the option of supplying a simplifiedlocation
arg input (string or numeric), instead of a having to call aph_location_*
function.Providing a string or numeric can - I think unambiguously and without loss of generality - cover most of the common
ph_location_*
use cases. While theph_location_*
functions allow for more customized settings and additional features, I think the simplified version would be a nice UI addition and suffice the most common use cases.NB: Behind the scenes, the simplified input would just be automatically plugged into one of the
ph_location_*
functions.What do you think?
The text was updated successfully, but these errors were encountered: