Skip to content

Commit

Permalink
Make text selectable (#28)
Browse files Browse the repository at this point in the history
* Make text selectable

* Resolve flutter analyze complaint

* Fix test randomly failing
  • Loading branch information
omar-selo authored Jun 22, 2023
1 parent 62d45fd commit eccded8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
15 changes: 7 additions & 8 deletions backend/tests/controllers/families/test_families.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


from datetime import datetime, timedelta
from random import randint

from fastapi.testclient import TestClient
from sqlalchemy.orm import Session
Expand All @@ -32,21 +31,21 @@ def test_retreive_family(db_session: Session, test_client: TestClient):
We should get json for a specific family with its stages and artefacts
"""
# Arrange
artefact_name_stage_pair = [
("core20", "edge", datetime.utcnow()),
("oem-jammy", "proposed", datetime.utcnow()),
("core20", "edge", datetime.utcnow() - timedelta(days=10)),
("core20", "beta", datetime.utcnow() - timedelta(days=20)),
artefact_tuple = [
("core20", "edge", datetime.utcnow(), "1"),
("oem-jammy", "proposed", datetime.utcnow(), "1"),
("core20", "edge", datetime.utcnow() - timedelta(days=10), "2"),
("core20", "beta", datetime.utcnow() - timedelta(days=20), "3"),
]
artefacts = []
for name, stage, created_at in artefact_name_stage_pair:
for name, stage, created_at, version in artefact_tuple:
artefacts.append(
create_artefact(
db_session,
stage,
name=name,
created_at=created_at,
version=str(randint(1, 100)),
version=version,
)
)
snap_stage = artefacts[0].stage
Expand Down
21 changes: 9 additions & 12 deletions frontend/lib/app.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yaru/yaru.dart';

import 'routing.dart';
Expand All @@ -9,17 +8,15 @@ class App extends StatelessWidget {

@override
Widget build(BuildContext context) {
return ProviderScope(
child: YaruTheme(
builder: (context, yaru, child) {
return MaterialApp.router(
theme: yaru.theme,
// Colors are fixed as design doesn't support dark theme
darkTheme: yaru.theme,
routerConfig: appRouter,
);
},
),
return YaruTheme(
builder: (context, yaru, child) {
return MaterialApp.router(
theme: yaru.theme,
// Colors are fixed as design doesn't support dark theme
darkTheme: yaru.theme,
routerConfig: appRouter,
);
},
);
}
}
3 changes: 2 additions & 1 deletion frontend/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'app.dart';

void main() {
runApp(const App());
runApp(const ProviderScope(child: App()));
}
16 changes: 9 additions & 7 deletions frontend/lib/ui/skeleton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ class Skeleton extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
const Navbar(),
Expanded(child: body),
],
return SelectionArea(
child: Scaffold(
body: Column(
children: [
const Navbar(),
Expanded(child: body),
],
),
bottomNavigationBar: const Footer(),
),
bottomNavigationBar: const Footer(),
);
}
}

0 comments on commit eccded8

Please sign in to comment.