Skip to content

Commit

Permalink
Plans: Use consistent font size & padding for features between treatm…
Browse files Browse the repository at this point in the history
…ents (#94651)
  • Loading branch information
oswian authored Sep 18, 2024
1 parent a10dd90 commit 48a25ae
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 27 deletions.
3 changes: 0 additions & 3 deletions client/my-sites/plans-features-main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,6 @@ const PlansFeaturesMain = ( {
enableCategorisedFeatures={
simplifiedFeaturesGridExperimentVariant === 'simplified'
}
enableLargeFeatureTitles={
simplifiedFeaturesGridExperimentVariant === 'simplified'
}
enableStorageAsBadge={
simplifiedFeaturesGridExperimentVariant !== 'simplified'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ export const FewerFeaturesExperimentTreatmentVariantB = {
intent: 'plans-default-wpcom',
isInSignup: true,
enableCategorisedFeatures: true,
enableLargeFeatureTitles: true,
enableStorageAsBadge: false,
enableReducedFeatureGroupSpacing: true,
enableLogosOnlyForEnterprisePlan: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => {
className,
enableFeatureTooltips,
enableCategorisedFeatures,
enableLargeFeatureTitles,
enableStorageAsBadge,
enableReducedFeatureGroupSpacing,
enableLogosOnlyForEnterprisePlan,
Expand Down Expand Up @@ -425,7 +424,6 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => {
allFeaturesList={ allFeaturesList }
enableFeatureTooltips={ enableFeatureTooltips }
enableCategorisedFeatures={ enableCategorisedFeatures }
enableLargeFeatureTitles={ enableLargeFeatureTitles }
enableStorageAsBadge={ enableStorageAsBadge }
enableReducedFeatureGroupSpacing={ enableReducedFeatureGroupSpacing }
enableLogosOnlyForEnterprisePlan={ enableLogosOnlyForEnterprisePlan }
Expand Down
12 changes: 1 addition & 11 deletions packages/plans-grid-next/src/components/features-grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@
.plan-features-2023-grid__highlighted-feature .plan-features-2023-grid__item {
padding-bottom: 24px;
}

.plans-grid-next-features-grid__feature-group-row {
&.is-reduced-feature-group-spacing > .plan-features-2023-grid__table-item {
padding-top: 0;
}
}
}

.plan-features-2023-grid__table {
Expand Down Expand Up @@ -332,7 +326,7 @@
}

&.is-reduced-feature-group-spacing > .plan-features-2023-grid__table-item {
padding-top: 16px;
padding-top: 0;
}
}

Expand All @@ -359,10 +353,6 @@
@include plans-grid-medium-large {
font-size: $font-body-extra-small;
line-height: 16px;

&.is-large {
font-size: $font-body-small;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions packages/plans-grid-next/src/components/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const PlanFeatures2023GridFeatures: React.FC< {
setActiveTooltipId,
} ) => {
const translate = useTranslate();
const { enableFeatureTooltips, enableLargeFeatureTitles } = usePlansGridContext();
const { enableFeatureTooltips } = usePlansGridContext();

return (
<>
Expand Down Expand Up @@ -106,7 +106,6 @@ const PlanFeatures2023GridFeatures: React.FC< {
} );
const itemTitleClasses = clsx( 'plan-features-2023-grid__item-title', {
'is-bold': isHighlightedFeature,
'is-large': enableLargeFeatureTitles,
} );

return (
Expand Down
3 changes: 0 additions & 3 deletions packages/plans-grid-next/src/grid-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ interface PlansGridContext {
* for rendering features with categories based on available/associated feature group map.
*/
enableCategorisedFeatures?: boolean;
enableLargeFeatureTitles?: boolean;
enableStorageAsBadge?: boolean;
enableReducedFeatureGroupSpacing?: boolean;
enableLogosOnlyForEnterprisePlan?: boolean;
Expand All @@ -46,7 +45,6 @@ const PlansGridContextProvider = ( {
coupon,
enableFeatureTooltips,
enableCategorisedFeatures,
enableLargeFeatureTitles,
enableStorageAsBadge,
enableReducedFeatureGroupSpacing,
enableLogosOnlyForEnterprisePlan,
Expand Down Expand Up @@ -79,7 +77,6 @@ const PlansGridContextProvider = ( {
coupon,
enableFeatureTooltips,
enableCategorisedFeatures,
enableLargeFeatureTitles,
enableStorageAsBadge,
enableReducedFeatureGroupSpacing,
enableLogosOnlyForEnterprisePlan,
Expand Down
5 changes: 0 additions & 5 deletions packages/plans-grid-next/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,6 @@ export type GridContextProps = {
*/
enableCategorisedFeatures?: boolean;

/**
* Display the feature titles with a slightly larger font size
*/
enableLargeFeatureTitles?: boolean;

/**
* Display the plan storage limit as a badge like "50GB" or as plain text like "50GB storage"
*/
Expand Down

0 comments on commit 48a25ae

Please sign in to comment.