Skip to content
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

Customize pin landing page #370

Open
akgold opened this issue Feb 19, 2021 · 5 comments
Open

Customize pin landing page #370

akgold opened this issue Feb 19, 2021 · 5 comments
Labels
feature a feature request or enhancement

Comments

@akgold
Copy link
Contributor

akgold commented Feb 19, 2021

Make it easier to customize the landing page of a pin on RSC.

I believe you can currently provide a custom index.html, but this isn't well-documented. Would be really nice to be able to provide an object (nested list? json blob? yml?) that then would get auto-rendered into index.html for landing page.

Perhaps based on metadata as in #369?

@hadley hadley added the feature a feature request or enhancement label Mar 10, 2021
@hadley hadley added this to the 0.5.0 milestone Mar 10, 2021
@hadley
Copy link
Member

hadley commented Mar 18, 2021

Just removed this existing advice from the docs:

Customizing

A pin is displayed in RStudio Connect with an auto-generated page showcasing
instructions for getting the pin and a preview of the dataset, this page can
be customized as follows:

  1. Locate the file with system.file("views/data/index.html", package = "pins")
  2. Copy the file to a new location and make any changes to it.
  3. Set the file path as an option using Sys.setenv(RSCONNECT_HTML_PATH = <your index>).
  4. Pin a dataset normally.

hadley added a commit that referenced this issue Mar 18, 2021
Tracking improvements in #370
@hadley
Copy link
Member

hadley commented Apr 15, 2021

The HTML preview will soon look like this:
Screenshot 2021-04-15 at 3 10 24 PM

What other info do you want?

@akgold
Copy link
Contributor Author

akgold commented Apr 16, 2021

I think this is great as the default. Especially for non-rectangular data, it's easy to imagine wanting to put other things on the landing page (e.g. model diagnostic plots). I don't think pins necessarily needs to provide that for me...but if it could provide an easy way to customize index.html, that'd be awesome.

@hadley
Copy link
Member

hadley commented Apr 23, 2021

The place to start is probably just a blob of markdown or html that's added to the index HTML index.

(Random thought: should also use expanded <details> on this page)

@hadley hadley removed this from the 1.0.0 milestone Aug 26, 2021
@kmasiello
Copy link

A customized (rmd- or qmd-based) index.html would enable more robust information about the pin to be presented, such as:

  • data dictionary
  • data validation results (i.e., from pointblank)
  • assumptions, limitations, etc.

Encouraging better documentation around the pin and appropriate usage is analogous to the vetiver model card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants