Skip to content

feat(horizontal-stepper): new TEDI-ready component #405#410

Closed
mart-sessman wants to merge 0 commit into
rcfrom
feat/405-horizontal-stepper-tedi-ready
Closed

feat(horizontal-stepper): new TEDI-ready component #405#410
mart-sessman wants to merge 0 commit into
rcfrom
feat/405-horizontal-stepper-tedi-ready

Conversation

@mart-sessman
Copy link
Copy Markdown
Contributor

@mart-sessman mart-sessman commented Apr 15, 2026

Summary by CodeRabbit

  • New Features
    • Added a horizontal stepper component for multi-step navigation flows
    • Steps display indicators (numbers, completion checkmarks, error icons) based on state
    • Support for optional step descriptions
    • Steps emit selection events when clicked
    • Configurable background styling options (default or transparent)
    • Responsive design with adaptive layout on mobile devices

@mart-sessman
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • rc
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0cef8696-0f6b-4918-8118-24ce14788877

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new horizontal stepper navigation component is introduced, consisting of a parent HorizontalStepperComponent that manages step numbering and a child HorizontalStepperItemComponent that renders individual steps with support for completed, error, and selected states. Includes templates, styles, comprehensive unit tests, and Storybook stories.

Changes

Cohort / File(s) Summary
HorizontalStepperItemComponent
tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.ts, horizontal-stepper-item.component.html, horizontal-stepper-item.component.scss, horizontal-stepper-item.component.spec.ts, index.ts
New item component with inputs for label, description, completed, error, and selected states. Renders clickable button with conditional icon/number display and content projection. Includes responsive SCSS with state-dependent styling (selected, completed, error modifiers) and comprehensive unit tests covering DOM rendering, state classes, icon display, and event emission.
HorizontalStepperComponent
tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.ts, horizontal-stepper.component.html, horizontal-stepper.component.scss, horizontal-stepper.component.spec.ts
New parent container component with ariaLabel and background inputs. Uses contentChildren() and effect to dynamically assign step numbers to child items. Adds minimal styling for flex layout and optional transparent background. Unit tests verify component creation, child collection, numbering, accessibility attributes, and state propagation.
Documentation & Integration
tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts, horizontal-stepper/index.ts, navigation/index.ts
Storybook stories showcasing six variants: Default, SecondStep, ThirdStep, WithErrors, WithDescriptions, and TransparentBackground. Barrel exports added to expose components through navigation and horizontal-stepper entry points.
Translations
tedi/services/translation/translations.ts
New translation key "stepper.error" with labels in Estonian, English, and Russian for screen-reader accessibility.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • ly-tempel-bitweb
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: introducing a new TEDI-ready horizontal-stepper component, which matches the comprehensive changeset covering component creation, styling, tests, and Storybook stories.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/405-horizontal-stepper-tedi-ready

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
Copy Markdown

@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 (4)
tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.ts (1)

13-26: Missing standalone: true in component decorator.

Per coding guidelines, all components must explicitly use standalone: true. While Angular 19+ defaults to standalone, the project conventions require explicit declaration for consistency.

