Skip to content

Rename ouds-prefixed public View methods and internal OUDSButtonStyle#1371

Open
Copilot wants to merge 3 commits intodevelopfrom
copilot/rename-ouds-methods-and-style
Open

Rename ouds-prefixed public View methods and internal OUDSButtonStyle#1371
Copilot wants to merge 3 commits intodevelopfrom
copilot/rename-ouds-methods-and-style

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

User feedback indicated the ouds prefix on view modifier methods was verbose and redundant given that OUDS token parameter types provide unambiguous overload resolution vs. native SwiftUI APIs.

Changes

Deprecated ouds-prefixed View extensions → new unprefixed equivalents:

Deprecated Replacement
.oudsForegroundStyle(_:) .foregroundStyle(_:)
.oudsForegroundColor(_:) .foregroundColor(_:)
.oudsBackground(_:) .background(_:)
.oudsAccentColor(_:) .accentColor(_:)
.oudsShadow(_:) .shadow(_:)
.oudsBorder(style:width:radius:color:) .border(style:width:radius:color:)
.oudsColoredSurface(_:) .coloredSurface(_:)
.oudsGridMargin(_:) .gridMargin(_:)
.oudsRequestAccessibleFocus(_:) .requestAccessibleFocus(_:)
.oudsRequestAccessibleFocus(_:for:) .requestAccessibleFocus(_:for:)
.oudsHorizontalDivider(dividerColor:) .horizontalDivider(dividerColor:)
.oudsVerticalDivider(color:) .verticalDivider(color:)

Old methods are marked @available(*, deprecated, renamed:) and forward to the new names — no breaking change.

oudsNavigationTitle intentionally excludedString conforms to StringProtocol, so a bare navigationTitle(_:) would shadow SwiftUI's standard modifier at call sites.

Internal rename: OUDSButtonStyleStyleForButton (not public API).

// Before
Text("Hello")
    .oudsForegroundColor(theme.colors.contentDefault)
    .oudsBackground(theme.colors.bgPrimary)
    .oudsBorder(style: theme.borders.styleDefault, width: theme.borders.widthThin,
                radius: theme.borders.radiusMedium, color: theme.colors.borderDefault)
    .oudsShadow(theme.elevations.emphasized)

// After
Text("Hello")
    .foregroundColor(theme.colors.contentDefault)
    .background(theme.colors.bgPrimary)
    .border(style: theme.borders.styleDefault, width: theme.borders.widthThin,
            radius: theme.borders.radiusMedium, color: theme.colors.borderDefault)
    .shadow(theme.elevations.emphasized)

No ambiguity with SwiftUI overloads — OUDS token types (MultipleColorSemanticToken, MultipleElevationCompositeRawToken, etc.) are distinct from SwiftUI protocol types (ShapeStyle, Color?, etc.).

  • All internal library usages updated to use new names
  • MIGRATION.md, CHANGELOG.md, AGENTS.md, and .docc documentation updated

Related issues

Description

See above.

Motivation & Context

Align View modifier naming with the existing typography helper convention (displayLarge(_:), headingMedium(_:), etc.) and reduce API verbosity per user feedback.

Types of change

  • Refactoring (non-breaking change)

Previews

(NA)

Checklist

Contribution

Accessibility

  • (NA) My change follows accessibility good practices

Design

  • (NA) My change respects the design guidelines of Orange Unified Design System

Development

  • My change follows the developer guide
  • I checked my changes do not add new SwiftLint warnings
  • (NA) I have added unit tests to cover my changes (optional)

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • The evolution have been tested and the project builds for iPhones and iPads
  • Code review has been done by reviewers according to CODEOWNERS file
  • (NA) Design review has been done
  • (NA) Accessibility review has been done
  • (NA) Q/A team has tested the evolution
  • Documentation has been updated if relevant
  • Internal files have been updated if relevant (like CONTRIBUTING, DEVELOP, THIRD_PARTY, CONTRIBUTORS, NOTICE)
  • CHANGELOG has been updated respecting keep a changelog rules and reference the issues
  • (NA) The wiki has been updated if needed (optional)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI linked an issue Mar 27, 2026 that may be closed by this pull request
7 tasks
Copilot AI changed the title [WIP] Rename public methods and change OUDSButtonStyle Rename ouds-prefixed public View methods and internal OUDSButtonStyle Mar 27, 2026
Copilot AI requested a review from pylapp March 27, 2026 17:17
Copy link
Copy Markdown
Member

@pylapp pylapp left a comment

Choose a reason for hiding this comment

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

LGTM

@pylapp pylapp force-pushed the copilot/rename-ouds-methods-and-style branch from 22221f5 to 38099a5 Compare March 30, 2026 09:42
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
@pylapp pylapp force-pushed the copilot/rename-ouds-methods-and-style branch from 38099a5 to 9be8886 Compare March 30, 2026 09:43
@pylapp pylapp marked this pull request as ready for review March 30, 2026 09:44
@pylapp pylapp requested a review from ludovic35 as a code owner March 30, 2026 09:44
@pylapp
Copy link
Copy Markdown
Member

pylapp commented Mar 30, 2026

Note

@ludovic35 This PR must be merged before the one in design toolbox side (https://github.com/Orange-OpenSource/ouds-ios-design-system-toolbox/pull/2161)

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.

In library, rename the public methods prefixed by ouds

2 participants