From 03ccac96362ef23ba9648a62a23b55fe79991995 Mon Sep 17 00:00:00 2001 From: Marcus Souza Date: Thu, 1 Oct 2026 12:30:36 -0300 Subject: [PATCH] docs(pricing, first-deploy): one table component for pricing, and a split CLI path for the first deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pricing tables share one component, space like the prose blocks, and label included usage Included; the first-deploy CLI path splits into setup, login, init or link, deploy and test; the repository ignores the .working-files directory. Squashed from: - fix(pricing): space the pricing tables like the prose blocks The pricing table wrapper carried none of the prose contract's markers, so consecutive tables and the sentence before them touched. Its root now has data-doc-block and data-doc-chrome, which gives it the same outer spacing as every other doc block. - docs(first-deploy): split the CLI path into setup, login, init or link, deploy and test The "Deploy with Azion CLI" method now runs as five steps: set up the CLI with the install script, log in, initialize a project from a template or link an existing one, deploy, and test. Deploy is its own step instead of an answer inside the link prompt, and init is a step instead of a tip. The step text follows the prompts Azion CLI 4.23.0 shows: preset and template for init, link confirmation, application name and preset for link. The AI prompt and the callout follow the steps, in English and Portuguese. - docs(pricing): label included usage "Included" and render every table with one component A zero-price tier is the usage the plans include, so the pricing table component labels it "Included" ("Incluído" in Portuguese) instead of "Free"; the wording follows the public plans page. The API and its data are untouched: the label is produced when the row is built. The static markdown tables on the page (AI Inference, LoRA Fine-Tune, SQL Database, KV Store, Bot Manager profiles, support and professional services) now render through the same PricingTable component as the API-driven ones, cell by cell, so the price column starts at one position in every two-column table instead of following each table's content. Tables inside commented-out blocks stay as markdown. - chore(git): ignore the .working-files directory --- .gitignore | 2 + src/components/Table/TablePricing.astro | 17 +- src/components/webkit/PricingTable.vue | 48 +- .../en/pages/first-deploy/first-deploy.mdx | 36 +- .../en/pages/main-menu/pricing/pricing.mdx | 269 ++++++--- .../pages/menu-principal/pricing/pricing.mdx | 537 ++++++++++++------ .../pages/primeiro-deploy/primeiro-deploy.mdx | 36 +- 7 files changed, 622 insertions(+), 323 deletions(-) diff --git a/.gitignore b/.gitignore index b7d8823f1d..e62711b8c2 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ sandbox.config.json # Benchmark measurements and rework reports. These name competitors and this # repository is public, so they stay local. reports/ + +.working-files/* \ No newline at end of file diff --git a/src/components/Table/TablePricing.astro b/src/components/Table/TablePricing.astro index fee65232e5..0ba1df19f7 100644 --- a/src/components/Table/TablePricing.astro +++ b/src/components/Table/TablePricing.astro @@ -272,7 +272,7 @@ function transformData(data) { price = isReal() ? item.brazilian_real : item.american_dollar } - // Check if price is zero and replace with "Free" + // A zero price is the usage the plans include: label it instead of printing $0.00 const numericPrice = isReal() ? item.brazilian_real : item.american_dollar; const formattedPrice = isReal() ? item.brazilian_real_formatted : item.american_dollar_formatted; const isZeroPrice = numericPrice === 0 || numericPrice === '0' || numericPrice === 0.0 || numericPrice === '0.00' || @@ -281,8 +281,7 @@ function transformData(data) { parseFloat(formattedPrice) === 0; if (isZeroPrice) { - // "Free" in English, "Grátis" in Portuguese - price = lang === 'pt-br' ? 'Grátis' : 'Free'; + price = lang === 'pt-br' ? 'Incluído' : 'Included'; } else { // Normalize price to always have exactly 2 decimal places price = formatPrice(price); @@ -326,18 +325,18 @@ function transformData(data) { } }); - // Sort tiers: rows with zero prices (containing "Free" or "Grátis") come first + // Sort tiers: rows with zero prices (labeled "Included" or "Incluído") come first return sortTiersByZeroPrice(tiers); } /** * Extracts the numeric price value from a formatted price string. - * Handles formats like "0.999 USD", "R$ 0,999", "Free", "Grátis". + * Handles formats like "0.999 USD", "R$ 0,999", "Included", "Incluído". * @param {string} price - The formatted price string * @returns {number} - The numeric price value */ function extractNumericPrice(price) { - if (price === 'Free' || price === 'Grátis' || !price) { + if (price === 'Included' || price === 'Incluído' || !price) { return 0; } // Remove currency symbols and extract number @@ -362,7 +361,7 @@ function getMinPrice(prices) { /** * Sorts the tiers object so that rows with zero prices appear first, * followed by non-zero price rows in descending order (highest price first). - * A row is considered to have a zero price if any of its values is "Free" or "Grátis". + * A row is considered to have a zero price if any of its values is "Included" or "Incluído". * @param {Object} tiers - The unsorted tiers object * @returns {Object} - Sorted tiers object with zero-price rows first, then descending prices */ @@ -374,9 +373,9 @@ function sortTiersByZeroPrice(tiers) { const nonZeroPriceEntries = []; entries.forEach(([tierName, prices]) => { - // Check if any price in this row is "Free" or "Grátis" + // Check if any price in this row is "Included" or "Incluído" const hasZeroPrice = Object.values(prices).some(price => - price === 'Free' || price === 'Grátis' + price === 'Included' || price === 'Incluído' ); if (hasZeroPrice) { diff --git a/src/components/webkit/PricingTable.vue b/src/components/webkit/PricingTable.vue index 351151d992..500ba166df 100644 --- a/src/components/webkit/PricingTable.vue +++ b/src/components/webkit/PricingTable.vue @@ -1,26 +1,30 @@