Problem/Motivation
Entity extra field views should support all major view settings that are relevant to enable or override in the extra field.
The most important option is to render the views title IMHO: #3123635: Add option to render view title and add schema check tests
But also other settings which similar modules already offer, especially https://www.drupal.org/project/viewfield would be nice to have.
Reviewed related Viewfield options:
- Render empty view title when output is forced to build.
Use this META issue as parent for such single issues.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork entity_extra_field-3578499
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyMight be a nice (even if not easy) novice task now that #3123635: Add option to render view title and add schema check tests is in and similar options already exist in https://www.drupal.org/project/viewfield and similar modules.
Comment #7
sapnil_biswas commented@anybody
Marking this issue as Needs Review.
The MR is ready and addresses the proposed changes.
Would really appreciate feedback and suggestions for improvement.
Thanks!
Comment #8
anybodyThanks @sapnil_biswas for adding this one further option.
There are several others missing, see #3443048: Allow the Views plugin to support defining items per page
Comment #9
anybodyPS: Please prefix the new option with
view_.MR LGTM otherwise. Thanks!
Comment #10
sapnil_biswas commented@anybody
I’ve addressed the review feedback in 782bb0d by renaming the setting to `view_always_build_output` and updating the label/title text accordingly. The follow-up pipeline is now passing, so I’m moving this back to needs review.
I’m still learning, so if there’s anything else you’d like me to adjust, I’d really appreciate the guidance.
Comment #11
anybodyThanks @sapnil_biswas I left two comments. Please also add a test that ensures that this does not change anything if the override is left empty.
Please also look into https://www.drupal.org/project/viewfield which other settings they offer that should be added here. First please add them to the issue summary.
Comment #12
anybodyRemoving the [META] as it looks like we're gonna solve this here.
Comment #13
sapnil_biswas commentedI reviewed Viewfield for similar formatter settings. Besides rendering the view title and always building output, a possible follow-up option here is support for rendering the empty view title when output is forced to build.
I also addressed the remaining review feedback:
- 3b51f5d clarifies that leaving the items-per-page field empty keeps the view setting.
- c1af1c7 renames the config schema label to "Override Items per page".
- 6ead558 adds a kernel test to ensure an empty items-per-page override does not change the selected view's pager behavior.
Comment #14
anybodyThanks, we should bring them into the correct logical order like in views and put the title option first.
Also I'll have to take some time to look up which (other) settings make sense for views.
I thought about offset, but I think it could even become too much and things should probably be solved in the view instead. @thomas.frobieter anything you'd find very useful or you're missing?
Comment #15
thomas.frobieter@anybody I'm not sure; probably anything I can think of right now would be too complicated and—as you already mentioned—should be configured in the View itself.
Comment #16
anybodyThanks @thomas.frobieter then let's keep it like this and resolve the remaining points.
Comment #17
sapnil_biswas commentedReordered Views Plugin Option
Please let me know if there a requirement for any furthered changes.
Comment #18
anybody@sapnil_biswas I left one further comment. Would be great, if you could try that and add a test if it works.
Thanks, @grevil will do the final review.
Comment #19
sapnil_biswas commentedHey @grevil, I just wanted to follow up on my MR, When you have time, could you please look it over? Please let me know if I need to make any changes.
Comment #20
sapnil_biswas commented@anybody @grevil Is there any requirement for any kind of follow-up or changes required for this?
Comment #21
anybodyThanks @sapnil_biswas - @grevil will review this soon, sorry.
Comment #22
grevil commentedAdded a few comments.
Comment #23
sapnil_biswas commented@grevil Have worked on the review comments, please have a look when you have time
Comment #24
grevil commentedHey @sapnil_biswas.
Sorry this went under my radar. Will take a final look now!
Comment #25
grevil commentedAdjusted the code.
There is no need for the complex items per page logic. Simply making the config nullable does the trick.
Could you adjust the test? We don't need a separate testing class and the submit tests are not needed IMO. Only test that the rendered output is correct.
Comment #26
sapnil_biswas commentedComment #27
grevil commented@sapnil_biswas, thank you! Sorry did not realise the "ExtraFieldViewsPluginTest2" was already part of entity_extra_field. What a weird naming... in this case let's keep it as is.
But no need for you to restore and adjust everything again. This one is on me, I'll revert the deletion and add some finishing touches. Thanks for working on this! :)
Comment #28
grevil commentedAll green, lets get this merged!
Comment #30
grevil commented