yii2 icon indicating copy to clipboard operation
yii2 copied to clipboard

Allows set named views in `ContentDecorator::$viewFile`

Open WinterSilence opened this issue 3 years ago • 6 comments

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues

WinterSilence avatar Oct 15 '22 06:10 WinterSilence

Thank you for putting effort in the improvement of the Yii framework. We have reviewed your pull request.

Unfortunately a use case is missing. It is required to get a better understanding of the pull request and helps us to determine the necessity and applicability of the suggested change to the framework.

Could you supply us with a use case please? Please be as detailed as possible and show some code!

Thanks!

This is an automated comment, triggered by adding the label pr:missing usecase.

yii-bot avatar Oct 15 '22 08:10 yii-bot

@bizley old implementation not support named views, look to updated example

WinterSilence avatar Oct 15 '22 08:10 WinterSilence

Wouldn't be better to resolve view file in View::beginContent()? Passing view name as viewFile property looks a little bit off...

rob006 avatar Oct 20 '22 18:10 rob006

@rob006 View::beginContent() use $viewFile parameter and we can't change it

WinterSilence avatar Oct 20 '22 18:10 WinterSilence

Your PR already assumes that you pass view name as first argument of beginContent(). Resolving name in this method will reduce number of places where view name is used as viewFile.

rob006 avatar Oct 20 '22 19:10 rob006

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 48.02%. Comparing base (b0aa6ab) to head (da8275f).

Files Patch % Lines
framework/widgets/ContentDecorator.php 0.00% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19624   +/-   ##
=======================================
  Coverage   48.02%   48.02%           
=======================================
  Files         445      445           
  Lines       43892    43892           
=======================================
  Hits        21080    21080           
  Misses      22812    22812           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 13 '24 21:03 codecov[bot]