From aa9a8c1b23a5184895513b0d48687290695d7fec Mon Sep 17 00:00:00 2001 From: Bryan Figueroa Date: Thu, 20 Jan 2022 17:44:01 -0700 Subject: [PATCH 01/15] Added warning message to .g files --- .../commands/entry_file_command.dart | 10 ++++++---- .../commands/export_platform_command.dart | 13 +++++-------- .../commands/node_file_structure_command.dart | 4 ++-- .../pb_file_structure_strategy.dart | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/lib/generation/generators/value_objects/file_structure_strategy/commands/entry_file_command.dart b/lib/generation/generators/value_objects/file_structure_strategy/commands/entry_file_command.dart index 546f87a7..38dc8524 100644 --- a/lib/generation/generators/value_objects/file_structure_strategy/commands/entry_file_command.dart +++ b/lib/generation/generators/value_objects/file_structure_strategy/commands/entry_file_command.dart @@ -32,7 +32,9 @@ class EntryFileCommand extends NodeFileStructureCommand { this.projectName = 'Parabeac-Core Generated Project', this.mainCode = 'runApp(MyApp());', FileOwnership ownership = FileOwnership.DEV}) - : super('ENTRY_FILE', ''' + : super( + 'ENTRY_FILE', + ''' import 'package:flutter/material.dart'; $entryScreenImport @@ -55,7 +57,8 @@ class MyApp extends StatelessWidget { } } - ''', ownership) { + ''', + ownership) { if ((entryScreenImport == null && entryScreenName != null) || (entryScreenName == null && entryScreenName != null)) { throw NullThrownError(); @@ -66,7 +69,6 @@ class MyApp extends StatelessWidget { Future write(FileStructureStrategy strategy) { strategy.writeDataToFile( code, strategy.GENERATED_PROJECT_PATH, p.join('lib', mainFileName), - UUID: UUID, - ownership: ownership); + UUID: UUID, ownership: ownership); } } diff --git a/lib/generation/generators/value_objects/file_structure_strategy/commands/export_platform_command.dart b/lib/generation/generators/value_objects/file_structure_strategy/commands/export_platform_command.dart index 2da9f045..b0796bea 100644 --- a/lib/generation/generators/value_objects/file_structure_strategy/commands/export_platform_command.dart +++ b/lib/generation/generators/value_objects/file_structure_strategy/commands/export_platform_command.dart @@ -12,13 +12,9 @@ class ExportPlatformCommand extends NodeFileStructureCommand { static final String WIDGET_PATH = 'lib/screens'; ExportPlatformCommand( - String UUID, - this.platform, - this.folderName, - this.fileName, - String code, - {FileOwnership ownership = FileOwnership.PBC} - ) : super(UUID, code, ownership); + String UUID, this.platform, this.folderName, this.fileName, String code, + {FileOwnership ownership = FileOwnership.PBC}) + : super(UUID, code, ownership); @override Future write(FileStructureStrategy strategy) async { @@ -28,6 +24,7 @@ class ExportPlatformCommand extends NodeFileStructureCommand { folderName, platform.toString().toLowerCase().replaceAll('platform.', ''), ); - strategy.writeDataToFile(code, path, fileName, UUID: UUID, ownership: ownership); + strategy.writeDataToFile(code, path, fileName, + UUID: UUID, ownership: ownership); } } diff --git a/lib/generation/generators/value_objects/file_structure_strategy/commands/node_file_structure_command.dart b/lib/generation/generators/value_objects/file_structure_strategy/commands/node_file_structure_command.dart index 4766a983..4b4d56ae 100644 --- a/lib/generation/generators/value_objects/file_structure_strategy/commands/node_file_structure_command.dart +++ b/lib/generation/generators/value_objects/file_structure_strategy/commands/node_file_structure_command.dart @@ -1,5 +1,6 @@ import 'package:parabeac_core/generation/generators/value_objects/file_structure_strategy/commands/file_structure_command.dart'; import 'package:parabeac_core/generation/generators/value_objects/file_structure_strategy/file_ownership_policy.dart'; +import 'package:path/path.dart'; /// Class that relies on `code` to implement its `write` method. abstract class NodeFileStructureCommand extends FileStructureCommand { @@ -9,7 +10,6 @@ abstract class NodeFileStructureCommand extends FileStructureCommand { /// through [write] FileOwnership ownership; - NodeFileStructureCommand(String UUID, this.code, - this.ownership) + NodeFileStructureCommand(String UUID, this.code, this.ownership) : super(UUID); } diff --git a/lib/generation/generators/value_objects/file_structure_strategy/pb_file_structure_strategy.dart b/lib/generation/generators/value_objects/file_structure_strategy/pb_file_structure_strategy.dart index aa332535..6189ae61 100644 --- a/lib/generation/generators/value_objects/file_structure_strategy/pb_file_structure_strategy.dart +++ b/lib/generation/generators/value_objects/file_structure_strategy/pb_file_structure_strategy.dart @@ -185,6 +185,10 @@ abstract class FileStructureStrategy implements CommandInvoker { p.setExtension( name, fileOwnershipPolicy.getFileExtension(ownership, ext))); + if (FileOwnership.PBC == ownership) { + data = _setHeader(data); + } + if (_fileSystemAnalyzer.containsFile(file.path) && ownership == FileOwnership.DEV) { /// file is going to be ignored @@ -248,6 +252,18 @@ abstract class FileStructureStrategy implements CommandInvoker { } } + String _setHeader(String code) { + return ''' +// ********************************************************************************* +// PARABEAC-GENERATED CODE. DO NOT MODIFY. +// +// FOR MORE INFORMATION ON HOW TO USE PARABEAC, PLEASE VISIT docs.parabeac.com +// ********************************************************************************* + ''' + + '\n\n' + + code; + } + File getFile(String directory, String name) => File(p.join(directory, name)); } From c13857c7de48811caf9caefea521df951ed817dc Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Fri, 21 Jan 2022 11:34:12 -0700 Subject: [PATCH 02/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b24a435c..3e690857 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ We recommend following our [Hello World guide](https://docs.parabeac.com/docs/he ``` 3. Save `main.dart` and execute `flutter run` ### Running a Figma Component -![Figma Component Example](https://github.com/Parabeac/Parabeac-Core/blob/master/repo_assets/figma_component_example.png?raw=true) +![Figma Component Example](https://raw.githubusercontent.com/Parabeac/parabeac_core/stable/repo_assets/figma_component_example.png) 1. Navigate to a widget/screen where you can add in your component as a child. 2. Reference the component by providing a LayoutBuilder widget like the following: From 3a51d850732f310e7e38b17f95452807dd79bab4 Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Tue, 1 Feb 2022 17:53:34 -0700 Subject: [PATCH 03/15] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3e690857..77dfdddf 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ The handoff between designers & developers is one of the most costly and frustra * [Metrics](#metrics) # Get Started + + _If it's easier, you can run the code generation & send it to your Github repo by creating a free account using [Parabeac Nest](app.parabeac.com)._ ### Dependencies From 743f00aee496b21f57c21980aab7f5922cae0c97 Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Sat, 12 Feb 2022 19:06:20 -0700 Subject: [PATCH 04/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77dfdddf..3cdb352f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Parabeac Logo](https://github.com/Parabeac/Parabeac-Core/blob/stable/repo_assets/parabeac_core_image.png?raw=true) -Parabeac-Core converts design files into isolated & responsive Flutter code, continuously. +parabeac_core converts design files into isolated & responsive Flutter code, continuously. [![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qUrghes) [![https://twitter.com/parabeac?lang=en](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&style=plastic)](https://twitter.com/parabeac?lang=en) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/Parabeac/Parabeac-Core/blob/stable/CODE_OF_CONDUCT.md) bravemaster619's DEV Profile From 520322593725c7676c24d9a83be20cc60870f31e Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Sat, 12 Feb 2022 19:07:59 -0700 Subject: [PATCH 05/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cdb352f..80897a7d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#
Parabeac-Core +#
parabeac_core ![Parabeac Logo](https://github.com/Parabeac/Parabeac-Core/blob/stable/repo_assets/parabeac_core_image.png?raw=true) From 45fd72bcb3fb5058fcbd4662ae9ec7a19189b12b Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Thu, 17 Feb 2022 19:44:40 -0700 Subject: [PATCH 06/15] Update README.md --- README.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 80897a7d..d500df1b 100644 --- a/README.md +++ b/README.md @@ -3,27 +3,27 @@ ![Parabeac Logo](https://github.com/Parabeac/Parabeac-Core/blob/stable/repo_assets/parabeac_core_image.png?raw=true) -parabeac_core converts design files into isolated & responsive Flutter code, continuously. +parabeac_core converts design files into isolated & responsive Flutter code for continuos design & development. -[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qUrghes) [![https://twitter.com/parabeac?lang=en](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&style=plastic)](https://twitter.com/parabeac?lang=en) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/Parabeac/Parabeac-Core/blob/stable/CODE_OF_CONDUCT.md) bravemaster619's DEV Profile +[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qUrghes) [![https://twitter.com/parabeac?lang=en](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&style=plastic)](https://twitter.com/parabeac?lang=en) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/Parabeac/parabeac_core/blob/stable/CODE_OF_CONDUCT.md) bravemaster619's DEV Profile

Hello World · + Fundamental Laws of Parabeac + · Discord Community/Support · Dev.to · Youtube - · - Tutorials · -Reference Docs + Reference Docs

# Why are we here? -The handoff between designers & developers is one of the most costly and frustrating bottlenecks in app development. As design iteration becomes more critical in the execution of app development, this problem is increasingly important to solve. Parabeac-Core solves this by interpreting designs from tools like Figma and generating isolated & responsive Flutter code. By creating isolated UI, design changes & updates are supported forever. +The handoff between designers & developers is one of the most costly and frustrating bottlenecks in app development. As design iteration becomes more critical in the execution of app development, this problem is increasingly important to solve. parabeac_core solves this by interpreting designs from tools like Figma and generating isolated & responsive Flutter code. By creating isolated UI, design changes & updates are supported forever. # Table of Contents * [Dependencies](#dependencies) * [Cloning parabeac_core](#cloning-parabeac_core) @@ -38,7 +38,7 @@ The handoff between designers & developers is one of the most costly and frustra # Get Started - _If it's easier, you can run the code generation & send it to your Github repo by creating a free account using [Parabeac Nest](app.parabeac.com)._ + You can run the code generation by creating a free account with [Parabeac Nest](https://app.parabeac.com) or by following the instructions below. ### Dependencies @@ -48,9 +48,9 @@ The handoff between designers & developers is one of the most costly and frustra - [Figma File](https://figma.com) - [Sample](https://www.figma.com/file/Ysnjcij14HaE98ucq1iwW1/Parabeac-Counter-App-Demo?node-id=0%3A1) ## Cloning parabeac_core -Because parabeac-core contains submodules, it is easiest to clone using the following command: +Because parabeac_core contains submodules, it is easiest to clone using the following command: ``` -git clone --recurse-submodules https://github.com/Parabeac/Parabeac-Core.git +git clone --recurse-submodules https://github.com/Parabeac/parabeac_core.git ``` If you have already cloned you may need to pull the submodules: @@ -97,7 +97,7 @@ We recommend following our [Hello World guide](https://docs.parabeac.com/docs/he ### Running a Figma Frame/Screen -![Figma Frame Example](https://github.com/Parabeac/Parabeac-Core/blob/stable/repo_assets/figma_frame_example.png?raw=true) +![Figma Frame Example](https://github.com/Parabeac/parabeac_core/blob/stable/repo_assets/figma_frame_example.png?raw=true) #### Steps 1. Open your generated project (Will be at the absolute path you set or in the parabeac_core directory) 2. If your frame was designed to be a screen, you can quickly test it by editing the MaterialApp widget in main.dart like the following: @@ -131,6 +131,13 @@ Container( ``` 1. Save the class and execute `flutter run` in your terminal & navigate your app to the expected location where the component should show up. +# What's Next? +Be sure to complete our [Hello World Guide](https://docs.parabeac.com/docs/hello-world-guide) or read the [docs](https://docs.parabeac.com/) so you know how to handle the code generated. + +## Enabling the design team to create pull requests +If you find the viability in the code generation to support continuous design changes, create a free account on [Parabeac Nest](https://app.parabeac.com) where you can create an integration between Figma & the project Github repo. +## Stay up to date +Follow or subscribe to our [Twitter](https://twitter.com/parabeac), [Youtube](https://www.youtube.com/channel/UCgfDd4tQYZ5a_A5qxknmh8w), [Dev.to](https://dev.to/parabeac) &/or [Newsletter](https://share.hsforms.com/1uu1ZTrhPSwK69T2md__lCw5i54a) to stay up to date on product releases. And if you want to influence the direction of this project, create an [issue](https://github.com/Parabeac/parabeac_core/issues/new/choose) or join our [Discord](https://discord.gg/qUrghes), we'd love to hear your feedback. # Other ## Metrics -Parabeac-Core keeps track of a few data points to help us understand usage. Although we do not collect any personal information, you can turn off metrics at any time by creating the environment variable `PB_METRICS = "false"`. +parabeac_core keeps track of a few data points to help us understand usage. Although we do not collect any personal information, you can turn off metrics at any time by creating the environment variable `PB_METRICS = "false"`. From 82e3e33a268a6a13efbab015c38536b7ecb7af3e Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Wed, 23 Feb 2022 16:12:25 -0700 Subject: [PATCH 07/15] Update README for Widgetbook Support --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d500df1b..8ea0557b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Parabeac Logo](https://github.com/Parabeac/Parabeac-Core/blob/stable/repo_assets/parabeac_core_image.png?raw=true) -parabeac_core converts design files into isolated & responsive Flutter code for continuos design & development. +parabeac_core converts design files into isolated & responsive Flutter code for continuous design & development. [![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qUrghes) [![https://twitter.com/parabeac?lang=en](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&style=plastic)](https://twitter.com/parabeac?lang=en) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/Parabeac/parabeac_core/blob/stable/CODE_OF_CONDUCT.md) bravemaster619's DEV Profile @@ -33,8 +33,10 @@ The handoff between designers & developers is one of the most costly and frustra * [Running the generated code](#running-the-generated-code) * [Running a Figma Frame/Screen](#running-a-figma-framescreen) * [Running a Figma Component](#running-a-figma-component) + * [Running a Component Package with Widgetbook](#running-a-component-package) * [Other](#other) - * [Metrics](#metrics) + * [All parabeac_core configurations](#all-parabeac_core-configurations) + * [Metrics](#metrics) # Get Started @@ -130,7 +132,15 @@ Container( ) ``` 1. Save the class and execute `flutter run` in your terminal & navigate your app to the expected location where the component should show up. + + +### Running a component package +The best way to run and test a component package is to use tools like Storybook.js. We have an autogen for [Widgetbook](https://github.com/widgetbook/widgetbook). If you head over to `parabeac_core/lib/configurations/configurations.json` you can assign the property "componentIsolation" to "widgetbook" like the following. + +Configurations for Widgetbook + _Be sure to use Figma Components_ + # What's Next? Be sure to complete our [Hello World Guide](https://docs.parabeac.com/docs/hello-world-guide) or read the [docs](https://docs.parabeac.com/) so you know how to handle the code generated. @@ -139,5 +149,8 @@ If you find the viability in the code generation to support continuous design ch ## Stay up to date Follow or subscribe to our [Twitter](https://twitter.com/parabeac), [Youtube](https://www.youtube.com/channel/UCgfDd4tQYZ5a_A5qxknmh8w), [Dev.to](https://dev.to/parabeac) &/or [Newsletter](https://share.hsforms.com/1uu1ZTrhPSwK69T2md__lCw5i54a) to stay up to date on product releases. And if you want to influence the direction of this project, create an [issue](https://github.com/Parabeac/parabeac_core/issues/new/choose) or join our [Discord](https://discord.gg/qUrghes), we'd love to hear your feedback. # Other +## All parabeac_core Configurations + /// Some Table + ## Metrics parabeac_core keeps track of a few data points to help us understand usage. Although we do not collect any personal information, you can turn off metrics at any time by creating the environment variable `PB_METRICS = "false"`. From 1d1df04c2bfcf5e4acec01dff996055fa3512190 Mon Sep 17 00:00:00 2001 From: ivanhuerta20 Date: Wed, 23 Feb 2022 22:11:46 -0700 Subject: [PATCH 08/15] Hotfix Removing unnecessary configurations from configurations.json file --- lib/configurations/configurations.json | 9 +--- .../helpers/pb_configuration.dart | 44 +++++++++---------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/lib/configurations/configurations.json b/lib/configurations/configurations.json index 89102854..0fe1183e 100644 --- a/lib/configurations/configurations.json +++ b/lib/configurations/configurations.json @@ -1,15 +1,8 @@ { - "widgetStyle": "Material", - "widgetType": "Stateless", - "widgetSpacing": "Expanded", - "layoutPrecedence": ["column", "row", "stack"], - "state-management": "none", "breakpoints": { "mobile": 360, "tablet": 600, "desktop": 1280 }, - "scaling": true, - "enablePrototyping": false, - "componentIsolation": "none" + "componentIsolation": "widgetbook" } diff --git a/lib/interpret_and_optimize/helpers/pb_configuration.dart b/lib/interpret_and_optimize/helpers/pb_configuration.dart index aa1c8b5d..0f82d4aa 100644 --- a/lib/interpret_and_optimize/helpers/pb_configuration.dart +++ b/lib/interpret_and_optimize/helpers/pb_configuration.dart @@ -28,23 +28,23 @@ class PBConfiguration { String outputDirPath; - @JsonKey(defaultValue: 'Material') - final String widgetStyle; + // @JsonKey(defaultValue: 'Material') + final String widgetStyle = 'Material'; @JsonKey(defaultValue: true) final bool scaling; - @JsonKey(defaultValue: 'Stateless') - final String widgetType; + // @JsonKey(defaultValue: 'Stateless') + final String widgetType = 'Stateless'; - @JsonKey(defaultValue: 'Expanded') - final String widgetSpacing; + // @JsonKey(defaultValue: 'Expanded') + final String widgetSpacing = 'Expanded'; - @JsonKey(defaultValue: 'None', name: 'state-management') - final String stateManagement; + // @JsonKey(defaultValue: 'None', name: 'state-management') + final String stateManagement = 'none'; - @JsonKey(defaultValue: ['column', 'row', 'stack']) - final List layoutPrecedence; + // @JsonKey(defaultValue: ['column', 'row', 'stack']) + final List layoutPrecedence = ['column', 'row', 'stack']; @JsonKey(name: 'breakpoints') final Map breakpoints; @@ -56,11 +56,11 @@ class PBConfiguration { final String componentIsolation; PBConfiguration( - this.widgetStyle, - this.widgetType, - this.widgetSpacing, - this.stateManagement, - this.layoutPrecedence, + // this.widgetStyle, + // this.widgetType, + // this.widgetSpacing, + // this.stateManagement, + // this.layoutPrecedence, this.breakpoints, this.scaling, this.enablePrototyping, @@ -73,8 +73,8 @@ class PBConfiguration { /// value that is comming from [stateManagement]. factory PBConfiguration.fromJson(Map json) { var configuration = _$PBConfigurationFromJson(json); - configuration.generationConfiguration = - availableGenConfigs[configuration.stateManagement.toLowerCase()]; + // configuration.generationConfiguration = + // availableGenConfigs[configuration.stateManagement.toLowerCase()]; configuration.generationConfiguration ??= StatefulGenerationConfiguration(); return configuration; } @@ -83,11 +83,11 @@ class PBConfiguration { /// to take in. factory PBConfiguration.genericConfiguration() { var defaultConfigs = { - 'widgetStyle': 'Material', - 'widgetType': 'Stateless', - 'widgetSpacing': 'Expanded', - 'layoutPrecedence': ['columns', 'rows', 'stack'], - 'state-management': 'None' + // 'widgetStyle': 'Material', + // 'widgetType': 'Stateless', + // 'widgetSpacing': 'Expanded', + // 'layoutPrecedence': ['columns', 'rows', 'stack'], + // 'state-management': 'None' }; return PBConfiguration.fromJson(defaultConfigs); } From de4adf6403a54209ee8a6dc10ce78360948e4f69 Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Wed, 23 Feb 2022 22:36:23 -0700 Subject: [PATCH 09/15] Added all available parabeac_core configurations --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ea0557b..1f0b730a 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,11 @@ If you find the viability in the code generation to support continuous design ch Follow or subscribe to our [Twitter](https://twitter.com/parabeac), [Youtube](https://www.youtube.com/channel/UCgfDd4tQYZ5a_A5qxknmh8w), [Dev.to](https://dev.to/parabeac) &/or [Newsletter](https://share.hsforms.com/1uu1ZTrhPSwK69T2md__lCw5i54a) to stay up to date on product releases. And if you want to influence the direction of this project, create an [issue](https://github.com/Parabeac/parabeac_core/issues/new/choose) or join our [Discord](https://discord.gg/qUrghes), we'd love to hear your feedback. # Other ## All parabeac_core Configurations - /// Some Table +* `"componentIsolation"` - _Valid Values Below_ + * `"none"` + * `"widgetbook"` -- Generates a Widgetbook file +* `"breakpoints"` -- _(Beta)_ Describes where the breakpoints should be in the ResponsiveLayoutBuilder whenever there are multiple screens with the same name. + * An Array of Key Values: (`"name of breakpoint" : "breakpoint value (int)"`) ## Metrics parabeac_core keeps track of a few data points to help us understand usage. Although we do not collect any personal information, you can turn off metrics at any time by creating the environment variable `PB_METRICS = "false"`. From 0235539262804c2891e9506a7af5a1a6f7887f3b Mon Sep 17 00:00:00 2001 From: ivanhuerta20 Date: Wed, 23 Feb 2022 22:43:02 -0700 Subject: [PATCH 10/15] temporary fix to pb_congiuration.g.dart till null safety migration --- .../helpers/pb_configuration.g.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/interpret_and_optimize/helpers/pb_configuration.g.dart b/lib/interpret_and_optimize/helpers/pb_configuration.g.dart index 2927f498..3565ed49 100644 --- a/lib/interpret_and_optimize/helpers/pb_configuration.g.dart +++ b/lib/interpret_and_optimize/helpers/pb_configuration.g.dart @@ -8,12 +8,13 @@ part of 'pb_configuration.dart'; PBConfiguration _$PBConfigurationFromJson(Map json) { return PBConfiguration( - json['widgetStyle'] as String ?? 'Material', - json['widgetType'] as String ?? 'Stateless', - json['widgetSpacing'] as String ?? 'Expanded', - json['state-management'] as String ?? 'None', - (json['layoutPrecedence'] as List)?.map((e) => e as String)?.toList() ?? - ['column', 'row', 'stack'], + // Temporary Fix till null safety migration. + // json['widgetStyle'] as String ?? 'Material', + // json['widgetType'] as String ?? 'Stateless', + // json['widgetSpacing'] as String ?? 'Expanded', + // json['state-management'] as String ?? 'None', + // (json['layoutPrecedence'] as List)?.map((e) => e as String)?.toList() ?? + // ['column', 'row', 'stack'], json['breakpoints'] as Map, json['scaling'] as bool ?? true, json['enablePrototyping'] as bool ?? false, From d4707dcc4bf673916fce518281dcdc4032f60eba Mon Sep 17 00:00:00 2001 From: ivanhuerta20 Date: Mon, 28 Feb 2022 12:09:37 -0700 Subject: [PATCH 11/15] Updated for release --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index de9000ac..6af18201 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: parabeac_core description: A starting point for Dart libraries or applications. -version: 2.4.0 +version: 2.4.1 # homepage: https://www.example.com environment: From b4988601d4a9d2354e85209efc2fa4cbe261a526 Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Tue, 8 Mar 2022 11:46:11 -0600 Subject: [PATCH 12/15] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e95a0c7c..afc31ea0 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,8 @@ The best way to run and test a component package is to use tools like Storybook. _Be sure to use Figma Components_ + To run the widgetbook, instead of running the normal `flutter run`, you want to run `flutter run lib/main_widgetbook.g.dart`. + # What's Next? Be sure to complete our [Hello World Guide](https://docs.parabeac.com/docs/hello-world-guide) or read the [docs](https://docs.parabeac.com/) so you know how to handle the code generated. From d5b7098864feaa1e97bd352da588c0d0e5de1bbb Mon Sep 17 00:00:00 2001 From: Ivan Huerta Date: Tue, 15 Mar 2022 13:25:53 -0500 Subject: [PATCH 13/15] Updated Hello World README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 54686a45..a40f84a9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ parabeac_core converts design files into isolated & responsive Flutter code for [![Discord Chat](https://img.shields.io/discord/308323056592486420.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qUrghes) [![https://twitter.com/parabeac?lang=en](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&style=plastic)](https://twitter.com/parabeac?lang=en) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/Parabeac/parabeac_core/blob/stable/CODE_OF_CONDUCT.md) bravemaster619's DEV Profile

- Hello World + Hello World · Fundamental Laws of Parabeac · @@ -89,7 +89,7 @@ Due to the lack of requested support for Sketch and the major updates to this pr # Running the generated code -We recommend following our [Hello World guide](https://docs.parabeac.com/docs/hello-world-guide) but if you feel experienced enough with Flutter, feel free to jump right in here: +We recommend following our [Hello World guide](https://docs.parabeac.com/docs/hello-world) but if you feel experienced enough with Flutter, feel free to jump right in here: ### Running a Figma Frame/Screen ![Figma Frame Example](https://github.com/Parabeac/parabeac_core/blob/stable/repo_assets/figma_frame_example.png?raw=true) @@ -143,7 +143,7 @@ The best way to run and test a component package is to use tools like Storybook. To run the widgetbook, instead of running the normal `flutter run`, you want to run `flutter run lib/main_widgetbook.g.dart`. # What's Next? -Be sure to complete our [Hello World Guide](https://docs.parabeac.com/docs/hello-world-guide) or read the [docs](https://docs.parabeac.com/) so you know how to handle the code generated. +Be sure to complete our [Hello World Guide](https://docs.parabeac.com/docs/hello-world) or read the [docs](https://docs.parabeac.com/) so you know how to handle the code generated. ## Enabling the design team to create pull requests If you find the viability in the code generation to support continuous design changes, create a free account on [Parabeac Nest](https://app.parabeac.com) where you can create an integration between Figma & the project Github repo. From 93e91a06098735737a634b76b46312f0d2842efe Mon Sep 17 00:00:00 2001 From: Ivan <42812006+ivan-015@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:07:21 -0600 Subject: [PATCH 14/15] Fix PBFlutterWriter returning too early. --- .../generators/writers/pb_flutter_writer.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/generation/generators/writers/pb_flutter_writer.dart b/lib/generation/generators/writers/pb_flutter_writer.dart index 28f71f15..c43f43d1 100644 --- a/lib/generation/generators/writers/pb_flutter_writer.dart +++ b/lib/generation/generators/writers/pb_flutter_writer.dart @@ -97,14 +97,8 @@ class MyApp extends StatelessWidget { } /// Add assets - if (modifiableyaml.containsKey('flutter')) { - var assets = _getAssetFileNames(); - - /// If there are no assets to add, simply return. - if (assets.isEmpty) { - return; - } - + var assets = _getAssetFileNames(); + if (modifiableyaml.containsKey('flutter') && assets.isNotEmpty) { /// Add only elements that are not already in the yaml if (modifiableyaml['flutter'].containsKey('assets') && modifiableyaml['flutter']['assets'] != null) { From 9a20876a88aa71a63f944ffb0737730aa122b0fc Mon Sep 17 00:00:00 2001 From: Ivan <42812006+ivan-015@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:16:47 -0600 Subject: [PATCH 15/15] Increase to version 2.6.1 This is due to the small bugfix for assets --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 71ac646e..8837c2e7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: parabeac_core description: Continuous Design / Continuous Integration for Figma-to-Flutter -version: 2.6.0 +version: 2.6.1 # homepage: https://www.example.com environment: