Skip to content

Conversation

@aleksandernsilva
Copy link
Contributor

@aleksandernsilva aleksandernsilva commented May 16, 2023

Proposed changes (including videos or screenshots)

This PR fixes a situation where all required fields of the form were filled but the save button is still disabled. The cause was due to a few async validations that required a complicated combination of onSubmit and onChange validations.

The solution is running the async validations only on submit to simplify the logic.

Issue(s)

OC-697
OC-144

Steps to test or reproduce

Further comments

@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #29250 (6b993e0) into develop (6a474ff) will decrease coverage by 0.42%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #29250      +/-   ##
===========================================
- Coverage    46.67%   46.25%   -0.42%     
===========================================
  Files          697      678      -19     
  Lines        13055    12728     -327     
  Branches      2223     2216       -7     
===========================================
- Hits          6093     5887     -206     
+ Misses        6647     6520     -127     
- Partials       315      321       +6     
Flag Coverage Δ
e2e 46.23% <ø> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@aleksandernsilva aleksandernsilva marked this pull request as ready for review May 17, 2023 02:09
@aleksandernsilva aleksandernsilva requested review from a team as code owners May 17, 2023 02:09
@aleksandernsilva aleksandernsilva added this to the 6.3.0 milestone May 17, 2023
KevLehman
KevLehman previously approved these changes May 23, 2023
@aleksandernsilva aleksandernsilva changed the title fix: Changed contact form validation mode to onBlur fix: Changed contact form async validations to onSubmit May 24, 2023
@changeset-bot
Copy link

changeset-bot bot commented May 24, 2023

🦋 Changeset detected

Latest commit: 6b993e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@KevLehman KevLehman requested a review from a team as a code owner May 24, 2023 17:32
KevLehman
KevLehman previously approved these changes May 25, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels May 26, 2023
@KevLehman KevLehman removed the stat: ready to merge PR tested and approved waiting for merge label May 26, 2023
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 26, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels May 26, 2023
@kodiakhq kodiakhq bot merged commit 0c34904 into develop May 26, 2023
@kodiakhq kodiakhq bot deleted the fix/contact-form-validation branch May 26, 2023 16:46
gabriellsh added a commit that referenced this pull request May 26, 2023
…ove/mentions

* 'develop' of github.com:RocketChat/Rocket.Chat: (48 commits)
  fix: Changed contact form async validations to onSubmit (#29250)
  refactor: Omnichannel Department re-write (#28948)
  feat: Added attachments to contact history message list (#29336)
  fix: Clicking uploaded file title replaces current tab (#29174)
  fix: broken error messages on room.saveInfo & missing CF validations on omni/contact api (#28367)
  regression: Missing loading indicator (#29374)
  fix: Added check if count is truthy on `cleanRoomHistory` (#28081)
  chore: small tricks with keys and invalidations with marketplace page (#29369)
  fix: Missing await on agent leave action (#29358)
  refactor: useQuery for Marketplace Lists (#29348)
  test: add missing omnichannel contact-center tests (#28989)
  ci: omit vite log (#29360)
  chore: update `status-warning-2` color (#29321)
  fix: File upload in Safari, IOS devices (#27121)
  chore: update status-bullet colors (#29316)
  chore: `Contextualbar` empty state consistency (#29341)
  chore(deps-dev): Bump @storybook/source-loader from 6.5.15 to 6.5.16 (#27866)
  feat(apps): Disabling apps on trial license expiration (#29037)
  chore(deps-dev): Bump @storybook/manager-webpack4 from 6.5.15 to 6.5.16 (#27865)
  chore(deps-dev): Bump @storybook/addon-actions from 6.5.15 to 6.5.16 (#27917)
  ...
gabriellsh added a commit that referenced this pull request May 26, 2023
…memberList

* 'develop' of github.com:RocketChat/Rocket.Chat: (30 commits)
  fix: Changed contact form async validations to onSubmit (#29250)
  refactor: Omnichannel Department re-write (#28948)
  feat: Added attachments to contact history message list (#29336)
  fix: Clicking uploaded file title replaces current tab (#29174)
  fix: broken error messages on room.saveInfo & missing CF validations on omni/contact api (#28367)
  regression: Missing loading indicator (#29374)
  fix: Added check if count is truthy on `cleanRoomHistory` (#28081)
  chore: small tricks with keys and invalidations with marketplace page (#29369)
  fix: Missing await on agent leave action (#29358)
  refactor: useQuery for Marketplace Lists (#29348)
  test: add missing omnichannel contact-center tests (#28989)
  ci: omit vite log (#29360)
  chore: update `status-warning-2` color (#29321)
  fix: File upload in Safari, IOS devices (#27121)
  chore: update status-bullet colors (#29316)
  chore: `Contextualbar` empty state consistency (#29341)
  chore(deps-dev): Bump @storybook/source-loader from 6.5.15 to 6.5.16 (#27866)
  feat(apps): Disabling apps on trial license expiration (#29037)
  chore(deps-dev): Bump @storybook/manager-webpack4 from 6.5.15 to 6.5.16 (#27865)
  chore(deps-dev): Bump @storybook/addon-actions from 6.5.15 to 6.5.16 (#27917)
  ...
hugocostadev pushed a commit that referenced this pull request May 30, 2023
Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad: omnichannel stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants