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

feat: Add logs to feature config changes [WPB-1933] #15639

Merged
merged 6 commits into from
Aug 23, 2023
Merged

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Aug 22, 2023

BugWPB-1933 [MacOS?] Notification prompts received after logging in

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #15639 (ad0c6a4) into dev (30eee06) will increase coverage by 0.14%.
Report is 3 commits behind head on dev.
The diff coverage is 84.28%.

@@            Coverage Diff             @@
##              dev   #15639      +/-   ##
==========================================
+ Coverage   43.63%   43.78%   +0.14%     
==========================================
  Files         668      669       +1     
  Lines       22627    22633       +6     
  Branches     5147     5145       -2     
==========================================
+ Hits         9873     9909      +36     
+ Misses      11502    11483      -19     
+ Partials     1252     1241      -11     

@atomrc atomrc changed the title test: Add tests for feature config changes feat: Add logs to feature config changes Aug 23, 2023
Comment on lines +94 to +100
htmlMessage: isFeatureEnabled
? isEnforced
? t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnforced', {
timeout: formatDuration(newTimeout).text,
})
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnabled')
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemDisabled'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll move this to variable to avoid complex ternary operators.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's pretty readable like this (and backed up by tests now)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll go this way:

Suggested change
htmlMessage: isFeatureEnabled
? isEnforced
? t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnforced', {
timeout: formatDuration(newTimeout).text,
})
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnabled')
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemDisabled'),
const enforcedMessage = isEnforced
? t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnforced', {
timeout: formatDuration(newTimeout).text,
})
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemEnabled');
htmlMessage: isFeatureEnabled
? enforcedMessage
: t('featureConfigChangeModalSelfDeletingMessagesDescriptionItemDisabled'),

Copy link
Contributor

@przemvs przemvs left a comment

Choose a reason for hiding this comment

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

LGTM!

@atomrc atomrc changed the title feat: Add logs to feature config changes feat: Add logs to feature config changes [WPB-1933] Aug 23, 2023
@atomrc atomrc merged commit a2d0f92 into dev Aug 23, 2023
15 checks passed
@atomrc atomrc deleted the fix/team-config-popup branch August 23, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants