Skip to content

feat: added @suffixIcon arg to oss::button#639

Draft
OwenCoogan wants to merge 5 commits intomasterfrom
oc/suffix-icon-on-oss-button
Draft

feat: added @suffixIcon arg to oss::button#639
OwenCoogan wants to merge 5 commits intomasterfrom
oc/suffix-icon-on-oss-button

Conversation

@OwenCoogan
Copy link
Contributor

@OwenCoogan OwenCoogan commented Feb 12, 2026

What does this PR do?

Capture d’écran 2026-02-12 à 17 37 47

Related to: #

What are the observable changes?

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

@linear
Copy link

linear bot commented Feb 13, 2026

Copy link

@edouardmisset edouardmisset left a comment

Choose a reason for hiding this comment

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

Good job.

I'm still unsure about the different gaps between the prefix and suffix but the design team will have the final word.

Also take this review with a grain of salt as I don't have a whole lot of context on OSS::Buttons

Couple of small questions.

Comment on lines 53 to 56
test('it applies margin-left-px-6 to suffix icon when label is present', async function (assert) {
await render(hbs`<OSS::Button @label="Test" @suffixIcon="fas fa-chevron-down" />`);

assert.dom('.upf-btn i.fa-chevron-down').hasClass('margin-left-px-12');

Choose a reason for hiding this comment

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

question: Is it 12px or 6px ? I'm confused.

Suggested change
test('it applies margin-left-px-6 to suffix icon when label is present', async function (assert) {
await render(hbs`<OSS::Button @label="Test" @suffixIcon="fas fa-chevron-down" />`);
assert.dom('.upf-btn i.fa-chevron-down').hasClass('margin-left-px-12');
test('it applies margin-left-px-12 to suffix icon when label is present', async function (assert) {
await render(hbs`<OSS::Button @label="Test" @suffixIcon="fas fa-chevron-down" />`);
assert.dom('.upf-btn i.fa-chevron-down').hasClass('margin-left-px-12');

Comment on lines +217 to +222
export const WithSuffixIcon = Template.bind({});
WithSuffixIcon.args = {
...defaultArgs,
...{
suffixIcon: 'fas fa-chevron-down'
}

Choose a reason for hiding this comment

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

question: Should it be suffix only? Or is it intended to be prefix and suffix icons?

Suggested change
export const WithSuffixIcon = Template.bind({});
WithSuffixIcon.args = {
...defaultArgs,
...{
suffixIcon: 'fas fa-chevron-down'
}
export const WithPrefixAndSuffixIcon = Template.bind({});
WithSuffixIcon.args = {
...defaultArgs,
...{
suffixIcon: 'fas fa-chevron-down'
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Imo suffix is sufficient here, the goal is just to have an example of usage available in storybook

Comment on lines +217 to +222
export const WithSuffixIcon = Template.bind({});
WithSuffixIcon.args = {
...defaultArgs,
...{
suffixIcon: 'fas fa-chevron-down'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Imo suffix is sufficient here, the goal is just to have an example of usage available in storybook

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.

5 participants