Skip to content

Feature/feature panel - #583

Open
Bhoomi-Pipalia wants to merge 15 commits into
developfrom
feature/feature-panel
Open

Bhoomi-Pipalia wants to merge 15 commits into
developfrom
feature/feature-panel

Conversation

@Bhoomi-Pipalia

Copy link
Copy Markdown
Contributor

PR Checklist & Notes

What type of PR is this? (check all applicable)

  • New component
  • New feature
  • Refactor
  • Bug fix
  • Optimization / Build Tools
  • Documentation Update

Is this a breaking change?

If yes, please note which project will be impacted.

  • Yes
  • No

Have you made an entry in the Changelog?

If not, please make an entry or your PR will be declined. Add new entries under the "Unreleased" section of the changelog.

  • Yes
  • No

Have you made changes to dependencies?

If you've made changes to dependencies please note them here, adding if they've been added, removed or updated, including packages version where applicable.

  • Added
  • Updated
  • Removed
  • Combo of any of the above
  • No

QA Instructions, Screenshots, Recordings

Please visit this url after running storybook from the local. http://127.0.0.1:6006/?path=/docs/components-feature-panel--docs

  • Added Feature Panel component
  • Added icon position to the button component.

UI accessibility concerns?

@Bhoomi-Pipalia
Bhoomi-Pipalia removed the request for review from troychaplin November 30, 2026 20:40

@troychaplin troychaplin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few minor changes. I forgot to note in the original issue that when an image is used there's be a supported way to display the image on the left or the right. Let's also add this support along with a story example.

Comment on lines +36 to +38
<ButtonGroup>
<Button color="red" icon="arrow-right" title="Upload Your Transcript" type="button" iconPosition="right" />
</ButtonGroup>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test with long text. What would the button look like with 2 lines? Maybe this with a line-clamp and a vertically aligned icon might work? This is a tough one responsively.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@troychaplin
Please take a look and let me know, what we can do to improve?

@troychaplin troychaplin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a disconnect between the 2 ways to use the component and with some simple changes that can be better aligned and easier to expand upon in the future.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rearrange them to be:

  • Primary (we do not have this, but it would be the Image version, but without the image column, just text, full width of the block)
  • With Image
  • Image on Left
  • With Call to Action
  • With Long Call to Action

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On closer review, I am wondering why there's a difference in markup between image and cta. The image approach uses a clean two column approach that reflects how other components work, while the CTA uses an approach to grid that I believe is new to this version of RDS.

I think the Image approach is better, we could use a FeaturePanel.Content and FeaturePanel.Aside. The aside could have a width prop that would provide flexibility for image, button or something else in the future.

I don't think we should hardcode image in the Aside either, that gives us more flexibility on how we can build this out in WordPress. Unless we change the approach to be a background image, which might be better, as we gain controls over focal points and more.

Comment on lines +23 to +39
@screen md {
.cu-feature-panel-text-only {
@apply grid-cols-[minmax(0,7fr)_minmax(0,3fr)];
}

.cu-feature-panel-text-only > .cu-feature-panel-content {
@apply col-start-1;
}

.cu-feature-panel-text-only > .cu-feature-panel-cta {
@apply col-start-2 row-start-1 row-span-2 self-center;
}

.cu-feature-panel-text-only .cu-buttongroup {
justify-content: end;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Most, if not all, of this will be removed with a change to a two column inner component approach. I don't believe we've taken this approach in other components and grid.


return (
<div
className={`cu-feature-panel mx-auto w-full ${maxWidthClasses[maxWidth]} ${backgroundClass} ${image ? '' : 'border-l-4 border-solid rounded-md fill-red-600 border-red-600 '} overflow-hidden rounded-lg md:flex ${image && imagePosition === 'left' ? 'md:flex-row-reverse' : ''}`}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The border doesn't match stat cards, but I find that to be too large as well (uses 8px instead of 4). I think a sweet spot for both of these (as well as the expanded state in a new description component accordion style variation) is around 5px.

Let's update all 3 areas. I can't think of others that use this single border style.

Comment on lines +9 to +16
.cu-feature-panel-cta .cu-button-label {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
min-width: 0;
overflow: hidden;
overflow-wrap: anywhere;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure what this is doing, I cannot find .cu-button-label anywhere in the code base and there's no line-clamp visible during testing. Let's fix this, and set a value of 3 for the clamp.

CleanShot 2026-11-30 at 8 32 42 PM

This branch has not been deployed

No deployments
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.

2 participants