Skip to content

Commit

Permalink
Fixes - launch learning resource when logged out, new filter for all …
Browse files Browse the repository at this point in the history
…tab, remove campaign description new line characters
  • Loading branch information
JElgar committed Sep 18, 2023
1 parent fa1950b commit fdb8a5a
Show file tree
Hide file tree
Showing 14 changed files with 213 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ name: Android release

on:
workflow_dispatch:

# TODO Use tag to set version in setup app
# on:
# workflow_call:
# inputs:
# version:
# required: true
# type: string
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand Down
61 changes: 47 additions & 14 deletions .github/workflows/flutter-ci-cd.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,60 @@
name: Flutter CI CD

# This workflow is triggered on pushes to the repository.

# TODO Trigger on tag
on:
push:
# branches: [staging, master]
branches: [staging]
# pull_request:
# branches: [ dev ]
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

workflow_dispatch: # to manually run this workflow

# on: push # Default will running for every branch.


concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
release:
prepare:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Trigger other 2 actions
run: echo TODO
- uses: actions/checkout@v2

- name: Extract version from tag
uses: damienaicheh/[email protected]

- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: 'beta' # 'dev', 'alpha', default to: 'stable'
flutter-version: '3.14.x'
cache: true

- name: Setup cider
run: |
export PATH="$PATH":"$HOME/.pub-cache/bin"
pub global activate cider
- name: Set version
run: |
echo "Setting version to ${{ github.ref_name }}"
cider version ${{ github.ref_name }}
- name: Update change log
run: cider release

- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
author_name: GitHub Actions
author_email: [email protected]
branch: main
message: "Update version on pubspec.yaml & update change log"

release-ios:
needs: prepare
uses: now-u/now-u-app/.github/workflows/ios-release.yml@main
secrets: inherit

release-android:
needs: prepare
uses: now-u/now-u-app/.github/workflows/android-release.yml@main
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ name: IOS release

on:
workflow_dispatch:

# TODO Use tag to set version in setup app
# on:
# workflow_call:
# inputs:
# version:
# required: true
# type: string
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand Down
223 changes: 92 additions & 131 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,93 @@
# now-u app changelog

## What is a changelog?

A changelog is a file which contains a curated, chronologically ordered list of
notable changes for each version of a project.

## Why keep a changelog?

To make it easier for users and contributors to see precisely what notable
changes have been made between each release (or version) of the project.

## Who needs a changelog?

People do. Whether consumers or developers, the end users of software are human
beings who care about what's in the software. When the software changes, people
want to know why and how.

## How do I make a good changelog?

### Guiding Principles

- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each version is displayed.
- Mention whether you follow Semantic Versioning.

### Types of changes

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

The above is taken from: https://keepachangelog.com/en/1.0.0/

## Whats the structure?

- #<issue_number> - Description of what has changed (following guiding
principles)

## The log

### Unreleased

- #155 [feature] Drop down button is added to be opened on external browser

### Version 1.2.0
- #127 [feature] Login popups added which notify users of error
- #129 [feature] The number of actions completed by now-u users now shows on
each campaign page
- #131 [fix] Http links can now be viewed in the internal webview
- #135 [feature] Campaign researchers (user_role_id=3) can now see future and
disabled campaigns
- #136 [feature] Links can now be user to link to different pages of the app
- #82 [feature] About us link added to more menu
- #148 [fix] App no longer crashes on NetworkImage error
- #144 [fix] Fix for mailto links

### Version 1.1.9 - Hot Fix

- #125 [fix] Fixed action page

### Version 1.1.8

- #123 [fix] Text links in internal notifcations are now clickable and the
text now longer overflows

### Version 1.1.7

- #110 [feature] Campaign page design update
- #111 [fix] App no longer crashes if no action time provided
- #112 [feature] The app now uses stacked instead of redux
- #113 [feature] An early version of internal notifications have been added
- #114 [feature] Campaign page campaign tiles have been updated. Campaigns can
now be joined directly from this page
- #120 [feature] A new popup service has been added to allow for more
information about error
- #121 [feature] Updated login flow allowing for token entry if email link is
not working

### Version 1.1.6

- #NA [fix] Fix ios incorrect supprorted version and ios push
notifcation

### Version 1.1.5

- #94 [fix] Fixed overflow issue (grey tiles) on actions page
- #95 [fix] Actions completed on the home page now show the correct
value
- #98 [feature] Actions for past campaigns can now be viewed
- #101 [feature] Past campaign feedback form added to more menu

### Version 1.1.4

- #91 [fix] Action's 'take action' now open in webview and learning
resouces are checked off when clicked

### Version 1.1.3

- #85 [change] The style of the organisation page has been updated
- #56 [change] Web links now open within the app
- #64 [change] Users can now signup for the newsletter during the signup
process

### Version 1.1.2

- #66 [change] Campaigns can now be shared from the campaigns page
- #78 [change] The more menu is now split into sections

### Version 1.1.1

- #60 [change] Learning resources now display their source
- #75 [change] Past campaigns can now be viewd on the app
- #71 [change] Learning resources can now be completed by viewing the resource
link
- #58 [change] New actions and now campaigns now have the 'new' tag
- #63 [change] Users have to agree to terms and conditions before logging in
- #57 [change] Deveopers can now use the staging branch api
- #NA [upgrade] Updated to flutter v1.2.0 (master)
- #39 [change] The menu icons have been updated
- #40 [change] The page route and campaign/action completion has been added to
firebase analytics
- #72 [bug] Improved dynamic links service
- #46 [bug] The app no longer crashed when clicking 'Rate the app' in the
menu
## Unreleased
### Added
- Added login button to more menu for unauthenticated users
- Fix new filter for all explore tab

