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

handle validate for choices #4793

Merged
merged 10 commits into from
Nov 13, 2024
Merged

handle validate for choices #4793

merged 10 commits into from
Nov 13, 2024

Conversation

haroun
Copy link
Contributor

@haroun haroun commented Nov 1, 2024

Summary

Log only errors for visible fields + wait for choices to trigger validate

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@haroun haroun self-assigned this Nov 1, 2024
@haroun haroun marked this pull request as ready for review November 4, 2024 11:00
@haroun haroun requested review from ValJed and boutell November 4, 2024 11:13
Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

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

Just would like @boutell opinion on a point.

@@ -656,6 +673,9 @@ module.exports = {
continue;
}
}
if (isParentVisible === false) {
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@boutell Would like your opinion on that:
In this file just before line 672 we add default value to hidden fields.
If this is necessary, I suppose that we should do the same thing when a parent is hidden?
WDYT?

Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

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

I agree with val, not visible is not visible, so apply the same policy re: supplying a default but only if the value is not valid for the field already (e.g. reuse that code in both not-visible situations)

@haroun
Copy link
Contributor Author

haroun commented Nov 11, 2024

* main:
  fix vue warnings (#4797)
  Pro 6694 breakpoint preview vite ready (#4789)
  Resolve yaml dependency conflicts (#4801)
  PRO-6775: External frontend support, docs cleanup (#4799)
  sort glob result (#4796)
  HMR condition argument and widget player fix (#4794)
  fix permission grid tooltip display (#4792)
  Fix extra bundle detection (#4791)
  release 4.9.0 (#4788)
  Pro 6535 revision (#4787)
@haroun haroun requested review from ValJed and boutell November 11, 2024 15:21
ValJed
ValJed previously approved these changes Nov 11, 2024
Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

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

LGTM

boutell
boutell previously approved these changes Nov 11, 2024
@haroun haroun dismissed stale reviews from boutell and ValJed via 98750d4 November 12, 2024 15:19
@haroun haroun requested a review from ValJed November 13, 2024 08:49
Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

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

LGTM, Might be improved in the future.

@haroun haroun merged commit 7a7f8a4 into main Nov 13, 2024
9 checks passed
@haroun haroun deleted the pro-6528-handle-errors-validate branch November 13, 2024 10:35
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.

3 participants