Skip to content

Commit 08c84ec

Browse files
committed
fix(tile-manager): remove rowCount prop
1 parent b1ee224 commit 08c84ec

File tree

3 files changed

+5
-29
lines changed

3 files changed

+5
-29
lines changed

src/components/tile-manager/tile-manager.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ describe('Tile Manager component', () => {
6464
it('is correctly initialized with its default component state', () => {
6565
// TODO: Add checks for other settings when implemented
6666
expect(tileManager.columnCount).to.equal(0);
67-
expect(tileManager.rowCount).to.equal(0);
6867
expect(tileManager.dragMode).to.equal('slide');
6968
});
7069

@@ -186,19 +185,14 @@ describe('Tile Manager component', () => {
186185
expect(style.gridTemplateColumns).to.equal(
187186
'repeat(auto-fit, minmax(20px, 1fr))'
188187
);
189-
expect(style.gridTemplateRows).to.equal(
190-
'repeat(auto-fit, minmax(20px, 1fr))'
191-
);
192188

193189
tileManager.columnCount = 15;
194-
tileManager.rowCount = 15;
195190

196191
await elementUpdated(tileManager);
197192

198193
style = getTileManagerBase().style;
199194

200195
expect(style.gridTemplateColumns).to.equal('repeat(15, auto)');
201-
expect(style.gridTemplateRows).to.equal('repeat(15, auto)');
202196
});
203197

204198
it('should respect tile row and col start properties', async () => {

src/components/tile-manager/tile-manager.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,7 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
8383
public dragMode: 'slide' | 'swap' = 'slide';
8484

8585
@property({ type: Number })
86-
public columnCount = 0;
87-
88-
// remove this one
89-
@property({ type: Number })
90-
public rowCount = 0;
86+
public columnCount = 10;
9187

9288
/**
9389
* Gets the tiles sorted by their position in the layout.
@@ -100,21 +96,14 @@ export default class IgcTileManagerComponent extends EventEmitterMixin<
10096
}
10197

10298
@watch('columnCount', { waitUntilFirstUpdate: true })
103-
@watch('rowCount', { waitUntilFirstUpdate: true })
10499
protected updateRowsCols() {
105100
// REVIEW: Bind to internal CSS vars/parts or something
106101
// const gridTemplateColumns =
107102
// this.columnCount > 0
108103
// ? `repeat(${this.columnCount}, auto)`
109104
// : 'repeat(auto-fit, minmax(20px, 1fr))';
110-
// const gridTemplateRows =
111-
// this.rowCount > 0
112-
// ? `repeat(${this.rowCount}, auto)`
113-
// : 'repeat(auto-fit, minmax(20px, 1fr))';
114-
// Object.assign(this._baseWrapper.style, {
115-
// gridTemplateColumns,
116-
// gridTemplateRows,
117-
// });
105+
//
106+
// Object.assign(this._baseWrapper.style, gridTemplateColumns);
118107
}
119108

120109
constructor() {

stories/tile-manager.stories.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,10 @@ const metadata: Meta<IgcTileManagerComponent> = {
3939
columnCount: {
4040
type: 'number',
4141
control: 'number',
42-
table: { defaultValue: { summary: '0' } },
43-
},
44-
rowCount: {
45-
type: 'number',
46-
control: 'number',
47-
table: { defaultValue: { summary: '0' } },
42+
table: { defaultValue: { summary: '10' } },
4843
},
4944
},
50-
args: { dragMode: 'slide', columnCount: 0, rowCount: 0 },
45+
args: { dragMode: 'slide', columnCount: 10 },
5146
};
5247

5348
export default metadata;
@@ -56,7 +51,6 @@ interface IgcTileManagerArgs {
5651
/** Determines whether the tiles slide or swap on drop. */
5752
dragMode: 'slide' | 'swap';
5853
columnCount: number;
59-
rowCount: number;
6054
}
6155
type Story = StoryObj<IgcTileManagerArgs>;
6256

@@ -130,7 +124,6 @@ export const Default: Story = {
130124
<igc-tile-manager
131125
.dragMode=${args.dragMode}
132126
.columnCount=${args.columnCount}
133-
.rowCount=${args.rowCount}
134127
>
135128
<p>This text won't be displayed in Tile Manager</p>
136129
${tiles}

0 commit comments

Comments
 (0)