Skip to content

Commit 558d6ee

Browse files
committed
Merge branch 'pinterest:master' into dynamic-heights-unit-test-overlap
2 parents 75f06dc + e8b7371 commit 558d6ee

File tree

187 files changed

+2682
-1201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+2682
-1201
lines changed

.github/pr-title-checker-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"ESLint plugin: ",
1212
"Tokens: "
1313
],
14-
"regexp": "^(?=.*(?:Accordion|ActivationCard|Avatar|AvatarGroup|Badge|BannerCallout|BannerOverlay|BannerSlim|BannerUpsell|Box|Button|ButtonGroup|ButtonToggle|ChartGraph|Checkbox|Collage|ColorSchemeProvider|Column|ComboBox|Container|Datapoint|DateRange|DateField|DatePicker|DefaultLabelProvider|DeviceTypeProvider|Divider|Dropdown|GlobalEventsHandlerProvider|Fieldset|Flex|Heading|HelpButton|Icon|IconButton|IconButtonFloating|IconCompact|Image|Indicator|Label|Layer|Letterbox|Link|List|Mask|Masonry|Modal|ModalAlert|NumberField|OverlayPanel|PageHeader|Pog|Popover|PopoverEducational|Pulsar|RadioButton|RadioGroup|ScrollBoundaryContainer|SearchField|SearchGuide|SegmentedControl|SelectList|Sheet|SheetMobile|SideNavigation|Spinner|Status|Sticky|Switch|Table|TableOfContents|Tabs|Tag|TagData|TapArea|Text|TextCompact|TextUI|TextArea|TextField|TileData|Toast|Tooltip|useFocusVisible|useReducedMotion|Video|WashAnimated|ZIndex-Classes):\\s.*)+",
14+
"regexp": "^(?=.*(?:Accordion|ActivationCard|Avatar|AvatarGroup|Badge|BannerCallout|BannerOverlay|BannerSlim|BannerUpsell|Box|Button|ButtonGroup|ButtonToggle|ChartGraph|Checkbox|Collage|ColorSchemeProvider|Column|ComboBox|Container|Datapoint|DateRange|DateField|DatePicker|DefaultLabelProvider|DeviceTypeProvider|Divider|Dropdown|GlobalEventsHandlerProvider|Fieldset|Flex|Heading|HelpButton|Icon|IconButton|IconButtonFloating|IconCompact|Image|Indicator|Label|Layer|Letterbox|Link|List|Mask|Masonry|Modal|ModalAlert|NumberField|OverlayPanel|PageHeader|Pog|Popover|PopoverMessage|Pulsar|RadioButton|RadioGroup|ScrollBoundaryContainer|SearchField|SearchGuide|SegmentedControl|SelectList|Sheet|SheetMobile|SideNavigation|Spinner|Status|Sticky|Switch|Table|TableOfContents|Tabs|Tag|TagData|TapArea|Text|TextCompact|TextUI|TextArea|TextField|TileData|Toast|Tooltip|useFocusVisible|useReducedMotion|Video|WashAnimated|ZIndex-Classes):\\s.*)+",
1515
"regexpFlags": "",
1616
"ignoreLabels": []
1717
},

CHANGELOG.md

+132
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,135 @@
1+
## 173.1.1 (Mar 10, 2025)
2+
3+
### Patch
4+
5+
- ChartGraph: Upgrade recharts for ChartGraph to support React 19 ([#4034](https://github.com/pinterest/gestalt/pull/4034)) - [Preview link](https://deploy-preview-4034--gestalt.netlify.app?devexample=true)
6+
7+
## 173.1.0 (Mar 10, 2025)
8+
9+
### Minor
10+
11+
- Masonry: Fix Multi-Column Module Positioning Bug on Dynamic Heights V2 ([#4033](https://github.com/pinterest/gestalt/pull/4033)) - [Preview link](https://deploy-preview-4033--gestalt.netlify.app?devexample=true)
12+
13+
## 173.0.0 (Mar 8, 2025)
14+
15+
### Major
16+
17+
- PopoverMessage: renamed PopoverEducational to PopoverMessage + support to `type=education` and `type=notification` ([#4032](https://github.com/pinterest/gestalt/pull/4032)) - [Preview link](https://deploy-preview-4032--gestalt.netlify.app?devexample=true)
18+
19+
## 172.14.2 (Mar 7, 2025)
20+
21+
### Patch
22+
23+
- ChartGraph: padding adjusments + example fixes ([#4030](https://github.com/pinterest/gestalt/pull/4030)) - [Preview link](https://deploy-preview-4030--gestalt.netlify.app?devexample=true)
24+
25+
## 172.14.1 (Mar 7, 2025)
26+
27+
### Patch
28+
29+
- Revert "Masonry: Fix Multi-Column Module Positioning Bug on Dynamic H… ([#4031](https://github.com/pinterest/gestalt/pull/4031)) - [Preview link](https://deploy-preview-4031--gestalt.netlify.app?devexample=true)
30+
31+
## 172.14.0 (Mar 6, 2025)
32+
33+
### Minor
34+
35+
- Masonry: Flexible width items ([#3993](https://github.com/pinterest/gestalt/pull/3993)) - [Preview link](https://deploy-preview-3993--gestalt.netlify.app?devexample=true)
36+
37+
## 172.13.3 (Mar 6, 2025)
38+
39+
### Patch
40+
41+
- Masonry: Fix Multi-Column Module Positioning Bug on Dynamic Heights V2 and Optimize Height Recalculation ([#4029](https://github.com/pinterest/gestalt/pull/4029)) - [Preview link](https://deploy-preview-4029--gestalt.netlify.app?devexample=true)
42+
43+
## 172.13.2 (Mar 5, 2025)
44+
45+
### Patch
46+
47+
- ChartGraph: fix time series interval and padding issues ([#4028](https://github.com/pinterest/gestalt/pull/4028)) - [Preview link](https://deploy-preview-4028--gestalt.netlify.app?devexample=true)
48+
49+
## 172.13.1 (Mar 5, 2025)
50+
51+
### Patch
52+
53+
- ChartGraph: document is not defined issue ([#4027](https://github.com/pinterest/gestalt/pull/4027)) - [Preview link](https://deploy-preview-4027--gestalt.netlify.app?devexample=true)
54+
55+
## 172.13.0 (Mar 5, 2025)
56+
57+
### Minor
58+
59+
- ButtonToggle: color picker supports custom colors ([#4025](https://github.com/pinterest/gestalt/pull/4025)) - [Preview link](https://deploy-preview-4025--gestalt.netlify.app?devexample=true)
60+
61+
## 172.12.0 (Mar 5, 2025)
62+
63+
### Minor
64+
65+
- ChartGraph, TileData, TagData: support neutral dataviz color & opacity ([#4026](https://github.com/pinterest/gestalt/pull/4026)) - [Preview link](https://deploy-preview-4026--gestalt.netlify.app?devexample=true)
66+
67+
## 172.11.0 (Mar 4, 2025)
68+
69+
### Minor
70+
71+
- Internal: Compact Icon Swap ([#4010](https://github.com/pinterest/gestalt/pull/4010)) - [Preview link](https://deploy-preview-4010--gestalt.netlify.app?devexample=true)
72+
73+
## 172.10.8 (Mar 3, 2025)
74+
75+
### Patch
76+
77+
- BannerCallout: Revert BannerCallout: message width adjustments ([#4007](https://github.com/pinterest/gestalt/pull/4007)) - [Preview link](https://deploy-preview-4007--gestalt.netlify.app?devexample=true) ([#4024](https://github.com/pinterest/gestalt/pull/4024)) - [Preview link](https://deploy-preview-4024--gestalt.netlify.app?devexample=true)
78+
79+
## 172.10.7 (Mar 3, 2025)
80+
81+
### Patch
82+
83+
- TapAreaLink: support to `title` prop ([#4022](https://github.com/pinterest/gestalt/pull/4022)) - [Preview link](https://deploy-preview-4022--gestalt.netlify.app?devexample=true)
84+
85+
## 172.10.6 (Mar 3, 2025)
86+
87+
### Patch
88+
89+
- Internal: Upgrade mui-material ([#4023](https://github.com/pinterest/gestalt/pull/4023)) - [Preview link](https://deploy-preview-4023--gestalt.netlify.app?devexample=true)
90+
91+
## 172.10.5 (Feb 28, 2025)
92+
93+
### Patch
94+
95+
- Image, Video: if image or track `src` is empty string "" then set as undefined ([#4013](https://github.com/pinterest/gestalt/pull/4013)) - [Preview link](https://deploy-preview-4013--gestalt.netlify.app?devexample=true)
96+
97+
## 172.10.4 (Feb 28, 2025)
98+
99+
### Patch
100+
101+
- Popover: remove border options ([#4020](https://github.com/pinterest/gestalt/pull/4020)) - [Preview link](https://deploy-preview-4020--gestalt.netlify.app?devexample=true)
102+
103+
## 172.10.3 (Feb 28, 2025)
104+
105+
### Patch
106+
107+
- DateField, DateRange: upgrade @mui/x-date-pickers to 7.27.2 ([#4019](https://github.com/pinterest/gestalt/pull/4019)) - [Preview link](https://deploy-preview-4019--gestalt.netlify.app?devexample=true)
108+
109+
## 172.10.2 (Feb 28, 2025)
110+
111+
### Patch
112+
113+
- Masonry: Code cleanup and new test for masonry testing page ([#4014](https://github.com/pinterest/gestalt/pull/4014)) - [Preview link](https://deploy-preview-4014--gestalt.netlify.app?devexample=true)
114+
115+
## 172.10.1 (Feb 27, 2025)
116+
117+
### Patch
118+
119+
- DateField: fix to exclude more (unrecognized) attributes to reach input html ([#4018](https://github.com/pinterest/gestalt/pull/4018)) - [Preview link](https://deploy-preview-4018--gestalt.netlify.app?devexample=true)
120+
121+
## 172.10.0 (Feb 27, 2025)
122+
123+
### Minor
124+
125+
- Button, ButtonLink: Fixing VR height ([#4005](https://github.com/pinterest/gestalt/pull/4005)) - [Preview link](https://deploy-preview-4005--gestalt.netlify.app?devexample=true)
126+
127+
## 172.9.6 (Feb 27, 2025)
128+
129+
### Patch
130+
131+
- DateField: upgrade dependency to 7.0.0 ([#4009](https://github.com/pinterest/gestalt/pull/4009)) - [Preview link](https://deploy-preview-4009--gestalt.netlify.app?devexample=true)
132+
1133
## 172.9.5 (Feb 26, 2025)
2134

3135
### Patch

docs/docs-components/PatternBarFill.tsx

+12-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,23 @@ type DataVisualizationColors =
1515
| '09'
1616
| '10'
1717
| '11'
18-
| '12';
18+
| '12'
19+
| 'neutral';
1920

2021
export const useHexColor: () => (arg1: DataVisualizationColors) => string = () => {
2122
const { colorSchemeName } = useColorScheme();
22-
return (vizColor: DataVisualizationColors) =>
23-
colorSchemeName === 'lightMode'
23+
24+
return (vizColor: DataVisualizationColors) => {
25+
if (vizColor === 'neutral') {
26+
return colorSchemeName === 'lightMode'
27+
? lightColorDesignTokens['color-background-chartgraph-neutral']
28+
: darkColorDesignTokens['color-background-chartgraph-neutral'];
29+
}
30+
31+
return colorSchemeName === 'lightMode'
2432
? lightColorDesignTokens[`color-data-visualization-${vizColor}`]
2533
: darkColorDesignTokens[`color-data-visualization-${vizColor}`];
34+
};
2635
};
2736

2837
export default function PatternBarFill() {

docs/docs-components/data/components.tsx

+6-27
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import NumberField from '../../graphics/general/NumberField.svg';
5353
import OverlayPanel from '../../graphics/general/OverlayPanel.svg';
5454
import PageHeader from '../../graphics/general/PageHeader.svg';
5555
import Popover from '../../graphics/general/Popover.svg';
56-
import PopoverEducational from '../../graphics/general/PopoverEducational.svg';
56+
import PopoverMessage from '../../graphics/general/PopoverMessage.svg';
5757
import Pulsar from '../../graphics/general/Pulsar.svg';
5858
import RadioGroup from '../../graphics/general/RadioGroup.svg';
5959
import SearchField from '../../graphics/general/SearchField.svg';
@@ -1818,28 +1818,21 @@ const componentData: ReadonlyArray<ComponentData> = [
18181818
mobileAdaptive: 'planned',
18191819
responsive: 'ready',
18201820
status: 'ready',
1821-
knownIssues: [
1822-
{
1823-
title: 'Incorrect positioning and dimensions',
1824-
description:
1825-
'Popover accumulates many known issues. It is a custom built component. We are in the process of exploring replacing it with a battle-tested third-party library. Check the linked document to see if your issue is already documented.',
1826-
internalDocUrl: 'http://pinch.pinadmin.com/popover_history',
1827-
},
1828-
],
18291821
},
18301822
},
18311823
},
18321824
},
18331825
{
1834-
id: 'PopoverEducational',
1826+
id: 'PopoverMessage',
18351827
platform: {
18361828
web: {
1837-
name: 'PopoverEducational',
1829+
alias: ['PopoverEducational', 'PopoverNotification'],
1830+
name: 'PopoverMessage',
18381831
visual: {
1839-
svg: <PopoverEducational />,
1832+
svg: <PopoverMessage />,
18401833
},
18411834
description:
1842-
'PopoverEducational is a floating container that introduces users to elements on the screen. Used for education or onboarding experiences.',
1835+
'PopoverMessage is a floating container that introduces users to elements on the screen. Used for education or onboarding experiences.',
18431836
category: ['Help and guidance'],
18441837
status: {
18451838
accessible: {
@@ -1853,20 +1846,6 @@ const componentData: ReadonlyArray<ComponentData> = [
18531846
figmaStatus: 'ready',
18541847
responsive: 'ready',
18551848
status: 'ready',
1856-
knownIssues: [
1857-
{
1858-
title: 'Caret misalignment',
1859-
description:
1860-
"PopoverEducational's caret might appear misaligned when positioned below the element of reference.",
1861-
internalDocUrl: 'http://pinch.pinadmin.com/popover_history',
1862-
},
1863-
{
1864-
title: 'Incorrect positioning and dimensions',
1865-
description:
1866-
'PopoverEducational is built on top of Popover. Popover accumulates many known issues. It is a custom built component. We are in the process of exploring replacing it with a battle-tested third-party library. Check the linked document to see if your issue is already documented.',
1867-
internalDocUrl: 'http://pinch.pinadmin.com/popover_history',
1868-
},
1869-
],
18701849
},
18711850
},
18721851
},

docs/docs-components/siteIndex.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const siteIndex: readonly [siteIndexType, ...siteIndexType[]] = [
166166
'PageHeader',
167167
'Pog',
168168
'Popover',
169-
'PopoverEducational',
169+
'PopoverMessage',
170170
'Pulsar',
171171
'RadioGroup',
172172
'SearchField',

docs/examples/chartgraph/doColor.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ export default function Example() {
3939
xAxisBottom: ['auto', 'auto'],
4040
}}
4141
tickFormatter={{
42+
xAxisBottom: (date, index) => {
43+
if (index % 2 === 0) {
44+
return `${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
45+
date,
46+
)}-${new Intl.DateTimeFormat('en-US', { day: '2-digit' }).format(date)}`;
47+
}
48+
return '';
49+
},
50+
4251
timeseries: (date) =>
4352
`${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
4453
date,

docs/examples/chartgraph/doLimit.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default function Example() {
1717
{ name: new Date(2023, 8, 8).getTime(), 'Paid': 400, 'Organic': 400 },
1818
{ name: new Date(2023, 9, 8).getTime(), 'Paid': 1005, 'Organic': 500 },
1919
{ name: new Date(2023, 10, 8).getTime(), 'Paid': 400, 'Organic': 550 },
20-
{ name: new Date(2023, 11, 8).getTime(), 'Paid': 300, 'Organic': 700 },
2120
];
2221

2322
return (
@@ -39,6 +38,14 @@ export default function Example() {
3938
}}
4039
tickFormatter={{
4140
yAxisLeft: (value) => `${value / 1000}K`,
41+
xAxisBottom: (date, index) => {
42+
if (index % 2 === 0) {
43+
return `${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
44+
date,
45+
)}-${new Intl.DateTimeFormat('en-US', { day: '2-digit' }).format(date)}`;
46+
}
47+
return '';
48+
},
4249
timeseries: (date) =>
4350
`${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
4451
date,

docs/examples/chartgraph/doSameColor.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ export default function Example() {
3939
xAxisBottom: ['auto', 'auto'],
4040
}}
4141
tickFormatter={{
42+
xAxisBottom: (date, index) => {
43+
if (index % 2 === 0) {
44+
return `${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
45+
date,
46+
)}-${new Intl.DateTimeFormat('en-US', { day: '2-digit' }).format(date)}`;
47+
}
48+
return '';
49+
},
4250
yAxisLeft: (value) => `${value / 1000}K`,
4351
timeseries: (date) =>
4452
`${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(

docs/examples/chartgraph/dontLimit.tsx

+9-7
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ export default function Example() {
8383
'Earned': 100000,
8484
'Converted': 7000000,
8585
},
86-
{
87-
name: new Date(2023, 11, 8).getTime(),
88-
'Paid 10% per click on average': 3000000,
89-
'Organic': 7000000,
90-
'Earned': 200000,
91-
'Converted': 3000000,
92-
},
9386
];
9487

9588
return (
@@ -113,6 +106,15 @@ export default function Example() {
113106
xAxisBottom: ['auto', 'auto'],
114107
}}
115108
tickFormatter={{
109+
xAxisBottom: (date, index) => {
110+
if (index % 2 === 0) {
111+
return `${new Intl.DateTimeFormat('en-US', { month: 'short' }).format(
112+
date,
113+
)}-${new Intl.DateTimeFormat('en-US', { day: '2-digit' }).format(date)}`;
114+
}
115+
return '';
116+
},
117+
116118
timeseries: (date) =>
117119
`${new Intl.DateTimeFormat('en-US', { dateStyle: 'long' }).format(date)}`,
118120
}}

0 commit comments

Comments
 (0)