Problem/Motivation
We planned long time ago to do improve the support of views in ui_patterns.
We already have :
- a source for views title
- a source for views rows inside a views style plugin
- a source for view field inside a views rows plugin
we already have some tickets opened for :
- pager #3450570: Add views pager plugin
- exposed form #3504992: [2.1.0] Allow to choose exposed filters as a slot
- more link #3551577: views more link source support
We need the other parts of a view to be able to fully support views rendering :
- views header
- views attachment_before
- views rows (but the styled rows, after views style has been applied, not the raw rows)
- views empty (that one was forgotten in current display_builder)
- views attachment_after
- views footer
- views feed_icons
Those sources were almost all introduced in the display_builder project.
They used to rely on a preprocess hook to operate, but they have recently evolve to a better shape, similar to what we wanted to have in the module.
To be able to specify the context of a view render/display, we would introduce a new context requirement ("views:display") to indicate we are currently rendering a view.
Issue fork ui_patterns-3620748
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 #3
just_like_good_vibesComment #4
just_like_good_vibesComment #5
just_like_good_vibesComment #6
just_like_good_vibesReady for review
Comment #7
just_like_good_vibeswe will now support usages like this, see the tests in the MR :
Comment #8
just_like_good_vibesWe also introduced the component form to configure the display of a view.
The MR includes some playwright tests for that feature.
Comment #9
mogtofu33 commentedLeft some reviews on the MR.
Comment #10
just_like_good_vibesComment #11
just_like_good_vibesthank so veryyy much for the review, it has allowed to strengthen the code :)
it seems better now, ready for merge?
Comment #12
just_like_good_vibesPierre suggested we merge the two sources for raw rows and styled rows,
and provide both logics in the same class.
doable but we also provide a little evolution of
RequiredArrayValuesConstraintValidatorto allow a list of candidate contexts to match.i will modify the code and push.
Comment #14
just_like_good_vibes