neodash icon indicating copy to clipboard operation
neodash copied to clipboard

Feat/forms button improvements

Open m-o-n-i-s-h opened this issue 1 year ago • 4 comments

Disable forms button until all the necessary parameters are provided.

Description

This pull request introduces a modification to the forms functionality, specifically targeting the submit button. The primary change ensures that the submit button remains disabled until all the necessary parameters are provided by the user. This enhancement is essential for improving the user experience and preventing incomplete form submissions.

Changes Made

  • Added logic to disable the submit button by default.
  • Implemented parameter validation to enable the submit button only when all required parameters are provided.

Screenshots

Actual Behaviour:

actual behaviour of forms button

New Behaviour:

disableFormButton

NOTICE

The program was tested solely for our own use cases, which might differ from yours.

Author Info: Monish [email protected] on behalf of Mercedes-Benz Research and Development India

https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md

Sample JSON:

movieDisableFormButton.json

Signed off: Monish [email protected]

m-o-n-i-s-h avatar Mar 07 '24 09:03 m-o-n-i-s-h

Quality Gate Failed Quality Gate failed

Failed conditions
7.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 07 '24 09:03 sonarqubecloud[bot]

Codecov Report

Attention: Patch coverage is 11.76471% with 15 lines in your changes missing coverage. Please review.

Project coverage is 39.49%. Comparing base (d165cce) to head (0432950). Report is 97 commits behind head on develop.

Files with missing lines Patch % Lines
src/utils/parameterUtils.ts 18.18% 9 Missing :warning:
src/extensions/forms/chart/NeoForm.tsx 0.00% 6 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #822      +/-   ##
===========================================
- Coverage    39.55%   39.49%   -0.07%     
===========================================
  Files          216      217       +1     
  Lines         9205     9225      +20     
  Branches      2732     2738       +6     
===========================================
+ Hits          3641     3643       +2     
- Misses        5503     5521      +18     
  Partials        61       61              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 07 '24 09:03 codecov[bot]

Can you please check the code duplication and if you can add testing for this new behaviour in Cypress? Thank you so much for contributing to the project!

alfredorubin96 avatar Apr 24 '24 11:04 alfredorubin96

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 06 '24 04:05 sonarqubecloud[bot]