Page MenuHomePhabricator

Labels for Argument references in Compositions are not being displayed (Regression)
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • I have a function Negate that takes one argument, type boolean, name "input" in English
  • I go and create a composition. When selecting an argument reference, it shows me an empty line which I have to select

selecting argument.png (1×2 px, 272 KB)

  • Also after storing and when viewing, it doesn't show me the name of the argument reference in the view

displaying argument in composition.png (1×2 px, 310 KB)

What should have happened instead?:

  • When selecting, it should let me select by name of the argument reference. If there is no name in the given language, it should be the Identifier
  • the same when viewing the implementation, it should show me the name, or if there is no name in the language, the identifier

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

hei @DVrandecic
would you be so kind to share with me the JSON of the negate function you have, so that I can reproduce it.

hei @DVrandecic
would you be so kind to share with me the JSON of the negate function you have, so that I can reproduce it.

I assume it's the same as https://notwikilambda.toolforge.org/wiki/Z10025 which is:

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z10025"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z10024",
        "Z14K2": {
            "Z1K1": "Z7",
            "Z7K1": "Z802",
            "Z802K1": {
                "Z1K1": "Z18",
                "Z18K1": {
                    "Z1K1": "Z6",
                    "Z6K1": "Z10024K1"
                }
            },
            "Z802K2": {
                "Z1K1": "Z40",
                "Z40K1": "Z42"
            },
            "Z802K3": {
                "Z1K1": "Z40",
                "Z40K1": "Z41"
            }
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Negate composition"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": []
    }
}

This is my negate function:

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z10000"
    },
    "Z2K2": {
        "Z1K1": "Z8",
        "Z8K1": [
            {
                "Z1K1": "Z17",
                "Z17K1": "Z40",
                "Z17K2": {
                    "Z1K1": "Z6",
                    "Z6K1": "Z10000K1"
                },
                "Z17K3": {
                    "Z1K1": "Z12",
                    "Z12K1": [
                        {
                            "Z1K1": "Z11",
                            "Z11K1": "Z1002",
                            "Z11K2": "input"
                        }
                    ]
                }
            }
        ],
        "Z8K2": "Z40",
        "Z8K3": [
            "Z10003",
            "Z10004"
        ],
        "Z8K4": [
            "Z10001",
            "Z10005",
            "Z10006",
            "Z10037"
        ],
        "Z8K5": "Z10000"
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "negate"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            {
                "Z1K1": "Z31",
                "Z31K1": "Z1002",
                "Z31K2": []
            }
        ]
    }
}

And this is my composition implementation:

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z10001"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z10000",
        "Z14K2": {
            "Z1K1": "Z7",
            "Z7K1": "Z802",
            "Z802K1": {
                "Z1K1": "Z18",
                "Z18K1": {
                    "Z1K1": "Z6",
                    "Z6K1": "Z10000K1"
                }
            },
            "Z802K2": {
                "Z1K1": "Z40",
                "Z40K1": "Z42"
            },
            "Z802K3": {
                "Z1K1": "Z40",
                "Z40K1": "Z41"
            }
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Negate If"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            {
                "Z1K1": "Z31",
                "Z31K1": "Z1002",
                "Z31K2": []
            }
        ]
    }
}
SimoneThisDot changed the task status from Open to In Progress.Mar 14 2022, 8:54 AM
SimoneThisDot claimed this task.

Change 771087 had a related patch set uploaded (by Simone Cuomo; author: Simone Cuomo):

[mediawiki/extensions/WikiLambda@master] Labels for Argument references in Compositions are not being displayed

https://gerrit.wikimedia.org/r/771087

Change 771087 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ZArgumentReference.vue: Labels are an array, not a single string

https://gerrit.wikimedia.org/r/771087