[FEATURE] Add panel-level repeat variable support - #149
Conversation
|
@adrianSepiol |
@shahrokni Pipelines are failing because of PR mentioned in description that needs to be merged for this to work: perses/spec#32 |
c42f663 to
b611f9c
Compare
|
Removed "mode" option after comments from @AntoineThebaud in perses/perses#2936. I've updated description of PR. |
b611f9c to
23fe7b8
Compare
9a6a842 to
b83e228
Compare
|
Hi @jgbernalp @Gladorme, I've moved this pr to ready for review with new Layout tab that we have discussed. |
7296c12 to
de926ba
Compare
7891364 to
e32d1fe
Compare
|
Hi @jgbernalp, I adjusted code to your comments. Could you have another look? |
05dc32e to
fe39dc3
Compare
| return `This panel is generated from the variable "${repeatVariableName}" with the value "${value}". To change panel definition, please edit the first panel.`; | ||
| } | ||
| if (isFirst && isCapped) { | ||
| return `Not all values are displayed. To display more, update the repeat variable limit in the server configuration.`; |
There was a problem hiding this comment.
| return `Not all values are displayed. To display more, update the repeat variable limit in the server configuration.`; | |
| return `Not all values are displayed. To display more, update the repeat variable limit in the server configuration or exit full screen mode.`; |
| const { name: repeatVariableName, values: variableValues, maxPer: perRow } = panelRepeatVariable; | ||
| const variables = useVariableValues(); | ||
|
|
||
| const rows: string[][] = useMemo(() => { |
There was a problem hiding this comment.
Is this the same as in RepeatLayoutPreview.tsx:29 ? maybe we can extract a small reusable function
| }, []); | ||
|
|
||
| const preview = | ||
| watchedRepeatVariable && repeatVariableValue ? ( |
There was a problem hiding this comment.
It seems we are building this same context provider in several places.
jgbernalp
left a comment
There was a problem hiding this comment.
LGTM, minor style and code reuse comments.
|
@adrianSepiol we need a rebase |
Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…tainer is narrower than combined gaps, and consolidate VariableDefinitionGroup to plugin-system model Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
…ndered panels per repeat variable Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
fe39dc3 to
184c638
Compare
Closes: perses/perses#2936
Needs: perses/spec#32
Description
Adds support for repeat panel based on variable. Uses only selected values from dropdown are used.
Screenshots
In below recording you can notice that width of panel is expanded when you select repeat variable and height is used for single tile. If you don't fill 'Max per row' all tiles will be fitted into single row.
layout-editor.mov
In this one you can see how the panel will behave when the amount of selected values will change. You can enter edit mode only with first panel.
Screen.Recording.2026-06-10.at.09.00.11.mov
Group repeat has priority over panel repeat.
Screen.Recording.2026-06-01.at.19.14.58.mov
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes
See e2e docs for more details. Common issues include: