Skip to content

Commit

Permalink
Better scrolling for workflows list (#516)
Browse files Browse the repository at this point in the history
Better scrolling for workflows list
  • Loading branch information
Assem-Uber authored Jul 26, 2023
1 parent 9957a67 commit cce8d73
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 20 deletions.
22 changes: 13 additions & 9 deletions client/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,19 @@ header.top-bar
font-weight: bold;
}
}
body, main
height 100%
main
position absolute
width 100%
display flex
flex-direction column
html, body {
height: 100%;
}
body, main {
display: flex;
flex-direction: column;
}
body {
overscroll-behavior: none;
}
main {
flex:1
}
main
> section
display flex
Expand Down
13 changes: 9 additions & 4 deletions client/components/workflow-grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
</script>

<template>
<section class="workflow-grid" :class="{ loading }">
<section class="workflow-grid-wrapper" :class="{ loading }">
<div class="row-header">
<div class="col col-id">Workflow ID</div>
<div class="col col-link">Run ID</div>
Expand Down Expand Up @@ -107,9 +107,11 @@ export default {
paged-grid();
.workflow-grid {
height: calc(100vh - 203px);
.workflow-grid-wrapper{
display: flex;
flex:1;
flex-direction: column;
min-width: 1000px;
&.loading.has-results::after {
content: none;
}
Expand Down Expand Up @@ -193,4 +195,7 @@ paged-grid();
}
}
}
.workflow-grid {
flex:1 1 400px;
}
</style>
2 changes: 1 addition & 1 deletion client/containers/workflow-list/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,8 @@ export default {
section.workflow-list
display: flex;
flex: auto;
flex-direction: column;
flex: 1;
&.loading section.results table
opacity 0.7
Expand Down
22 changes: 16 additions & 6 deletions client/test/workflow-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ describe('Workflow list', () => {

it('should query for all workflows and show the results in a grid', async function test() {
const [workflowsEl] = await workflowsTest(this.test);
const resultsEl = workflowsEl.querySelector('section.workflow-grid');
const resultsEl = workflowsEl.querySelector(
'section.workflow-grid-wrapper'
);

workflowsEl
.querySelector('[data-cy="status-filter"] .vs__selected')
Expand Down Expand Up @@ -208,7 +210,9 @@ describe('Workflow list', () => {

await retry(() =>
testEl
.querySelectorAll('section.workflow-list section.workflow-grid .row')
.querySelectorAll(
'section.workflow-list section.workflow-grid-wrapper .row'
)
.should.have.length(1)
);
await Promise.delay(50);
Expand Down Expand Up @@ -243,7 +247,9 @@ describe('Workflow list', () => {

await retry(() =>
workflowsEl
.textNodes('section.workflow-list section.workflow-grid .row .col-id')
.textNodes(
'section.workflow-list section.workflow-grid-wrapper .row .col-id'
)
.should.deep.equal(['demoWfId'])
);
});
Expand All @@ -267,7 +273,9 @@ describe('Workflow list', () => {

await retry(() =>
workflowsEl
.textNodes('section.workflow-list section.workflow-grid .row .col-id')
.textNodes(
'section.workflow-list section.workflow-grid-wrapper .row .col-id'
)
.should.deep.equal(['demoWfId'])
);
});
Expand Down Expand Up @@ -311,7 +319,9 @@ describe('Workflow list', () => {

await retry(() =>
workflowsEl
.textNodes('section.workflow-list section.workflow-grid .row .col-name')
.textNodes(
'section.workflow-list section.workflow-grid-wrapper .row .col-name'
)
.should.deep.equal(['demo'])
);
});
Expand All @@ -337,7 +347,7 @@ describe('Workflow list', () => {
await retry(() => {
workflowsEl.querySelector('div.no-results').should.be.displayed;
workflowsEl
.querySelector('section.workflow-grid')
.querySelector('section.workflow-grid-wrapper')
.should.not.contain('.results');
});
});
Expand Down

0 comments on commit cce8d73

Please sign in to comment.