Skip to content

Commit

Permalink
Add failing test case for conatiner width change
Browse files Browse the repository at this point in the history
  • Loading branch information
gwak committed Nov 29, 2024
1 parent 0249976 commit 27a34c7
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 52 deletions.
22 changes: 22 additions & 0 deletions test-app/app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default class ModifierController extends Controller {
{ fruit: 'lemon', day: 'Sunday' },
];

@tracked mutableRecords = ['Zero', 'One', 'Two', 'Three', 'Four'];

@action handleDragChange(reordered) {
this.records = reordered;
}
Expand Down Expand Up @@ -76,4 +78,24 @@ export default class ModifierController extends Controller {
set(this, 'model.itemsGrid2', newOrder);
set(this, 'model.dragged', draggedModel);
}

@action
updateMutable(newOrder, draggedMode) {
this.mutableRecords = newOrder;
}

@action
removeItemHorizontal(item) {
this.mutableRecords = this.mutableRecords.filter(
(record) => record !== item,
);
}

@action
addItemToHorizontal() {
this.mutableRecords = [
...this.mutableRecords,
`Item ${this.mutableRecords.length + 1}`,
];
}
}
36 changes: 36 additions & 0 deletions test-app/app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,39 @@
.word-break {
word-wrap: break-word;
}

.flex {
display: flex;
}

.flex-1 {
flex: 1;
}

.inline-flex {
display: inline-flex;
}

.align-items-center {
align-items: center;
}

.space-between {
justify-content: space-between;
}

.flex-column {
flex-direction: column;
}

.flex-row {
flex-direction: row;
}

.full-width {
width: 100%;
}

.mr-5 {
margin-right: 5px;
}
Loading

0 comments on commit 27a34c7

Please sign in to comment.