Rhino 1.9.0 Update on CRAN: New Formatting Tools and Cleaner {bslib} Integration

Estimated time:
time
min

We're excited to announce the release of Rhino 1.9, bringing with it some powerful new features for developers. This update focuses on enhancing your coding experience with new formatting tools for JavaScript and Sass, as well as cleaner integration of {bslib} and custom Sass for ultimate flexibility when styling your application 

Not sure what library is right for you between Rhino, Golem and Leprechaun? We did the comparison in this blog post.

New Formatting Tools

Rhino is committed to providing you with state-of-the-art tools for working with JavaScript and CSS, the backbone technologies of the web. Since its early versions, Rhino has offered linting tools powered by eslint and stylelint. The lint_js() and lint_sass() functions could also be used to format the code with the fix = TRUE flag.

The tooling landscape has shifted however, with linters now focusing primarily on detecting potentially problematic or buggy code. Formatting is now typically delegated to separate tools and prettier has emerged as the gold standard for this task.

Rhino 1.9 introduces a pair of new functions for formatting JavaScript and Sass powered by prettier:

rhino::format_js()
rhino::format_sass()

You can now automatically format your code using state-of-the-art tools:

These functions ensure that your code is consistently formatted, making it easier to read and maintain.

Styling with {bslib}

The {bslib} R package offers a UI toolkit based on Bootstrap. Shiny uses it under the hood for its default appearance, but it’s also possible to use {bslib} directly to access additional UI components, theming, and more.

Rhino comes with built-in support for writing custom Sass code giving you complete control over the appearance of your application. While you could use both {bslib} and custom Sass in Rhino before, it was somewhat cumbersome.

To make the integration cleaner, Rhino 1.9 introduces a new configuration option for Sass in the rhino.yml file:

sass: custom

With some simple setup, you can elegantly combine {bslib} and custom Sass code to create unique and flexible styles for your projects.

For detailed instructions, refer to our guide on How-to: Use bslib with Rhino.

How to Install the Latest Version of Rhino

Try out the new features today! You can grab the latest version from CRAN by running:

install.packages("rhino")

To migrate your existing Rhino project, check out the Rhino 1.9 Migration Guide.

Explore the Rhinoverse

Rhino can be a solid foundation for your Shiny application, but it doesn’t end there. Rhino is the centerpiece of a larger ecosystem - Rhinoverse, a family of open-source R packages created by Appsilon to address the needs of modern web development.

Make sure to check out the other members of the family on rhinoverse.dev!

Summing up Rhino 1.9.0 Update

Rhino 1.9 represents our ongoing commitment to providing developers with powerful, flexible tools for creating exceptional Shiny applications. We're eager to hear your feedback on these new features. Don't hesitate to reach out with questions, suggestions, or to share your experiences with Rhino 1.9 in our Shiny community on Slack.

We share the latest updates on R/Shiny and data science in our newsletter. Sign up for our newsletter today. 

Have questions or insights?

Engage with experts, share ideas and take your data journey to the next level!

Sign up for ShinyWeekly

Join 4,2k explorers and get the Shiny Weekly Newsletter into your mailbox
for the latest in R/Shiny and Data Science.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Explore Possibilities

Share Your Data Goals with Us

From advanced analytics to platform development and pharma consulting, we craft solutions tailored to your needs.

Talk to our Experts
rhino
open source