♻️ Proposed fix
 `@Component`({
   selector: "tedi-horizontal-stepper",
+  standalone: true,
   templateUrl: "./horizontal-stepper.component.html",
   styleUrl: "./horizontal-stepper.component.scss",

As per coding guidelines: "Use standalone: true for all components".

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

In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.ts`
around lines 13 - 26, The `@Component` decorator for the horizontal stepper is
missing the required standalone: true flag; update the component decorator in
horizontal-stepper.component.ts (the `@Component` that decorates the
HorizontalStepperComponent) to include standalone: true alongside the existing
metadata so it explicitly declares the component as standalone per project
conventions.
tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts (2)

155-167: Consider binding background to args for consistency.

The TransparentBackground story hardcodes background="transparent" in the template. While this works, it means the Storybook control won't affect this story, unlike other stories that use [background]="background".

♻️ Optional fix for consistency
 export const TransparentBackground: Story = {
   render: (props) => ({
     props,
     template: `
-      <tedi-horizontal-stepper ariaLabel="Form progress" background="transparent">
+      <tedi-horizontal-stepper ariaLabel="Form progress" [background]="background">
         <tedi-horizontal-stepper-item label="Kutse" completed />
         <tedi-horizontal-stepper-item label="Tahteavaldus" selected />
         <tedi-horizontal-stepper-item label="Geenianalüüs" />
         <tedi-horizontal-stepper-item label="Vastus" />
       </tedi-horizontal-stepper>
     `,
   }),
+  args: {
+    background: "transparent",
+  },
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts`
around lines 155 - 167, The TransparentBackground story hardcodes
background="transparent" which prevents Storybook controls from altering it;
update the story render/template for TransparentBackground to bind the input to
the story arg (use [background]="background") and ensure the Story object
exposes a background arg (e.g., default value 'transparent') so the control can
modify it at runtime; locate the TransparentBackground Story definition and
change its template binding from background="transparent" to
[background]="background" and add the background arg/default to the Story
config.

10-38: Add status parameters to story metadata.

Per coding guidelines, Storybook stories should include status parameters to indicate the component's readiness state.

♻️ Proposed fix
 export default {
   title: "TEDI-Ready/Components/Navigation/HorizontalStepper",
   component: HorizontalStepperComponent,
+  parameters: {
+    status: {
+      type: "devComponent", // or 'partiallyTediReady', 'existsInTediReady' as appropriate
+    },
+  },
   decorators: [

Based on learnings: "Use status parameters in Storybook stories (e.g., partiallyTediReady, existsInTediReady, devComponent)".

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

In `@tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts`
around lines 10 - 38, Update the default export metadata for
HorizontalStepperComponent to include Storybook status parameters indicating
readiness: add a parameters block (inside the export default) with a status
value such as { type: "partiallyTediReady" } (or use
"existsInTediReady"/"devComponent" as appropriate for this component) so the
exported object for HorizontalStepperComponent contains parameters.status
alongside title/component/decorators/argTypes; ensure you modify the export
default object in horizontal-stepper.stories.ts (the object referencing
HorizontalStepperComponent and HorizontalStepperItemComponent).
tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.ts (1)

13-27: Missing standalone: true in component decorator.

Same issue as the parent component - the standalone: true property should be explicitly declared.

♻️ Proposed fix
 `@Component`({
   selector: "tedi-horizontal-stepper-item",
+  standalone: true,
   imports: [IconComponent, TediTranslationPipe],
   templateUrl: "./horizontal-stepper-item.component.html",

As per coding guidelines: "Use standalone: true for all components".

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

In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.ts`
around lines 13 - 27, The `@Component` decorator for the
"tedi-horizontal-stepper-item" component is missing standalone: true; open
horizontal-stepper-item.component.ts, locate the `@Component` block (selector:
"tedi-horizontal-stepper-item") and add standalone: true alongside the existing
imports array so the component becomes standalone (preserve existing imports:
[IconComponent, TediTranslationPipe], templateUrl, styleUrl, encapsulation,
changeDetection, and host entries); ensure the change is consistent with the
parent horizontal-stepper component.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.scss`:
- Around line 5-6: The modifier "&--transparent" in
horizontal-stepper.component.scss currently uses a hardcoded "transparent"
value; replace that hardcoded color with the appropriate design token/CSS
variable from the design system (import or reference the token from
`@tedi-design-system/core`) and apply the token to the background-color for the
&--transparent modifier so the component uses the centralized color token
instead of a literal value.

---

Nitpick comments:
In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.ts`:
- Around line 13-27: The `@Component` decorator for the
"tedi-horizontal-stepper-item" component is missing standalone: true; open
horizontal-stepper-item.component.ts, locate the `@Component` block (selector:
"tedi-horizontal-stepper-item") and add standalone: true alongside the existing
imports array so the component becomes standalone (preserve existing imports:
[IconComponent, TediTranslationPipe], templateUrl, styleUrl, encapsulation,
changeDetection, and host entries); ensure the change is consistent with the
parent horizontal-stepper component.

In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.ts`:
- Around line 13-26: The `@Component` decorator for the horizontal stepper is
missing the required standalone: true flag; update the component decorator in
horizontal-stepper.component.ts (the `@Component` that decorates the
HorizontalStepperComponent) to include standalone: true alongside the existing
metadata so it explicitly declares the component as standalone per project
conventions.

In `@tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts`:
- Around line 155-167: The TransparentBackground story hardcodes
background="transparent" which prevents Storybook controls from altering it;
update the story render/template for TransparentBackground to bind the input to
the story arg (use [background]="background") and ensure the Story object
exposes a background arg (e.g., default value 'transparent') so the control can
modify it at runtime; locate the TransparentBackground Story definition and
change its template binding from background="transparent" to
[background]="background" and add the background arg/default to the Story
config.
- Around line 10-38: Update the default export metadata for
HorizontalStepperComponent to include Storybook status parameters indicating
readiness: add a parameters block (inside the export default) with a status
value such as { type: "partiallyTediReady" } (or use
"existsInTediReady"/"devComponent" as appropriate for this component) so the
exported object for HorizontalStepperComponent contains parameters.status
alongside title/component/decorators/argTypes; ensure you modify the export
default object in horizontal-stepper.stories.ts (the object referencing
HorizontalStepperComponent and HorizontalStepperItemComponent).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 905dfafe-3f17-4f8a-9025-05693c5fdae0

📥 Commits

Reviewing files that changed from the base of the PR and between 09dbca2 and 1827098.

📒 Files selected for processing (13)
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.html
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.scss
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.spec.ts
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/horizontal-stepper-item.component.ts
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper-item/index.ts
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.html
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.scss
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.spec.ts
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.ts
  • tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts
  • tedi/components/navigation/horizontal-stepper/index.ts
  • tedi/components/navigation/index.ts
  • tedi/services/translation/translations.ts

Comment on lines +5 to +6
&--transparent {
background-color: transparent;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Replace hardcoded transparent color with a design token.

Line 6 uses transparent directly. Please map this modifier background to a design token/CSS variable from the design system instead of a hardcoded color value.

🎯 Suggested update
 .tedi-horizontal-stepper {
   display: flex;
   background-color: var(--stepper-background);

   &--transparent {
-    background-color: transparent;
+    background-color: var(--stepper-background-transparent);
   }
 }

As per coding guidelines, “Do not hardcode color values — always use design tokens from @tedi-design-system/core.”

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

In
`@tedi/components/navigation/horizontal-stepper/horizontal-stepper.component.scss`
around lines 5 - 6, The modifier "&--transparent" in
horizontal-stepper.component.scss currently uses a hardcoded "transparent"
value; replace that hardcoded color with the appropriate design token/CSS
variable from the design system (import or reference the token from
`@tedi-design-system/core`) and apply the token to the background-color for the
&--transparent modifier so the component uses the centralized color token
instead of a literal value.

@mart-sessman mart-sessman changed the base branch from feat/380-replace-ngx-float-ui to rc May 8, 2026 13:56
@mart-sessman mart-sessman force-pushed the feat/405-horizontal-stepper-tedi-ready branch from d97d995 to 5a9d803 Compare May 8, 2026 14:03
@mart-sessman mart-sessman deleted the feat/405-horizontal-stepper-tedi-ready branch May 8, 2026 14:25
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