Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

tjkandala
Copy link
Contributor

@felixfbecker I think that while useInputValidation's return value is starting to get ugly, most consumers don't need to override state. Should we prioritize giving consumers control, or is this change sufficient for our use cases?

@codecov
Copy link

codecov bot commented Nov 23, 2020

Codecov Report

Merging #16065 (bf14bac) into cloud-emails-redesign-15409 (09863eb) will decrease coverage by 0.00%.
The diff coverage is 18.18%.

@@                       Coverage Diff                       @@
##           cloud-emails-redesign-15409   #16065      +/-   ##
===============================================================
- Coverage                        52.40%   52.39%   -0.01%     
===============================================================
  Files                             1636     1636              
  Lines                            81664    81673       +9     
  Branches                          7141     7144       +3     
===============================================================
- Hits                             42795    42793       -2     
- Misses                           35048    35058      +10     
- Partials                          3821     3822       +1     
Flag Coverage Δ
go 52.36% <ø> (-0.01%) ⬇️
integration 28.35% <0.00%> (-0.03%) ⬇️
storybook 27.39% <22.22%> (-0.01%) ⬇️
typescript 52.46% <18.18%> (-0.03%) ⬇️
unit 34.90% <0.00%> (-0.02%) ⬇️
Impacted Files Coverage Δ
.../web/src/user/settings/emails/AddUserEmailForm.tsx 0.00% <0.00%> (ø)
...rc/user/settings/emails/UserSettingsEmailsPage.tsx 0.00% <ø> (ø)
client/shared/src/util/useInputValidation.ts 82.00% <22.22%> (-13.24%) ⬇️
...ient/web/src/search/input/LazyMonacoQueryInput.tsx 77.77% <0.00%> (-22.23%) ⬇️
.../internal/codeintel/resolvers/graphql/locations.go 83.50% <0.00%> (-2.07%) ⬇️
cmd/repo-updater/repos/types.go 74.44% <0.00%> (+0.24%) ⬆️

Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

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

I think it's fine to merge this and you should own the experience and making further changes if you think it would be better (you could file an issue on yourself and include it in our iteration plan)

value: overrideOptions?.value ?? '',
})

if (overrideOptions?.value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this prevent overriding { value: '', validate: true }?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, this should be overrideOptions?.validate, it doesn't matter what the value is

}

eventLogger.log('NewUserEmailAddressAdded')
overrideEmailState()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think requiring { value: '' } to be passed would be a bit more readable.

Copy link
Contributor

@artemruts artemruts left a comment

Choose a reason for hiding this comment

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

Thank you, TJ!

@tjkandala tjkandala merged commit 4330f6a into cloud-emails-redesign-15409 Nov 23, 2020
@tjkandala tjkandala deleted the tj/cloud-email-val branch November 23, 2020 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants