Skip to content

Conversation

@alionazherdetska
Copy link
Contributor

@alionazherdetska alionazherdetska commented Oct 29, 2025

📄 Description

This PR updates validation signal icons across form components to use CSS custom properties instead of SCSS functions.

Changes

  • Replaced warning-solid icon with error-solid
  • Updated form-input, form-select, and validation components to use var(--post-signal-icon-success) and var(--post-signal-icon-error)
  • Removed deprecated success-icon() and warning-icon() SCSS functions

🚀 Demo

https://preview-6544--swisspost-design-system-next.netlify.app/?path=/docs/1aa900d9-aa65-4ae0-b8cd-e6cca6cc3472--docs


🔮 Design review

  • Design review done
  • No design review needed

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

@alionazherdetska alionazherdetska requested a review from a team as a code owner October 29, 2025 11:04
@alionazherdetska alionazherdetska linked an issue Oct 29, 2025 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

⚠️ No Changeset found

Latest commit: 9198dd5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alionazherdetska alionazherdetska marked this pull request as draft October 29, 2025 11:05
@alionazherdetska alionazherdetska marked this pull request as ready for review October 29, 2025 13:20
Copy link
Contributor

@leagrdv leagrdv left a comment

Choose a reason for hiding this comment

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

Some inputs have not been updated. You can see it better when switching to HCM or dark mode that they're not the same icons.
Capture d'écran 2025-10-29 162311
Capture d'écran 2025-10-29 162324

And I also noticed that the icon alignment inside the textarea are broken, if you can have a look
Capture d'écran 2025-10-29 161917

@swisspost swisspost deleted a comment from swisspost-bot Oct 31, 2025
Copilot AI review requested due to automatic review settings November 1, 2025 09:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors form validation icons by replacing dynamic SCSS function-generated SVG icons with CSS custom properties that reference pre-generated signal icons. The change simplifies the icon implementation and aligns validation icons with the design system's signal icon set.

Key changes:

  • Removes SCSS icon definitions and functions for error/success/warning icons
  • Replaces function-based icon generation with CSS custom property references (--post-signal-icon-success, --post-signal-icon-error)
  • Eliminates color parameter variants for high-contrast modes (icons now handle theming internally)

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/styles/src/variables/_icons.scss Removes legacy icon SVG path definitions and map merges for error, success, and warning icons
packages/styles/src/functions/_forms.scss Removes success-icon() and warning-icon() helper functions
packages/styles/src/mixins/_forms.scss Replaces function calls with CSS custom properties, removes unused forms function import
packages/styles/src/components/validation.scss Switches from mask-image mixin to background-image with custom properties, removes icon mixin imports
packages/styles/src/components/form-input.scss Replaces mask-image with background-image and removes color specifications
packages/styles/src/components/form-select.scss Updates all validation states to use custom properties instead of function calls
packages/styles/src/components/form-textarea.scss Changes background positioning to explicit calc values and removes old token references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Nov 1, 2025

Related Previews

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

@alionazherdetska alionazherdetska merged commit 6531e6d into main Nov 3, 2025
14 checks passed
@alionazherdetska alionazherdetska deleted the 6425-update-signal-icons-whereever-needed branch November 3, 2025 15:02
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.

Update signal icons whereever needed

4 participants