Skip to content

Commit

Permalink
Merge pull request #144 from CityOfLosAngeles/page-title-button-color…
Browse files Browse the repository at this point in the history
…-fix

Adds Headers to pages
Updates the color of the Edit/Save button on Profile page to match what was there before
Remove Connected Services
  • Loading branch information
cbhernan authored Nov 21, 2024
2 parents bba3b6a + a27ae9e commit 63c2df5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 108 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- sandbox
- development
jobs:
build_and_deploy:
environment: sandbox
environment: development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -45,6 +45,6 @@ jobs:
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_ACCOUNT_SANDBOX_422814 }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_ACCOUNT_DEV_402917 }}
channelId: live
projectId: my-account-sandbox-422814
projectId: my-account-dev-402917
6 changes: 3 additions & 3 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.draft == false }}'
runs-on: ubuntu-latest
environment: sandbox
environment: development
steps:
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/flutter-action
Expand Down Expand Up @@ -49,6 +49,6 @@ jobs:
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_ACCOUNT_SANDBOX_422814 }}
projectId: my-account-sandbox-422814
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_ACCOUNT_DEV_402917 }}
projectId: my-account-dev-402917

6 changes: 3 additions & 3 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"target": "angeleno-my-account-sandbox-422814",
"target": "angeleno-my-account-dev-402917",
"public": "build/web",
"ignore": [
"firebase.json",
Expand All @@ -11,12 +11,12 @@
{
"source": "/maps/**",
"function": "maps",
"region": "us-west1"
"region": "us-central1"
},
{
"source": "/auth0/**",
"function": "auth0",
"region": "us-west1"
"region": "us-central1"
}
]
},
Expand Down
77 changes: 0 additions & 77 deletions lib/views/screens/advanced_security_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,83 +352,6 @@ class _AdvancedSecurityState extends State<AdvancedSecurityScreen> {
child: const Text('Enable')
)
]
),
const SizedBox(height: 25),
Semantics(
header: true,
child: const Text(
'Your Connected Services',
textAlign: TextAlign.left,
style: headerStyle
)
),
const SizedBox(height: 10),
_connectedServices.isEmpty ?
const Text('No connected services')
:
ListView.builder(
shrinkWrap: true,
padding: const EdgeInsets.all(0),
itemCount: _connectedServices.length,
itemBuilder: (final BuildContext context, final int index) {
final service = _connectedServices[index];
return ListTile(
contentPadding: const EdgeInsets.all(0),
leading: service.icon.isNotEmpty ? ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.network(
semanticLabel: '${service.name} logo',
service.icon,
width: 50,
height: 50,
),
) : null,
title: Text(service.name),
subtitle: Text(service.scope.join(', ').toString()),
trailing: TextButton(
key: Key('disconnect_${service.grantId}'),
onPressed: () => showDialog<int>(
context: context,
builder: (final BuildContext context) => AlertDialog(
title: Text('Revoke consent for ${service.name}?'),
content: Container(
width: MediaQuery.of(context).size.width * 0.4,
child: SingleChildScrollView(
child: ListBody(
children: <Widget>[
// ignore: avoid_escaping_inner_quotes
// ignore: lines_longer_than_80_chars
Text('Your Angeleno Account information will no longer be shared with ${service.name}.', style: const TextStyle(fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
// ignore: lines_longer_than_80_chars
Text('The information you already shared with ${service.name} will not be deleted. If you want to delete the information you shared with ${service.name}, you will need to contact ${service.name}.'),
const SizedBox(height: 10),
// ignore: lines_longer_than_80_chars
Text('To access ${service.name} again in the future, you will need to give your consent to share your Angeleno Account information again. You can give consent again by going to the ${service.name} site and logging in.')
],
)
)
),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
onPressed: () {
Navigator.pop(context);
},
),
TextButton(
child: const Text('Ok'),
onPressed: () {
removeConnection(service.grantId);
},
)
],
)
),
child: const Text('Disconnect')
),
);
}
)
],
)
Expand Down
11 changes: 11 additions & 0 deletions lib/views/screens/password_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ class _PasswordScreenState extends State<PasswordScreen> {

return ListView(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Semantics(
header: true,
child: const Text(
'Password Reset',
textAlign: TextAlign.left,
style: headerStyle
)
)
),
TextFormField(
obscureText: !viewPassword,
autocorrect: false,
Expand Down
14 changes: 12 additions & 2 deletions lib/views/screens/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,22 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Semantics(
header: true,
child: const Text(
'Profile',
textAlign: TextAlign.left,
style: headerStyle
)
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: colorScheme.secondaryContainer
),
onPressed: (editMode &&
((user.phone!.isNotEmpty && !validPhoneNumber) ||
!isFormValid) && isNotTestMode
Expand Down
19 changes: 0 additions & 19 deletions test/advanced_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,24 +290,5 @@ void main() {
expect(find.byKey(const Key('enableSMS')), findsOneWidget);
expect(find.byKey(const Key('disableVoice')), findsOneWidget);

await tester.tap(find.byKey(const Key('disconnect_123')));
await tester.pumpAndSettle();

expect(find.byType(AlertDialog), findsOneWidget);

await tester.tap(find.text('Cancel'));
await tester.pumpAndSettle();

expect(find.byType(AlertDialog), findsNothing);

await tester.tap(find.byKey(const Key('disconnect_123')));
await tester.pumpAndSettle();

await tester.tap(find.text('Ok'));
await tester.pumpAndSettle();

expect(find.byType(SnackBar), findsOneWidget);
expect(find.byKey(const Key('disconnect_123')), findsNothing);

});
}

0 comments on commit 63c2df5

Please sign in to comment.