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

[SectionRestitution] breakchange on label and value for version v1.4.0-alpha.1 #844

Closed
sisko59 opened this issue Feb 2, 2021 · 2 comments · Fixed by #852
Closed

[SectionRestitution] breakchange on label and value for version v1.4.0-alpha.1 #844

sisko59 opened this issue Feb 2, 2021 · 2 comments · Fixed by #852
Assignees
Labels
Type: Bug Something isn't working
Milestone

Comments

@sisko59
Copy link
Contributor

sisko59 commented Feb 2, 2021

Issue and Steps to Reproduce

With the version v1.4.0-alpha.1, we can't use:

  • the value null for the label

  • the value null or number for the value.

    <SectionRestitution>
      <SectionRestitutionRow>
        <SectionRestitutionColumn>
          <Restitution label={null} value={null} />
        </SectionRestitutionColumn>
      </SectionRestitutionRow>
    </SectionRestitution>
    
    <SectionRestitution>
      <SectionRestitutionRow>
        <SectionRestitutionColumn>
          <Restitution label={null} value={42} />
        </SectionRestitutionColumn>
      </SectionRestitutionRow>
    </SectionRestitution>
    

Versions

v1.4.0-alpha.1

Screenshots

image
image
image

Expected

Accept null value for label and null/number for value like the version 1.3.23

Additional Details

  • Installed packages
    "devDependencies": {
    "@storybook/addon-actions": "6.1.11",
    "@storybook/addon-knobs": "6.1.11",
    "@storybook/addon-storyshots": "6.1.11",
    "@storybook/preset-create-react-app": "3.1.5",
    "@storybook/react": "6.1.11",
    "@testing-library/react-hooks": "3.5.0",
    "@types/classnames": "2.2.11",
    "@types/file-saver": "2.0.1",
    "@types/jest": "26.0.19",
    "@types/lodash": "4.14.165",
    "@types/node": "14.14.13",
    "@types/react": "17.0.0",
    "@types/react-dom": "17.0.0",
    "@types/react-router": "5.1.8",
    "@types/react-router-dom": "5.1.6",
    "@types/react-syntax-highlighter": "13.5.0",
    "@types/react-test-renderer": "17.0.0",
    "@types/recompose": "0.30.7",
    "body-parser": "1.19.0",
    "concurrently": "5.3.0",
    "core-js": "3.8.1",
    "cors": "2.8.5",
    "eslint": "7.15.0",
    "eslint-config-prettier": "7.0.0",
    "eslint-plugin-jest": "24.1.3",
    "eslint-plugin-jsx-a11y": "6.4.1",
    "eslint-plugin-prettier": "3.3.0",
    "eslint-plugin-react": "7.21.5",
    "eslint-plugin-react-hooks": "4.2.0",
    "eslint-plugin-simple-import-sort": "7.0.0",
    "express": "4.17.1",
    "file-system": "2.2.2",
    "http-proxy-middleware": "1.0.6",
    "husky": "4.3.6",
    "jest-cucumber": "3.0.0",
    "lint-staged": "10.5.3",
    "nodemon": "2.0.6",
    "package-lock-sanitizer": "1.0.1",
    "prettier": "2.2.1",
    "react-scripts": "4.0.1",
    "react-test-renderer": "17.0.1",
    "redux": "4.0.5",
    "redux-mock-store": "1.5.4",
    "sass": "1.30.0",
    "source-map-explorer": "2.5.1",
    "stylelint": "13.8.0",
    "stylelint-config-prettier": "8.0.2",
    "stylelint-prettier": "1.1.2",
    "typescript": "4.1.3"
    },
    "dependencies": {
    "@axa-fr/correlation-context": "1.0.3",
    "@axa-fr/react-oidc-context": "3.1.6",
    "@axa-fr/react-oidc-context-fetch": "3.1.6",
    "@axa-fr/react-toolkit-all": "^1.4.0-alpha.1",
    "@popperjs/core": "2.6.0",
    "classnames": "2.2.6",
    "copy-to-clipboard": "3.3.1",
    "cuid": "2.1.8",
    "file-saver": "2.0.5",
    "isomorphic-fetch": "3.0.0",
    "lodash": "4.17.20",
    "moment": "2.29.1",
    "mw.validation": "1.0.15",
    "oidc-client": "1.10.1",
    "prop-types": "15.7.2",
    "query-string": "6.13.7",
    "react": "17.0.1",
    "react-app-polyfill": "2.0.0",
    "react-dom": "17.0.1",
    "react-enhanced-reducer-hook": "1.0.2",
    "react-popper": "2.2.4",
    "react-router": "5.2.0",
    "react-router-dom": "5.2.0",
    "react-syntax-highlighter": "15.4.3",
    "recompose": "0.30.0",
    "redux-thunk": "2.3.0",
    "redux-thunk-error-handler": "1.1.4",
    "unorm": "1.6.0"
    },
@arnaudforaison arnaudforaison added the Type: Bug Something isn't working label Feb 12, 2021
@arnaudforaison arnaudforaison added this to the v1.4.0 milestone Feb 12, 2021
@arnaudforaison arnaudforaison self-assigned this Feb 12, 2021
@arnaudforaison
Copy link
Contributor

Le label ne peut pas être null, je ne vois pas de sens et le code ne le permet pas.

@sisko59
Copy link
Contributor Author

sisko59 commented Feb 16, 2021

Pour le label à null,
dans mon code de production avec la version 1.3.2, j'ai ce code avec cet affichage:
image
image

Et l'objet restitution est obtenu par cet import :

import {
  Restitution,
  SectionRestitution,
  SectionRestitutionColumn,
  SectionRestitutionRow,
} from '@axa-fr/react-toolkit-restitution';

De mon point de vu, c'est une mauvaise pratique et c'est rapide à fixer.

Ça reste un breakchange, qu'il faut au moins indiquer ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants