HomePhorge

(#12329) Allow faces when_rendering blocks to take options
a11672690ed1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#12329) Allow faces when_rendering blocks to take options

When rendering for face actions was implemented it was assumed that all
the options that an action took would go toward determining the data
that the when_invoked block returned, and the rendering would make
decisions based on that data's structure. However, there are times when
the data returned may be the same even with different options, and the
option will determine how it's rendered.

For example, the module list action has a --tree option that will
display the installed modules in a tree view based on dependencies. The
module search action will be able to highlight the word that was
searched for in the results.

This commit allows the when_rendering blocks to optionally add options
and arguments along with the invoked result. I made the options and
arguments optional since most when_rendering blocks won't need the
them, and having them show up in the block declaration when not used
is confusing. This also means that all faces previously written don't
need changes and this change is backward compatible.

Details

Provenance
Matt Robinson <matt@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU309c09c44fb7: Merge pull request #419 from nicklewis/ticket/2.7.x/10064
Branches
Unknown
Tags
Unknown

Event Timeline

Matt Robinson <matt@puppetlabs.com> committed rPUa11672690ed1: (#12329) Allow faces when_rendering blocks to take options (authored by Matt Robinson <matt@puppetlabs.com>).Jan 31 2012, 6:34 PM