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

FIO-7778: validation link does not open modal #5725

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

ZenMasterJacob20011
Copy link
Contributor

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-7778

Description

What changed?

Made it so that when a component validation error is clicked that is nested within a editgrid with modal turned on it will open the editgrids modal to display validation error

Breaking Changes / Backwards Compatibility

N/A

Dependencies

N/A

How has this PR been tested?

manually tested and automated tests

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

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

  1. Is this a new feature or does it behave like this in 4.x and not in 5.x?
  2. We check for the existence of parent refs, does that guarantee existence of parent.componentModal?

@ZenMasterJacob20011
Copy link
Contributor Author

  1. This seems to be a new feature. Had a meeting with Dane and was told that this is expected behavior. Although I am looking into it further now and it seems to me that this was tested incorrectly. I am able to open the modal in an edit grid only if the "Display as Modal" is checked under the template tag in the edit grid options. This does not seem to be what is shown in the video as it looks like in the video that the "Modal Edit" checkbox is checked. I'll ask Dane about tomorrow.
  2. The existence of parent.refs.openModal should mean that the parent has a componentModal object attached to itself. I can change it to if(this.parent.componentModal) to guarantee an error of cannot call componentModal on undefined won't occur

@brendanbond
Copy link
Contributor

brendanbond commented Aug 6, 2024

This seems to be a new feature. Had a meeting with Dane and was told that this is expected behavior. Although I am looking into it further now and it seems to me that this was tested incorrectly. I am able to open the modal in an edit grid only if the "Display as Modal" is checked under the template tag in the edit grid options. This does not seem to be what is shown in the video as it looks like in the video that the "Modal Edit" checkbox is checked. I'll ask Dane about tomorrow.

Sounds good

The existence of parent.refs.openModal should mean that the parent has a componentModal object attached to itself. I can change it to if(this.parent.componentModal) to guarantee an error of cannot call componentModal on undefined won't occur

Or better yet (if we used TS we wouldn't have to deal with this) if (this.parent.refs.openModal && this.parent.componentModal) but whatever you think is best

@brendanbond brendanbond merged commit 2280d2c into master Sep 5, 2024
5 checks passed
@brendanbond brendanbond deleted the FIO-7778-validation-link-does-not-open-modal branch September 5, 2024 15:27
lane-formio pushed a commit that referenced this pull request Oct 22, 2024
…t-open-modal

FIO-7778: validation link does not open modal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants