Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7c9ddc2
Add eslint-plugin-react-google-translate --save-dev to posthog app
havenbarnes Jan 14, 2025
c38eb3f
tweak
havenbarnes Jan 14, 2025
81f37ae
revert unnecessary diff
havenbarnes Jan 14, 2025
9f0bb17
Update UI snapshots for `chromium` (1)
github-actions[bot] Jan 14, 2025
9906978
tweak
havenbarnes Jan 14, 2025
ab73434
Merge branch 'eslint-google-translate' of https://github.com/PostHog/…
havenbarnes Jan 14, 2025
97b473f
Update UI snapshots for `chromium` (2)
github-actions[bot] Jan 14, 2025
5e64c25
Update UI snapshots for `chromium` (1)
github-actions[bot] Jan 14, 2025
6f28598
tweak
havenbarnes Jan 14, 2025
83591f1
Merge branch 'eslint-google-translate' of https://github.com/PostHog/…
havenbarnes Jan 14, 2025
4068aed
Merge branch 'master' into eslint-google-translate
havenbarnes Jan 14, 2025
4825fe9
Merge branch 'master' of https://github.com/PostHog/posthog into esli…
havenbarnes Jan 14, 2025
03b3cce
Merge branch 'eslint-google-translate' of https://github.com/PostHog/…
havenbarnes Jan 14, 2025
393eaea
Merge branch 'master' into eslint-google-translate
havenbarnes Jan 15, 2025
1dcbb75
Merge branch 'master' into eslint-google-translate
havenbarnes Jan 15, 2025
a26cb26
Merge branch 'master' into eslint-google-translate
havenbarnes Jan 15, 2025
c036a12
Update UI snapshots for `chromium` (2)
github-actions[bot] Jan 15, 2025
1e51239
Update UI snapshots for `chromium` (1)
github-actions[bot] Jan 15, 2025
9169cb5
Merge branch 'master' of https://github.com/PostHog/posthog into esli…
havenbarnes Jan 15, 2025
468e83a
Merge branch 'eslint-google-translate' of https://github.com/PostHog/…
havenbarnes Jan 15, 2025
449d6a9
revert old screenshots, trigger another run
havenbarnes Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = {
'simple-import-sort',
'import',
'unused-imports',
'react-google-translate',
],
rules: {
'react-hooks/rules-of-hooks': 'error',
Expand Down Expand Up @@ -273,6 +274,8 @@ module.exports = {
},
],
'no-else-return': 'warn',
'react-google-translate/no-conditional-text-nodes-with-siblings': 'warn',
'react-google-translate/no-return-text-nodes': 'warn',
},
overrides: [
{
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/scenes/feature-flags/FeatureFlag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ export function FeatureFlag({ id }: { id?: string } = {}): JSX.Element {
: null
}
>
{featureFlag.deleted ? 'Restore' : 'Delete'} feature flag
<span>{featureFlag.deleted ? 'Restore' : 'Delete'}</span>{' '}
<span>feature flag</span>
</LemonButton>
</>
}
Expand Down Expand Up @@ -938,7 +939,7 @@ function FeatureFlagRollout({ readOnly }: { readOnly?: boolean }): JSX.Element {
<code>true</code>
</strong>
)}{' '}
if they match one or more release condition groups.
<span>if they match one or more release condition groups.</span>
</div>
</div>
)}
Expand Down
43 changes: 25 additions & 18 deletions frontend/src/scenes/feature-flags/FeatureFlagReleaseConditions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,26 @@ export function FeatureFlagReleaseConditions({
(val, idx) => (
<LemonSnack key={idx}>
{val}
{isPropertyFilterWithOperator(property) &&
['is_date_before', 'is_date_after'].includes(property.operator) &&
dateStringToComponents(String(val)) // check it's a relative date
? ` ( ${dateFilterToText(
String(val),
undefined,
'',
[],
false,
String(val).slice(-1) === 'h'
? 'MMMM D, YYYY HH:mm:ss'
: 'MMMM D, YYYY',
true
)} )`
: ''}
<span>
{isPropertyFilterWithOperator(property) &&
['is_date_before', 'is_date_after'].includes(
property.operator
) &&
dateStringToComponents(String(val)) // check it's a relative date
? ` ( ${dateFilterToText(
String(val),
undefined,
'',
[],
false,
String(val).slice(-1) === 'h'
? 'MMMM D, YYYY HH:mm:ss'
: 'MMMM D, YYYY',
true
)}{' '}
)`
: ''}
</span>
</LemonSnack>
)
)
Expand Down Expand Up @@ -279,8 +284,10 @@ export function FeatureFlagReleaseConditions({
>
<div className="text-sm ">
Rolled out to{' '}
<b>{group.rollout_percentage != null ? group.rollout_percentage : 100}%</b> of{' '}
<b>{aggregationTargetName}</b> in this set.{' '}
{group.rollout_percentage != null ? <b>{group.rollout_percentage}</b> : <b>100</b>}
<b>%</b>
<span> of </span>
<b>{aggregationTargetName}</b> <span>in this set.</span>
</div>
</LemonTag>
) : (
Expand Down Expand Up @@ -344,7 +351,7 @@ export function FeatureFlagReleaseConditions({
}
return ''
})()}{' '}
of total {aggregationTargetName}.
<span>of total {aggregationTargetName}.</span>
</div>
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-posthog": "link:./eslint-rules",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-google-translate": "^0.0.114",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-storybook": "^0.6.15",
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading