Skip to content

Commit

Permalink
Changing selecting eventId will no longer snap event into view. (#92)
Browse files Browse the repository at this point in the history
* Changing selecting eventId will no longer snap event into view.

* adding in protections

* removed js code for force updating and adding transparent border to account for the selection border.

* removing test as it is no longer applicable.
  • Loading branch information
just-at-uber authored Mar 2, 2020
1 parent 29308c3 commit 30a9b7b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 63 deletions.
4 changes: 1 addition & 3 deletions client/routes/execution/history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,6 @@ export default {
},
},
watch: {
eventId(eventId) {
this.scrollEventIntoView(eventId);
},
filteredEvents() {
if (
!this.scrolledToEventOnInit &&
Expand Down Expand Up @@ -645,6 +642,7 @@ section.history
.tr
display: flex;
flex: 1;
border: 1px solid transparent;
&.odd
background-color: #f8f8f9;
.td, .th
Expand Down
60 changes: 0 additions & 60 deletions client/test/execution.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1062,66 +1062,6 @@ describe('Execution', () => {
'/domain/child-domain/workflows/child-wfid/2345/summary'
);
});

it('should scroll the selected event id from compact view into view', async function test() {
const [testEl, scenario] = new Scenario(this.test)
.withDomain('ci-test')
.startingAt(
'/domain/ci-test/workflows/long-running-op-1/theRunId/history?format=compact&showGraph=true'
)
.withExecution('long-running-op-1', 'theRunId')
.withHistory(
[
{
timestamp: moment().toISOString(),
eventType: 'WorkflowExecutionStarted',
eventId: 1,
details: {
workflowType: {
name: 'long-running-op',
},
},
},
].concat(generateActivityEvents(100))
)
.go(true);

const historyEl = await testEl.waitUntilExists('section.history');

await retry(() => {
historyEl
.querySelectorAll('.compact-view .timeline-event.activity')
.should.have.length(8);
testEl
.querySelectorAll('section.history .timeline .vis-range.activity')
.should.have.length(100);
});

historyEl
.querySelector(
'.vue-recycle-scroller__item-view:nth-of-type(8) .timeline-event.activity'
)
.trigger('click');
await retry(() =>
scenario.location.should.equal(
'/domain/ci-test/workflows/long-running-op-1/theRunId/history?format=compact&showGraph=true&eventId=9'
)
);
await Promise.delay(100);

testEl.querySelector('.view-formats a.grid').trigger('click');

await retry(() => {
testEl
.querySelectorAll(
'section.results .vue-recycle-scroller__item-view .tr'
)
.should.have.length(17);
testEl
.querySelector('section.results .vue-recycle-scroller')
.scrollTop.should.be.above(450);
});
});
});
});

Expand Down

0 comments on commit 30a9b7b

Please sign in to comment.