Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing: clearer modeling in pairwise case #883

Closed
nsenave opened this issue Feb 20, 2024 · 0 comments · Fixed by #885
Closed

Resizing: clearer modeling in pairwise case #883

nsenave opened this issue Feb 20, 2024 · 0 comments · Fixed by #885
Labels
Type: Feature New feature

Comments

@nsenave
Copy link
Contributor

nsenave commented Feb 20, 2024

Feature Description

The current modeling for a resizing entry asociated with a pairwise links component is like this:

{
  "resizing": {
    "FIRST_NAME": {
      "sizeForLinksVariables": [
        "count(FIRST_NAME)",
        "count(FIRST_NAME)"
      ],
      "linksVariables": ["LINKS"]
    }
  }
}

The current modeling of the sizeForLinksVariables property is a bit flawed. The response associated with a pairwise links component is a two-dimension array, so it must contains exactly 2 elements.

Use Case

This current modeling could cause issues since nothing prevents users from setting and array with 1, 3 or more elements in the source json.

Proposed Solution

I suggest something clearer like:

{
  "resizing": {
    "FIRST_NAME": {
      "sizeForLinksVariables": {
        "xAxisSize": "count(FIRST_NAME)",
        "yAxisSize": "count(FIRST_NAME)"
      },
      "linksVariables": ["LINKS"]
    }
  }
}

Note: For now, only one pairwise component per questionnaire is authorized, so we also might want to change "linksVariables": ["LINKS"] into "linksVariable": "LINKS".
Yet it feels much less necessary to me since current modeling isn't harmful, and this rule could change someday.

Alternatives Considered

Additional Context

Priority

  • Low

Attachments

Related Issues

Issue to be created in Lunatic-Model, and then in Eno to use the new modeling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant