Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/test/frontend/static_files_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,14 @@ void main() {
test('script.dart.js and parts size check', () {
final file = cache.getFile('/static/js/script.dart.js');
expect(file, isNotNull);
expect((file!.bytes.length / 1024).round(), closeTo(333, 2));
expect((file!.bytes.length / 1024).round(), closeTo(336, 20));

final parts = cache.paths
.where((path) =>
path.startsWith('/static/js/script.dart.js') &&
path.endsWith('part.js'))
.toList();
expect(parts.length, closeTo(17, 3));
expect(parts.length, closeTo(15, 5));
final partsSize = parts
.map((p) => cache.getFile(p)!.bytes.length)
.reduce((a, b) => a + b);
Expand Down
4 changes: 2 additions & 2 deletions pkg/web_app/lib/src/widget/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:web/web.dart';

import '../web_util.dart';
import 'completion/widget.dart' deferred as completion;
import 'switch/widget.dart' deferred as switch_;
import 'switch/widget.dart' as switch_;

/// Function to create an instance of the widget given an element and options.
///
Expand All @@ -32,7 +32,7 @@ typedef _WidgetLoaderFn = FutureOr<_WidgetFn> Function();
/// Map from widget name to widget loader
final _widgets = <String, _WidgetLoaderFn>{
'completion': () => completion.loadLibrary().then((_) => completion.create),
'switch': () => switch_.loadLibrary().then((_) => switch_.create),
'switch': () => switch_.create,
};

Future<_WidgetFn> _noSuchWidget() async =>
Expand Down
2 changes: 0 additions & 2 deletions pkg/web_app/test/deferred_import_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ void main() {
'lib/src/deferred/markdown.dart',
],
'completion/': [],
'dismiss/': [],
'switch/': [],
};

for (final file in files) {
Expand Down
21 changes: 5 additions & 16 deletions pkg/web_css/lib/src/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,31 +393,20 @@ pre {
text-align: center;

.dismisser {
float: right;
position: absolute;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure: does this need a position: relative in the parent element?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so...

display: inline-block;
right: 0px;
padding: 5px 15px;
margin-top: -5px;
cursor: pointer;
user-select: none;
}

&.dismissed {
visibility: hidden;
}

z-index: 0;
animation-duration: 200ms;
animation-name: slide-down;
animation-timing-function: ease;
}

@keyframes slide-down {
from {
translate: 0 -100%;
display: none;
}

to {
translate: 0 0;
}
z-index: 1000;
}

a.-x-ago {
Expand Down
Loading