Skip to content

[MDS-6580] Add variable condition box#3660

Merged
sggerard merged 9 commits intodevelopfrom
mds-6580-add-variable-condition-box
Sep 5, 2025
Merged

[MDS-6580] Add variable condition box#3660
sggerard merged 9 commits intodevelopfrom
mds-6580-add-variable-condition-box

Conversation

@sggerard
Copy link
Contributor

@sggerard sggerard commented Aug 27, 2025

Objective

MDS-6580

Add variable condition box to PermitConditionViewEdit and only show it when editing NOW condition and StandardPermitConditions.
Have renamed the old menu to VariableConditionMenuOld.js
Added back highlighting.
Inserts the variable at the mouse cursor position

Please pull the branch and have a play around let me know your thoughts!

image image image

@sggerard sggerard added the 👍 Ready for review Pull request has been double checked by the author and is ready for comments and feedback. label Sep 3, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

Quality Gate Passed Quality Gate passed for 'bcgov-sonarcloud_mds_minespace-web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_common'

Failed conditions
47.9% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2025

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-web'

Failed conditions
51.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sggerard sggerard requested a review from matbusby-fw September 4, 2025 16:39
if (!isPreambleText) {
await dispatch(change(conditionForm, "condition", newText));
} else {
await dispatch(change(FORM.GENERATE_PERMIT, "preamble_text", newText));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be tempted to pass in formName/fieldName if there's no other differences between the two cases (and especially if the typing isn't all that important).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isPreambleText is also used on line 38 for fetching the text

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Played with it a bit, and it looks like it's working great!

@sggerard sggerard merged commit b8b1e73 into develop Sep 5, 2025
16 of 18 checks passed
@sggerard sggerard deleted the mds-6580-add-variable-condition-box branch September 5, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👍 Ready for review Pull request has been double checked by the author and is ready for comments and feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants