Skip to content

Conversation

@nathalieArnoux
Copy link
Contributor

@nathalieArnoux nathalieArnoux commented Feb 2, 2026

What does this PR do?

Related to: #vel-7099

This PR aims at adding the option to handle different states on the OSS::Banner component.

The feedbackMessage parameter includes a type (error || warning || success) and a value.
It lets us display a message under the banner, based off of its value, while its type changes the font color of the message & the border color of the banner accordingly.

The hasError parameter lets us display a red border on the banner without the need to pass a feedback message.

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
Scoped to UI component styling/templating with added tests; main risk is visual/layout regressions due to new absolute-positioned feedback message and margin changes.

Overview
OSS::Banner now supports two new inputs: @hasError to force an error border, and @feedbackMessage ({type: 'error' | 'warning' | 'success', value}) to show a message below the banner and apply matching border + text colors.

This adds validation/shared FEEDBACK_TYPES, new banner border modifier classes (upf-banner--error|warning|success), and layout tweaks (relative positioning + extra bottom margin/absolute-positioned feedback text). Storybook, dummy app examples, and integration tests were updated to cover the new states and invalid feedback types.

Written by Cursor Bugbot for commit b881523. 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
@@ -1,4 +1,6 @@
.upf-banner {
position: relative;
Copy link
Member

Choose a reason for hiding this comment

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

Same kind of comment as on the initial PR, this might have a negative impact on existing usages.

I'm guessing it was required because in the template, you included the upf-banner--feedback within the scope of the "banner" div ?
How about putting it outside ?

Copy link
Member

Choose a reason for hiding this comment

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

Come to think of it, I'm unsure we can go around this and that's probably why you added it in ^^

Using relative here, can you check how everything is working in upfluence-web ? 🙏
I think Olympe had found a spot which was breaking to the initial changes from her PR, check if it's the case with this new implementation and also with other banners?

Copy link
Member

@Miexil Miexil Feb 3, 2026

Choose a reason for hiding this comment

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

if it does end up messing things up, I have a final idea which would be to use a pseudo-element and inserting the feedback message into the content attribute

Copy link
Contributor

Choose a reason for hiding this comment

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

The spot where it was breaking was in workflow > campaign > select an influencer > export selection 😉

plain?: boolean;
selected?: boolean;
disabled?: boolean;
hasError?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Open question, why using a hasError now? The feedbackMessage can take a undefined for value

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like in the current typing

export type FeedbackMessage = {
type: 'error' | 'warning' | 'success';
value: string;
};
, value is a required string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The project requires being able to display a red border with AND without having a feedback message under (see here).
As Antoine pointed out, the feedbackMessage value isn't defined as being optional, so I added the @hasError parameter we've used on other OSS components to tackled this need 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

We did a change in the feature/payment-requests-onboarding-rework branch to set value undefined and more this types all a "global" one

https://github.com/upfluence/oss-components/blob/feature/payment-requests-onboarding-rework/addon/types.ts

plain?: boolean;
selected?: boolean;
disabled?: boolean;
hasError?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like in the current typing

export type FeedbackMessage = {
type: 'error' | 'warning' | 'success';
value: string;
};
, value is a required string

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.

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.

7 participants