Skip to content

feat(Common): added gradient border and pulse animation#7926

Merged
mcoker merged 5 commits into
patternfly:mainfrom
thatblindgeye:iss7915_borderGlowwing
Oct 28, 2025
Merged

feat(Common): added gradient border and pulse animation#7926
mcoker merged 5 commits into
patternfly:mainfrom
thatblindgeye:iss7915_borderGlowwing

Conversation

@thatblindgeye

Copy link
Copy Markdown
Contributor

Closes #7915

@thatblindgeye thatblindgeye requested a review from mcoker October 23, 2025 17:47
@patternfly-build

patternfly-build commented Oct 23, 2025

Copy link
Copy Markdown
Collaborator

@mcoker mcoker requested a review from srambach October 24, 2025 14:43

@srambach srambach 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.

Besides the duration variable, are we going to turn it off for pf-m-no-motion or change/stop it for prefers-reduced-motion?

0 0 var(--#{$pf-global}--pulse--BoxShadow--Spread) oklch(50% 0.134 242.749deg),
0 0 var(--#{$pf-global}--pulse--BoxShadow--Spread) oklch(45.9% 0.187 3.815deg),
0 0 var(--#{$pf-global}--pulse--BoxShadow--Spread) oklch(45.9% 0.187 3.815deg);
animation: #{$pf-global}-pulse 2s infinite ease-in-out;

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 consider making the duration a variable.

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine as-is. Updates I think we could make at some point:

  • The :focus/:focus-within styles I mentioned
  • Semantic names for these classes named after their role instead of how they look
  • vars for the colors and parts that can be customized
  • Sarah's comments about no/reduced motion and if there are existing vars we can use

wdyt @thatblindgeye want to update anything or add these to the follow-up issue to do later? patternfly/pf-roadmap#269

Comment on lines +96 to +97
&:focus,
&:focus-within {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think you need these? I believe they were in the POC initially to fire on focus, but this animation turn on/off by toggling the class.

@thatblindgeye thatblindgeye force-pushed the iss7915_borderGlowwing branch from bc0aae5 to 8d93a46 Compare October 27, 2025 13:36
@thatblindgeye

thatblindgeye commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

@srambach @mcoker made some updates per above:

  • Added ability to stop the pulse animation when applicable classes/OS level settings are applied
  • Put pulse box shadow colors in vars (named them based sort of where each shadow appears around the box)
  • Removed focus selectors

The rest I think would be good for a followup, the class/var naming and the addition of any vars for the gradient border colors/values (wasn't too sure really what to name them or whether to lump the entire linear-gradients in a single var or each color value/stop % its own var)

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM just a couple of super small nits on the class naming after running it by @lboehling

// stylelink-enable declaration-no-important
}

.#{$pf-prefix}m-gradient-border {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I chatted with @lboehling about this and she recommended .pf-m-ai-trigger or .pf-m-ai-indicator since this is a style that indicates it will trigger some sort of AI action (like pulls up an assistant chat or something).

inherits: false;
}

.#{$pf-prefix}m-pulse {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ran this by @lboehling too and she was on board with .pf-m-thinking since this indicates the AI is working/processing.

@thatblindgeye thatblindgeye force-pushed the iss7915_borderGlowwing branch from c2ce0d3 to d80656d Compare October 28, 2025 15:57

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mcoker mcoker merged commit 7e530ce into patternfly:main Oct 28, 2025
4 checks passed
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.5.0-prerelease.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Button/utility - ai border & thinking styles

4 participants