Skip to content

types#602

Merged
alexanderkirtzel merged 4 commits intomainfrom
website-types
Feb 19, 2026
Merged

types#602
alexanderkirtzel merged 4 commits intomainfrom
website-types

Conversation

@alexanderkirtzel
Copy link
Collaborator

@alexanderkirtzel alexanderkirtzel commented Feb 18, 2026

Summary by CodeRabbit

  • Refactor

    • Simplified and standardized site tagging/analytics attributes and action naming for more consistent tracking.
    • Adjusted analytics initialization for improved robustness.
    • Updated the showcased version text to "Just shipped v2.0".
  • New Features

    • CTA now accepts an optional title and a new text prop, allowing flexible heading content.
  • Chores

    • Added the website workspace to project configuration.

@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
demo-tagging Ready Ready Preview, Comment Feb 19, 2026 9:23am
storybook Error Error Feb 19, 2026 9:23am
website Ready Ready Preview, Comment Feb 19, 2026 9:23am

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Refactors the site tagger API to return plain attribute objects (removing .get()), updates consumer components to spread the new shapes and use concatenated action strings, makes CTA title optional with a new text prop, tweaks walker init typing and FlowMapProps annotation, and adds website to package.json workspaces.

Changes

Cohort / File(s) Summary
Tagger Core
website/src/components/walkerjs.tsx
Changed tagger methods (entity, action, property, context, globals) to return plain attribute objects (e.g., { 'data-alst': ... }) instead of wrapper objects with .get(). Signatures simplified to accept final value forms.
Tagger Consumers
website/src/components/organisms/.../benefits.tsx, website/src/components/organisms/.../features.tsx, website/src/components/organisms/.../gettingStarted.tsx, website/src/components/organisms/.../hero.tsx
Removed .get() calls, switched action calls from multi-arg forms to single concatenated strings (e.g., 'visible:impression'), and updated spreads to use the direct attribute objects.
CTA Props Change
website/src/components/organisms/cta.tsx
Made title optional (title?: ReactNode) and added text?: ReactNode; component computes `const heading = title
Home & Preview Updates
website/src/components/home/integrations.tsx, website/src/components/molecules/preview.tsx
Annotated integrations configs as Record<Mode, FlowMapProps> and changed walker init invocation typing to (window.elb as Function)('walker init', elem).
Workspace Manifest
package.json
Added website to the Yarn workspaces array.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • action vs actions #536: Modifies tagger API and how action attributes are produced; closely related to tagger signature/shape changes.
  • types #602: Applies similar consumer-side updates and FlowMapProps typing adjustments found in this change.
  • Blog 2.0 #525: Touches walkerjs-related code and window.walkerjs existence checks; relevant to tagger/initialization adjustments.

Poem

🐰 I hopped through props and tidy tags,

No more get() — just plain flags.
Spreads now sing, attributes clear,
CTA listens when text draws near.
A tiny hop for cleaner cheer.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'types' is vague and generic, using a non-descriptive term that does not convey meaningful information about the changeset despite the PR involving multiple API refactorings. Use a more descriptive title that captures the main change, such as 'Refactor tagger API to return plain objects instead of wrapper objects with get()' or 'Simplify tagger API by removing .get() indirection'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch website-types

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
website/src/components/organisms/hero.tsx (1)

153-155: Default elbAction produces click:click — intentional?

When elbAction is not provided, the fallback 'click' results in the action value click:click. If the intent is "trigger=click, action_type=click", this is fine. If it should just be click, consider whether the format should differ for the default case. Same pattern appears in cta.tsx line 55/65.

Also applies to: 165-167

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@website/src/components/organisms/hero.tsx` around lines 153 - 155, The
current code always builds the action string as `click:${primaryButton.elbAction
|| 'click'}` which yields `click:click` when elbAction is absent; change the
logic so that if primaryButton.elbAction is present you produce
`click:<elbAction>` but if it's absent you produce just `click` (i.e. use a
conditional or helper to return primaryButton.elbAction ?
`click:${primaryButton.elbAction}` : 'click'); apply the same fix for the other
occurrence(s) that use tagger.action with secondaryButton.elbAction and in the
corresponding cta component occurrences (the places that currently use
`click:${... || 'click'}`).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@website/src/components/organisms/cta.tsx`:
- Around line 5-7: The CTA component allows both CTAProps.title and
CTAProps.text to be optional so heading can become undefined and render an empty
<h2>; update the component to guard rendering of the heading (the computed
heading value and the <h2> element) by only rendering the <h2> when heading is
truthy, or change CTAProps to require at least one of title or text (e.g., a
union type) so heading cannot be undefined; locate the CTAProps interface and
the heading variable and modify either the props type or wrap the <h2> render in
a conditional similar to the existing description block.

---

Nitpick comments:
In `@website/src/components/organisms/hero.tsx`:
- Around line 153-155: The current code always builds the action string as
`click:${primaryButton.elbAction || 'click'}` which yields `click:click` when
elbAction is absent; change the logic so that if primaryButton.elbAction is
present you produce `click:<elbAction>` but if it's absent you produce just
`click` (i.e. use a conditional or helper to return primaryButton.elbAction ?
`click:${primaryButton.elbAction}` : 'click'); apply the same fix for the other
occurrence(s) that use tagger.action with secondaryButton.elbAction and in the
corresponding cta component occurrences (the places that currently use
`click:${... || 'click'}`).

@github-actions
Copy link
Contributor

Preview deployed

https://walkeros-io.b-cdn.net/preview/pr-602/

@aws-amplify-eu-central-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-602.d27uka2p9i8zm5.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant