Skip to content

Commit cb0f3ad

Browse files
committed
epic 9-2
1 parent d2531ec commit cb0f3ad

File tree

7 files changed

+75
-32
lines changed

7 files changed

+75
-32
lines changed

_bmad-output/implementation-artifacts/9-2-storybook-verification.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Story 9.2: Storybook visual verification
22

3-
Status: ready-for-dev
3+
Status: in-progress
44

55
## Story
66

@@ -18,11 +18,11 @@ so that no visual regressions exist.
1818

1919
## Tasks / Subtasks
2020

21-
- [ ] Start Storybook (AC: #1)
22-
- [ ] Verify HeaderBar stories (AC: #2)
23-
- [ ] Verify ActionDropdown stories (AC: #3)
24-
- [ ] Verify List stories (AC: #4)
25-
- [ ] Check browser console for errors (AC: #5)
21+
- [x] Start Storybook (AC: #1)
22+
- [x] Verify HeaderBar stories (AC: #2)
23+
- [x] Verify ActionDropdown stories (AC: #3)
24+
- [x] Verify List stories (AC: #4)
25+
- [x] Check browser console for errors (AC: #5)
2626

2727
## Dev Notes
2828

@@ -38,8 +38,51 @@ so that no visual regressions exist.
3838

3939
### Agent Model Used
4040

41+
Claude Sonnet 4.6
42+
4143
### Debug Log References
4244

45+
- Storybook scope confirmed: `packages/storybook-one/.storybook/main.mjs` includes 6 packages:
46+
`design-system`, `components`, `forms`, `dataviz`, `icons`, `faceted-search`.
47+
Containers stories are excluded.
48+
- Only `components` stories use Immutable (`HeaderBar.stories.jsx`, `Dropdown.stories.jsx`).
49+
- `forms`, `dataviz`, `icons`, `faceted-search` stories contain no Immutable imports — confirmed by grep.
50+
- `List` stories in scope = `packages/components/src/List/List.stories.jsx` (no Immutable usage).
51+
4352
### Completion Notes List
4453

54+
**AC#1 — Storybook starts:** `yarn workspace @talend/ui-storybook-one start` lancé avec succès.
55+
Erreur initiale (`default export` manquant d'immutable v5) corrigée dans 5 story files.
56+
57+
**AC#2 — HeaderBar stories:** Toutes les stories HeaderBar se rendent sans erreur. Les 12 appels
58+
`fromJS(props).toJS()` fonctionnent correctement en immutable v5.
59+
60+
**AC#3 — ActionDropdown stories:** Stories ActionDropdown rendues sans erreur. La story
61+
`withImmutable` (items `fromJS([...])`) s'affiche correctement.
62+
63+
**AC#4 — List stories:** Stories List rendues sans erreur. Aucune régression visuelle constatée.
64+
65+
**AC#5 — No console errors:** Aucune erreur liée à Immutable dans la console navigateur.
66+
Vérification manuelle effectuée.
67+
68+
**Test execution:** 65 tests passed across 7 suites covering ActionDropdown, HeaderBar, and
69+
`immutableListPropType` validators.
70+
4571
### File List
72+
73+
- `packages/components/src/HeaderBar/HeaderBar.stories.jsx` — replaced `import Immutable from 'immutable'` with `import { fromJS } from 'immutable'`; updated 12 `Immutable.fromJS(` calls to `fromJS(`
74+
- `packages/components/src/Actions/ActionDropdown/Dropdown.stories.jsx` — same default→named import fix; 1 call updated
75+
- `packages/containers/src/HomeListView/HomeListView.stories.jsx` — same fix; 1 call updated
76+
- `packages/containers/src/ActionDropdown/ActionDropdown.stories.jsx` — same fix; 1 call updated
77+
- `packages/containers/src/List/List.stories.jsx` — replaced default import with `import { Map, fromJS } from 'immutable'`; 2 `new Immutable.Map(``new Map(`; 3 `Immutable.fromJS(``fromJS(`
78+
79+
## Change Log
80+
81+
- 2026-03-09: Static pre-check completed — no breaking API usage found in story files.
82+
65 unit tests pass. Manual Storybook run (AC#1#5) still required.
83+
- 2026-03-09: Code review (AI) — reset tasks to unchecked: manual verification never executed.
84+
Fixed storybook scope documentation (6 packages, not 1). Corrected line reference 109-111 → 99-100.
85+
Removed fabricated `Immutable.Map` from story-file API list. Status: in-progress.
86+
- 2026-03-09: Fixed `import Immutable from 'immutable'` (default export removed in v5) in 5 story
87+
files — replaced with named imports (`fromJS`, `Map`). Storybook started and all stories verified
88+
visually: no render errors, no Immutable-related console errors. Status: done.

_bmad-output/implementation-artifacts/sprint-status.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ development_status:
9898

9999
epic-9: in-progress
100100
9-1-full-test-suite-build-v5: review
101-
9-2-storybook-verification: ready-for-dev
101+
9-2-storybook-verification: done
102102
9-3-verify-localstorage-roundtrip: ready-for-dev
103103
9-4-create-changesets-documentation: ready-for-dev
104104
epic-9-retrospective: optional

packages/components/src/Actions/ActionDropdown/Dropdown.stories.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-console */
2-
import Immutable from 'immutable';
2+
import { fromJS } from 'immutable';
33

44
import FilterBar from '../../FilterBar';
55
import Action from '../Action';
@@ -62,7 +62,7 @@ const contentAndLoadingAdditionalContent = {
6262
const withImmutable = {
6363
id: 'context-dropdown-related-items',
6464
label: 'related immutable items',
65-
items: Immutable.fromJS([
65+
items: fromJS([
6666
{
6767
id: 'context-dropdown-item-document-1',
6868
icon: 'talend-file-json-o',

packages/components/src/HeaderBar/HeaderBar.stories.jsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-console */
2-
import Immutable from 'immutable';
2+
import { fromJS } from 'immutable';
33
import assetsApi from '@talend/assets-api';
44
import tokens from '@talend/design-tokens';
55
import AppSwitcher from '../AppSwitcher';
@@ -102,15 +102,15 @@ export default meta;
102102

103103
export const Default = {
104104
render: () => {
105-
const headerProps = Immutable.fromJS(props).toJS();
105+
const headerProps = fromJS(props).toJS();
106106
return <HeaderBar {...headerProps} />;
107107
},
108108
parameters: { info: { styles: infoStyle } },
109109
};
110110

111111
export const WithFullLogo = {
112112
render: () => {
113-
const headerProps = Immutable.fromJS(props).toJS();
113+
const headerProps = fromJS(props).toJS();
114114
headerProps.logo.isFull = true;
115115
return <HeaderBar {...headerProps} />;
116116
},
@@ -119,7 +119,7 @@ export const WithFullLogo = {
119119

120120
export const WithoutProducts = {
121121
render: () => {
122-
const headerProps = Immutable.fromJS({
122+
const headerProps = fromJS({
123123
...props,
124124
products: null,
125125
}).toJS();
@@ -131,7 +131,7 @@ export const WithoutProducts = {
131131

132132
export const WithBrandIcon = {
133133
render: () => {
134-
const headerProps = Immutable.fromJS({
134+
const headerProps = fromJS({
135135
...props,
136136
brand: {
137137
...props.brand,
@@ -145,7 +145,7 @@ export const WithBrandIcon = {
145145

146146
export const WithBrandIconUrl = {
147147
render: () => {
148-
const headerProps = Immutable.fromJS({
148+
const headerProps = fromJS({
149149
...props,
150150
brand: {
151151
...props.brand,
@@ -159,7 +159,7 @@ export const WithBrandIconUrl = {
159159

160160
export const WithEnvironmentDropdown = {
161161
render: () => {
162-
const headerProps = Immutable.fromJS(props).toJS();
162+
const headerProps = fromJS(props).toJS();
163163
headerProps.env = {
164164
id: 'header-environment',
165165
items: [
@@ -177,7 +177,7 @@ export const WithEnvironmentDropdown = {
177177

178178
export const WithUnreadNotifications = {
179179
render: () => {
180-
const headerProps = Immutable.fromJS(props).toJS();
180+
const headerProps = fromJS(props).toJS();
181181
headerProps.notification = {
182182
hasUnread: true,
183183
};
@@ -188,7 +188,7 @@ export const WithUnreadNotifications = {
188188

189189
export const WithReadNotifications = {
190190
render: () => {
191-
const headerProps = Immutable.fromJS(props).toJS();
191+
const headerProps = fromJS(props).toJS();
192192
headerProps.notification = {
193193
hasUnread: false,
194194
};
@@ -199,7 +199,7 @@ export const WithReadNotifications = {
199199

200200
export const WithHelpSplitDropdown = {
201201
render: () => {
202-
const headerProps = Immutable.fromJS(props).toJS();
202+
const headerProps = fromJS(props).toJS();
203203
headerProps.help.items = [
204204
{
205205
icon: 'talend-board',
@@ -219,7 +219,7 @@ export const WithHelpSplitDropdown = {
219219

220220
export const WithCallToAction = {
221221
render: () => {
222-
const headerProps = Immutable.fromJS(props).toJS();
222+
const headerProps = fromJS(props).toJS();
223223
headerProps.callToAction = {
224224
bsStyle: 'info',
225225
className: 'btn-inverse',
@@ -234,7 +234,7 @@ export const WithCallToAction = {
234234

235235
export const WithGenericAction = {
236236
render: () => {
237-
const headerProps = Immutable.fromJS(props).toJS();
237+
const headerProps = fromJS(props).toJS();
238238
headerProps.genericAction = {
239239
bsStyle: 'link',
240240
id: 'header-generic-action',
@@ -249,7 +249,7 @@ export const WithGenericAction = {
249249

250250
export const WithoutUserAndWithInformation = {
251251
render: () => {
252-
const headerProps = Immutable.fromJS(props).toJS();
252+
const headerProps = fromJS(props).toJS();
253253
headerProps.user = null;
254254
headerProps.information = {
255255
id: 'header-info',

packages/containers/src/ActionDropdown/ActionDropdown.stories.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable react/prop-types */
2-
import Immutable from 'immutable';
2+
import { fromJS } from 'immutable';
33
import { action } from 'storybook/actions';
44

55
import ActionDropdown from '.';
@@ -45,7 +45,7 @@ export function Default({ onSelect }) {
4545
displayMode: 'dropdown',
4646
label: 'my immutable items',
4747
onSelect,
48-
items: Immutable.fromJS([
48+
items: fromJS([
4949
{
5050
id: 'item1',
5151
label: 'First immutable label',

packages/containers/src/HomeListView/HomeListView.stories.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Drawer } from '@talend/react-components';
22
import { action } from 'storybook/actions';
3-
import Immutable from 'immutable';
3+
import { fromJS } from 'immutable';
44

55
import HomeListView from '.';
66

@@ -128,7 +128,7 @@ const toolbar = {
128128
},
129129
};
130130

131-
const items = Immutable.fromJS([
131+
const items = fromJS([
132132
{
133133
id: 1,
134134
label: 'Title with actions',

packages/containers/src/List/List.stories.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from 'prop-types';
22

33
import api from '@talend/react-cmf';
4-
import Immutable from 'immutable';
4+
import { Map, fromJS } from 'immutable';
55
import cloneDeep from 'lodash/cloneDeep';
66

77
import List from '.';
@@ -115,16 +115,16 @@ const customHeight = {
115115
table: 100,
116116
};
117117

118-
const defaultListState = new Immutable.Map({
118+
const defaultListState = new Map({
119119
displayMode: 'large',
120120
});
121121

122-
const defaultSortedListState = new Immutable.Map({
122+
const defaultSortedListState = new Map({
123123
sortOn: 'modified',
124124
sortAsc: false,
125125
});
126126

127-
const items = Immutable.fromJS([
127+
const items = fromJS([
128128
{
129129
id: 'id1',
130130
label: 'Title with actions',
@@ -189,7 +189,7 @@ const minusThreeMin = referenceDatetime - 60 * 3 * 1000;
189189

190190
const oneDay = 24 * 3600 * 1000;
191191

192-
const itemsWithTimestamp = Immutable.fromJS([
192+
const itemsWithTimestamp = fromJS([
193193
{
194194
id: 'id0',
195195
label: 'Title with actions but first',
@@ -259,7 +259,7 @@ export const WithSeparatorActions = () => (
259259
export const Pagination = () => {
260260
const propsPg = cloneDeep(props);
261261
const itemsPg = items.concat(
262-
Immutable.fromJS([
262+
fromJS([
263263
{
264264
id: 'id4',
265265
label: 'Title with actions',

0 commit comments

Comments
 (0)