### Fixed
- Fix launching learning resource for unlogged in user
- Add padding to buttons in basic dialog
- Fix rendering of campaign descriptions to remove newline characters

## 2.0.1 - 2023-09-18
### Changed
- Updated app to use api v2
- Updated explore to new UX
- \#155 Drop down button is added to be opened on external browser

## 1.2.0 - 2022-01-01
### Added
- \#127 Login popups added which notify users of error
- \#129 The number of actions completed by now-u users now shows on each campaign page
- \#135 Campaign researchers (user\_role\_id=3) can now see future and disabled campaigns
- \#136 Links can now be user to link to different pages of the app
- \#82 About us link added to more menu

### Fixed
- \#148 App no longer crashes on NetworkImage error
- \#144 Fix for mailto links
- \#131 Http links can now be viewed in the internal webview

## 1.1.9 - 2022-01-01
### Fixed
- \#125 Fixed action page

## 1.1.8 - 2022-01-01
### Fixed
- \#123 Text links in internal notifcations are now clickable and the text now longer overflows

## 1.1.7 - 2022-01-01
### Added
- \#110 Campaign page design update
- \#112 The app now uses stacked instead of redux
- \#113 An early version of internal notifications have been added
- \#114 Campaign page campaign tiles have been updated. Campaigns can now be jy from this page
- \#120 A new popup service has been added to allow for more information
- \#121 Updated login flow allowing for token entry if email link is not working

### Fixed
- \#111 App no longer crashes if no action time provided

## 1.1.6 - 2022-01-01
### Fixed
- \#NA Fix ios incorrect supprorted version and ios push notifcation

## 1.1.5 - 2022-01-01
### Added
- \#98 Actions for past campaigns can now be viewed
- \#101 Past campaign feedback form added to more menu

### Fixed
- \#94 Fixed overflow issue (grey tiles) on actions page
- \#95 Actions completed on the home page now show the correct value

## 1.1.4 - 2022-01-01
### Fixed
- \#91 Action's 'take action' now open in webview and learning resouces are checked off when clicked

## 1.1.3 - 2022-01-01
### Changed
- \#85 The style of the organisation page has been updated
- \#56 Web links now open within the app
- \#64 Users can now signup for the newsletter during the signup process

## 1.1.2 - 2022-01-01
### Changed
- \#66 Campaigns can now be shared from the campaigns page
- \#78 The more menu is now split into sections

## 1.1.1 - 2022-01-01
### Changed
- \#60 Learning resources now display their source
- \#75 Past campaigns can now be viewd on the app
- \#71 Learning resources can now be completed by viewing the resource link
- \#58 New actions and now campaigns now have the 'new' tag
- \#63 Users have to agree to terms and conditions before logging in
- \#57 Deveopers can now use the staging branch api
- \#NA Updated to flutter v1.2.0 (master)
- \#39 The menu icons have been updated
- \#40 The page route and campaign/action completion has been added to firebase analytics

### Fixed
- \#72 Improved dynamic links service
- \#46 The app no longer crashed when clicking 'Rate the app' in the menu
3 changes: 2 additions & 1 deletion lib/models/Campaign.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ extension CampaignExtension on Campaign {
return this.causes[0];
}

String get description => this.description.replaceAll('\\n', '\n\n');
// TODO This is really sad, it would be easy to use description by accident
String getDescription() => this.description.replaceAll('\\n', '\n\n');

Future<String> getShareText() async {
Uri uri = await _dynamicLinkService.createDynamicLink(
Expand Down
5 changes: 4 additions & 1 deletion lib/services/causes_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ class CausesService {
}

Future<void> openLearningResource(LearningResource learningResource) async {
await completeLearningResource(learningResource.id);
if (_authService.isUserLoggedIn()) {
// TODO Should this if be inside here?
await completeLearningResource(learningResource.id);
}
_navigationService.launchLink(
learningResource.link,
);
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/dialogs/basic/basic_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:nowu/themes.dart';
import 'package:nowu/utils/intersperse.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';

Expand Down Expand Up @@ -55,7 +56,7 @@ class BasicDialog extends StackedView<BasicDialogModel> {
const SizedBox(height: 20),
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
children: <Widget>[
if (request.mainButtonTitle != null)
TextButton(
child: Text(request.mainButtonTitle!),
Expand All @@ -69,7 +70,7 @@ class BasicDialog extends StackedView<BasicDialogModel> {
onPressed: () =>
completer(DialogResponse(confirmed: false)),
),
],
].intersperse(const SizedBox(height: 10,)).toList(),
),
const SizedBox(height: 20),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/campaign_info/campaign_info_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class CampaignInfoView extends StackedView<CampaignViewModel> {
.copyWith(fontSize: 18),
),
Text(
viewModel.campaign?.description ?? '',
viewModel.campaign?.getDescription() ?? '',
style: Theme.of(context).textTheme.bodyLarge,
textAlign: TextAlign.left,
),
Expand Down
Loading

0 comments on commit fdb8a5a

Please sign in to comment.