Skip to content

Commit

Permalink
Merge pull request #39 from PLGuerraDesigns/dev
Browse files Browse the repository at this point in the history
Menu Improvements
  • Loading branch information
PLGuerraDesigns authored Aug 15, 2024
2 parents 8db317a + e79f1c3 commit a9a09fa
Show file tree
Hide file tree
Showing 19 changed files with 656 additions and 335 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2.7.0

- NEW: Added a filter menu to the Personal Projects section.

## 2.6.3

- REVISED: Added a description to the Professional Experience and Personal Projects menu sections.

## 2.6.2

- REVISED: Added a confirmation dialog to the `Contact Me` button in the action menu.
- REVISED: Added an `About` button to the action menu.

## 2.6.1

- REVISED: Disabled the tilt effect on mobile devices.
Expand Down
25 changes: 25 additions & 0 deletions assets/json/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@
}
],
"tags": [
"Academic",
"Software",
"Flutter",
"Dart",
"Progressive Web App",
Expand Down Expand Up @@ -276,6 +278,7 @@
}
],
"tags": [
"Software",
"Flutter",
"Syncfusion",
"Dart",
Expand Down Expand Up @@ -346,6 +349,8 @@
}
],
"tags": [
"Academic",
"Software",
"Flutter",
"Flame",
"Supabase",
Expand Down Expand Up @@ -535,6 +540,8 @@
}
],
"tags": [
"Software",
"Electronics",
"Adobe Photoshop",
"Adobe Illustrator",
"Autodesk Fusion 360",
Expand Down Expand Up @@ -644,6 +651,8 @@
}
],
"tags": [
"Academic",
"Software",
"Adobe Photoshop",
"Adobe Illustrator",
"Adobe XD",
Expand Down Expand Up @@ -720,6 +729,7 @@
}
],
"tags": [
"Electronics",
"Autodesk Fusion 360",
"CAD Design",
"3D Printing",
Expand Down Expand Up @@ -879,6 +889,8 @@
],
"externalLinks": [],
"tags": [
"Software",
"Electronics",
"Fiberglass",
"Painting",
"DIY",
Expand Down Expand Up @@ -975,6 +987,8 @@
}
],
"tags": [
"Software",
"Electronics",
"Autodesk Fusion 360",
"CAD Design",
"3D Printing",
Expand Down Expand Up @@ -1048,6 +1062,8 @@
}
],
"tags": [
"Software",
"Electronics",
"Head Tracking",
"Handicap",
"MPU 6050",
Expand Down Expand Up @@ -1088,6 +1104,8 @@
}
],
"tags": [
"Academic",
"Software",
"Adobe Photoshop",
"Calculator",
"UARK CSCE 4623",
Expand Down Expand Up @@ -1125,6 +1143,8 @@
}
],
"tags": [
"Software",
"Electronics",
"Autodesk Fusion 360",
"Cherry MX Switches",
"3D Printing",
Expand Down Expand Up @@ -1163,6 +1183,8 @@
}
],
"tags": [
"Software",
"Electronics",
"Autodesk Fusion 360",
"3D Printing",
"Internet of Things",
Expand Down Expand Up @@ -1253,6 +1275,9 @@
],
"externalLinks": [],
"tags": [
"Academic",
"Software",
"Electronics",
"Highschool Science Fair",
"Fiberglass",
"Mechanical Arm",
Expand Down
6 changes: 3 additions & 3 deletions lib/common/routing/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import '../../pages/details/details.screen.dart';
import '../../pages/error.dart';
import '../../pages/home/home.screen.dart';
import '../../pages/loading.dart';
import '../../pages/personal_projects/projects_menu.screen.dart';
import '../../pages/professional_experiences/prof_exp_menu.screen.dart';
import '../../pages/personal_projects/projects_menu.dart';
import '../../pages/professional_exp_menu.dart';
import 'routes.dart';

/// A class that configures the app's routing.
Expand Down Expand Up @@ -61,7 +61,7 @@ class AppRouter {
GoRoute(
path: Routes.professional,
builder: (BuildContext context, GoRouterState state) =>
const ProfessionalExpMenuScreen(),
const ProfessionalExperienceMenuScreen(),
routes: <GoRoute>[
GoRoute(
path: '${Routes.details}/:title',
Expand Down
19 changes: 17 additions & 2 deletions lib/common/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Strings {

static const String currentLocation = 'VA, USA';
static const String lastUpdated = 'Updated AUG 2024';
static const String contactEmail = 'plguerra@outlook.com';

static const List<String> headerSubtitles = <String>[
'Software Engineer • Innovator • Technologist',
Expand Down Expand Up @@ -36,11 +37,14 @@ class Strings {
static const String prev = 'Prev.';
static const String next = 'Next';
static const String viewAllMedia = 'View all Media';
static const String about = 'About';
static const String viewSourceCode = 'View Source Code';
static const String professionalExperiences = 'Professional Experiences';
static const String previousProject = 'Previous Project';
static const String nextProject = 'Next Project';
static const String professionalExperiencesExplained =
'These are projects I have undertaken professionally, whether as a full-time, part-time employee, or contractor.';
static const String personalProjects = 'Personal Projects';
static const String personalProjectsExplained =
'These are projects I’ve undertaken both in my free time and during my studies to explore new technologies, engineering principles, and artistic expressions.';
static const String contactMe = 'Contact Me';
static const String reportAnIssue = 'Report an Issue';
static const String moreInfo = 'More Info';
Expand All @@ -55,4 +59,15 @@ class Strings {
static const String selectACategoryToViewTheEntries =
'Select a category to view the entries.';
static const String expected = 'Expected';
static const String contactMeMessage =
'Thank you for your interest in contacting me, please feel free to reach out to me via email at:';
static const String copyToClipboard = 'Copy to Clipboard';
static const String emailCopied = 'Email copied to clipboard';
static const String openEmailApp = 'Open Email App';
static const String close = 'Close';

static const String software = 'Software';
static const String electronics = 'Electronics';
static const String threeDPrinting = '3D Printing';
static const String academic = 'Academic';
}
12 changes: 8 additions & 4 deletions lib/common/urls.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'strings.dart';

/// A class that contains all the urls used in the app.
class Urls {
Urls._();
Expand All @@ -6,19 +8,21 @@ class Urls {

static const String portfolioBase =
'https://plguerradesigns.github.io/portfolio/#';
static const String projectIssues =
'https://github.com/PLGuerraDesigns/portfolio/issues';
static const String projectSourceCode =
'https://github.com/PLGuerraDesigns/portfolio';
static const String changelog =
static const String projectReadme =
'https://github.com/PLGuerraDesigns/portfolio/blob/master/README.md';
static const String projectIssues =
'https://github.com/PLGuerraDesigns/portfolio/issues';
static const String projectChangelog =
'https://github.com/PLGuerraDesigns/portfolio/blob/master/CHANGELOG.md';

static const String github = 'https://github.com/PLGuerraDesigns';
static const String thingiverse =
'https://www.thingiverse.com/plg_designs/designs';
static const String linkedin = 'https://www.linkedin.com/in/plguerra/';
static const String youtube = 'https://www.youtube.com/@plguerra';
static const String contactEmail = 'mailto:plguerra@outlook.com';
static const String openEmail = 'mailto:${Strings.contactEmail}';

static const String googleSearchBase = 'https://www.google.com/search?q=';

Expand Down
52 changes: 50 additions & 2 deletions lib/models/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/services.dart';

import '../common/asset_paths.dart';
import '../common/routing/routes.dart';
import '../common/strings.dart';
import 'education.dart';
import 'professional_experience.dart';
import 'project.dart';
Expand All @@ -22,6 +23,37 @@ class AppState extends ChangeNotifier {
final GlobalKey<NavigatorState> _navigatorKey = GlobalKey<NavigatorState>();
GlobalKey<NavigatorState> get navigatorKey => _navigatorKey;

/// The list of project filter options.
final List<String> projectFilterOptions = <String>[
Strings.software,
Strings.electronics,
Strings.threeDPrinting,
Strings.academic,
];

/// The list of selected project filters.
List<String> get selectedProjectFilters => _selectedProjectFilters;
final List<String> _selectedProjectFilters = <String>[
Strings.software,
Strings.electronics,
Strings.threeDPrinting,
Strings.academic,
];

/// Toggles the selected project filter.
void toggleSelectedProjectFilter(String filter) {
if (selectedProjectFilters.length == projectFilterOptions.length) {
_selectedProjectFilters.clear();
}

if (_selectedProjectFilters.contains(filter)) {
_selectedProjectFilters.remove(filter);
} else {
_selectedProjectFilters.add(filter);
}
notifyListeners();
}

/// Whether the project data has been loaded.
bool _projectsLoaded = false;
bool get projectsLoaded => _projectsLoaded;
Expand All @@ -30,6 +62,20 @@ class AppState extends ChangeNotifier {
List<Project> get projects => _projects;
List<Project> _projects = <Project>[];

/// The list of filtered projects.
List<Project> get filteredProjects {
final List<Project> filteredProjects = <Project>[];
for (final Project project in _projects) {
for (final String filter in selectedProjectFilters) {
if (project.tags.contains(filter)) {
filteredProjects.add(project);
break;
}
}
}
return filteredProjects;
}

/// Returns the project for the given title in path format.
Project getProjectByTitlePath(String titleAsPath) {
for (final Project project in _projects) {
Expand Down Expand Up @@ -101,14 +147,16 @@ class AppState extends ChangeNotifier {
await rootBundle.loadString(AssetPaths.projectsJsonData).then(
(String data) {
final dynamic jsonResult = json.decode(data);
for (final dynamic project in jsonResult as List<dynamic>) {
_projects.add(Project.fromJson(project as Map<String, dynamic>));
for (final dynamic projectAsJson in jsonResult as List<dynamic>) {
_projects
.add(Project.fromJson(projectAsJson as Map<String, dynamic>));
}
},
);
_projects.sort((Project a, Project b) {
return b.startDate.compareTo(a.startDate);
});

_projectsLoaded = true;
}

Expand Down
Loading

0 comments on commit a9a09fa

Please sign in to comment.