Skip to content

Commit d52a39b

Browse files
committed
fix(dev-server): progress bar uses transform
1 parent 929e563 commit d52a39b

2 files changed

Lines changed: 16 additions & 20 deletions

File tree

src/dev-server/templates/initial-load.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,13 @@
127127
}
128128
#progress-bar {
129129
position: absolute;
130-
width: 0;
130+
width: 100%;
131131
height: 3px;
132132
background: #5851ff;
133-
transition: width 1s ease-in-out;
133+
transform: scaleX(0);
134+
transform-origin: left center;
135+
transition: transform 1s ease-in-out;
136+
contain: strict;
134137
}
135138
</style>
136139
</head>
@@ -161,7 +164,7 @@
161164
window.addEventListener('buildLog', function(ev) {
162165
var buildLog = ev.detail;
163166
logOutput.innerText = buildLog.messages.join('\n');
164-
progressBar.style.width = (buildLog.progress * 100) + '%';
167+
progressBar.style.transform = `scaleX(${Math.min(1, buildLog.progress)})`;
165168
});
166169
</script>
167170

test/todo-app/src/components.d.ts

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
9-
import { JSX } from '@stencil/core';
109

1110

1211
export namespace Components {
@@ -32,30 +31,27 @@ declare namespace LocalJSX {
3231
'text'?: string;
3332
}
3433

35-
interface ElementInterfaces {
36-
'AppRoot': Components.AppRoot;
37-
'TodoInput': Components.TodoInput;
38-
'TodoItem': Components.TodoItem;
39-
}
40-
4134
interface IntrinsicElements {
42-
'AppRoot': LocalJSX.AppRoot;
43-
'TodoInput': LocalJSX.TodoInput;
44-
'TodoItem': LocalJSX.TodoItem;
35+
'app-root': AppRoot;
36+
'todo-input': TodoInput;
37+
'todo-item': TodoItem;
4538
}
4639
}
40+
4741
export { LocalJSX as JSX };
4842

43+
4944
declare module "@stencil/core" {
5045
export namespace JSX {
51-
interface ElementInterfaces extends LocalJSX.ElementInterfaces {}
5246
interface IntrinsicElements extends LocalJSX.IntrinsicElements {}
5347
}
5448
}
5549

50+
5651
declare global {
5752

5853

54+
5955
interface HTMLAppRootElement extends Components.AppRoot, HTMLStencilElement {}
6056
var HTMLAppRootElement: {
6157
prototype: HTMLAppRootElement;
@@ -73,16 +69,13 @@ declare global {
7369
prototype: HTMLTodoItemElement;
7470
new (): HTMLTodoItemElement;
7571
};
76-
interface HTMLElementTagNameMap {
77-
'app-root': HTMLAppRootElement
78-
'todo-input': HTMLTodoInputElement
79-
'todo-item': HTMLTodoItemElement
80-
}
8172

82-
interface ElementTagNameMap {
73+
interface HTMLElementTagNameMap {
8374
'app-root': HTMLAppRootElement;
8475
'todo-input': HTMLTodoInputElement;
8576
'todo-item': HTMLTodoItemElement;
8677
}
78+
79+
interface ElementTagNameMap extends HTMLElementTagNameMap {}
8780
}
8881

0 commit comments

Comments
 (0)