Skip to content

Commit

Permalink
Merge pull request #1275 from CleverCloud/cc-pricing-components/fix-p…
Browse files Browse the repository at this point in the history
…roduct-type-column

refactor(cc-pricing-page-sandbox): filter out irrelevant features
  • Loading branch information
florian-sanders-cc authored Dec 6, 2024
2 parents f0c93eb + 4c7eb27 commit 2e410e4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/stories/cc-pricing-page-sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ import { ZONES } from './fixtures/zones.js';
import { createStoryItem } from './lib/make-story.js';

const BREAKPOINT = 1100;
/** @type {Array<FormattedFeature['code']>} **/
const FEATURES_TO_DISPLAY = [
'connection-limit',
'cpu',
'disk-size',
'has-logs',
'has-metrics',
'max-db-size',
'databases',
];

/**
* @typedef {import('../components/cc-pricing-page/cc-pricing-page.js').CcPricingPage} CcPricingPage
Expand All @@ -32,6 +42,7 @@ const BREAKPOINT = 1100;
* @typedef {import('../components/cc-pricing-product-consumption/cc-pricing-product-consumption.types.js').PricingProductConsumptionState} PricingProductConsumptionState
* @typedef {import('../components/common.types.js').PriceSystem} PriceSystem
* @typedef {import('../components/cc-pricing-estimation/cc-pricing-estimation.types.js').PricingEstimationStateLoaded} PricingEstimationStateLoaded
* @typedef {import('../components/common.types.js').FormattedFeature} FormattedFeature
* @typedef {import('lit/directives/ref.js').Ref<CcPricingEstimation>} RefCcPricingEstimation
* @typedef {Parameters<typeof getFullProductRuntime>[0]} RuntimeProductId
* @typedef {Parameters<typeof getFullProductAddon>[0]} AddonProductId
Expand Down Expand Up @@ -291,7 +302,7 @@ export class CcPricingPageSandbox extends LitElement {
stateType === 'loaded'
? {
type: 'loaded',
...getFullProductAddon(addonProductId, null, this._priceSystem),
...getFullProductAddon(addonProductId, FEATURES_TO_DISPLAY, this._priceSystem),
}
: { type: stateType };

Expand Down

0 comments on commit 2e410e4

Please sign in to comment.