adobe / adobe/react-spectrum

Add support for string formatting in React Spectrum v3 toast

Open
#6,038 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the feature here

Need the support for showing formatted text in the V3 Toast component.

![image (4)](https://github.com/adobe/react-spectrum/assets/162953663/b78cc20d-d0aa-4439-a460-35584e82785b)

### 🤔 Expected Behavior?

The component should allow to format the string shown in toast.

### 😯 Current Behavior

It only allows unformatted strings.

### 💁 Possible Solution

_No response_

### 🔦 Context

We are trying to show string fragments bolder than others. The current implementation only supports plain string.

### 💻 Examples

_No response_

### 🧢 Your Company/Team

Adobe/Marketo

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the React Spectrum v3 Toast component and inspect how its current string-only content is defined and rendered. Determine an appropriate way to represent formatted fragments, then verify that Toast can display bold and plain portions while preserving its existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.