Added feedbackMessage & hasError paramaters to OSS::Banner#632
Added feedbackMessage & hasError paramaters to OSS::Banner#632nathalieArnoux wants to merge 10 commits intomasterfrom
Conversation
There was a problem hiding this comment.
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']; |
There was a problem hiding this comment.
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.
| export const FEEDBACK_TYPES = ['error', 'warning', 'success'] as const; | ||
| export type FeedbackType = (typeof FEEDBACK_TYPES)[number]; |
There was a problem hiding this comment.
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 ? 🙏🏾
There was a problem hiding this comment.
Yes no problem, I will fix the conflict with the branch. I think this one will be merged before my feature branch


What does this PR do?
Related to: #vel-7099
This PR adds support for multiple states to the
OSS::Bannercomponent.It introduces a
feedbackMessageparameter composed of:type(error,warning, orsuccess)value(see discussion)When provided,
feedbackMessage.valueis displayed under the banner. Thetypecontrols both the message text color and the banner’s border color.Making
valueoptional 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?
Good PR checklist
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::Bannernow accepts an optional@feedbackMessage(typed aserror | 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.