Skip to content

Added feedbackMessage & hasError paramaters to OSS::Banner#632

Open
nathalieArnoux wants to merge 10 commits intomasterfrom
na/vel-7099
Open

Added feedbackMessage & hasError paramaters to OSS::Banner#632
nathalieArnoux wants to merge 10 commits intomasterfrom
na/vel-7099

Conversation

@nathalieArnoux
Copy link
Contributor

@nathalieArnoux nathalieArnoux commented Feb 2, 2026

What does this PR do?

Related to: #vel-7099

This PR adds support for multiple states to the OSS::Banner component.

It introduces a feedbackMessage parameter composed of:

  • a type (error, warning, or success)
  • a soon-to-be optional value (see discussion)

When provided, feedbackMessage.value is displayed under the banner. The type controls both the message text color and the banner’s border color.

Making value optional allows the banner to display a state-specific border (e.g. red for errors) without showing any feedback message when needed.

What are the observable changes?

image

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Migrated touched components to Glimmer Components
  • Properly labeled

Note

Low Risk
UI-only changes to a single component with added tests; main risk is minor layout/CSS regressions due to new absolute-positioned feedback text and margin adjustments.

Overview
OSS::Banner now accepts an optional @feedbackMessage (typed as error | warning | success) that, when valid, applies a matching border state class and optionally renders a color-coded feedback line below the banner.

Styling is updated to support the new state borders and to position the feedback text beneath the banner (with extra bottom margin when a message value exists). Storybook/dummy examples and integration tests are expanded to cover valid/invalid types and the “border-only” case when a type is provided without a value.

Written by Cursor Bugbot for commit 29e4bc8. This will update automatically on new commits. Configure here.

@nathalieArnoux nathalieArnoux self-assigned this Feb 2, 2026
@linear
Copy link

linear bot commented Feb 2, 2026

@nathalieArnoux nathalieArnoux marked this pull request as ready for review February 2, 2026 17:08
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

import { hbs } from 'ember-cli-htmlbars';

const COMPONENT_SIZES = ['sm', 'md', 'lg'];
const FEEDBACK_TYPES = ['error', 'warning', 'success'];
Copy link

Choose a reason for hiding this comment

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

Duplicated FEEDBACK_TYPES constant instead of importing existing export

Low Severity

FEEDBACK_TYPES is defined locally as ['error', 'warning', 'success'] when an identical constant is already exported from input-container.ts. The banner component correctly imports this constant from there, but the stories file duplicates it. If the feedback types ever change, this would require updates in two places. This was noted in the PR discussion by @aprentout.

Fix in Cursor Fix in Web

Copy link
Contributor

@Elodie-DeMatteis-Upf Elodie-DeMatteis-Upf left a comment

Choose a reason for hiding this comment

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

LGTM ✅

Comment on lines +5 to +6
export const FEEDBACK_TYPES = ['error', 'warning', 'success'] as const;
export type FeedbackType = (typeof FEEDBACK_TYPES)[number];
Copy link
Member

Choose a reason for hiding this comment

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

timing issue unfortunately but these are part of Julien's PR in a feature branch :/ master...feature/payment-requests-onboarding-rework#diff-e82ea2dc4d859aebea4660d81f00a6d1aeea567b35c5541748aeb1b478065ad2R1

@JulienVannier66 once this once is merged, can you update the typings on your PRs ? 🙏🏾

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes no problem, I will fix the conflict with the branch. I think this one will be merged before my feature branch

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants