Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Release 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
x64Eddie committed Oct 5, 2020
2 parents 6176236 + 4bb5018 commit 9c39129
Show file tree
Hide file tree
Showing 87 changed files with 147 additions and 159 deletions.
30 changes: 30 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pull_request_rules:
- name: ask to resolve conflict
conditions:
- conflict
actions:
comment:
message: "This PR has conflicts. @{{author}}, is it possible for you to fix them? We can sync to discuss the problem should there be one"
- name: Hotfix merge
conditions:
- "#approved-reviews-by>=2"
- "head~=^hotfix"
- "base=stable"
actions:
backport:
branches:
- dev
- name: Automatic merge on approval
conditions:
- "#approved-reviews-by>=2"
- "-head~=^hotfix"
actions:
merge:
method: squash
- name: Wrong branch
conditions:
- "-head~=^hotfix"
- "base=stable"
actions:
close:
message: "Thank you for your contribution @{{author}}🎉! However, please double check if this PR goes into dev and not stable 🤔. The PR is going to be closed, please make another PR for dev!"
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ Parabeac-Core is an open-source repository that converts design files into Flutt
<a href="https://dev.to/parabeac">Dev.to</a>
</h3>

# What is Parabeac-Core?
Parabeac-Core is an open-source repository that converts design files into Flutter code. The biggest challenge in code conversion is achieving quality code, but in a tool like this, there’s so much variability in what quality code should look like. So Parabeac-Core is built in a way not to promise quality code, but to be driven by the community so that you can configure & tweak to you or your teams liking. See our [Manifesto](https://github.com/Parabeac/Parabeac-Core/blob/stable/MANIFESTO.md). We welcome contributors to improve Parabeac-Core, create [Parabeac Eggs](https://github.com/Parabeac/parabeac-egg-template), & to join our [Discord](https://discord.com/invite/qUrghes) community!


> :partying_face: **Special Shout out if you're here for #HacktoberFest! Double your swag by contributing to Parabeac as one of our first 100 contributors!**
# What is Parabeac-Core?
Parabeac-Core is an open-source repository that converts design files into Flutter code. The biggest challenge in code conversion is achieving quality code, but in a tool like this, there’s so much variability in what quality code should look like. So Parabeac-Core is built in a way not to promise quality code, but to be driven by the community so that you can configure & tweak to you or your teams liking. See our [Manifesto](https://github.com/Parabeac/Parabeac-Core/blob/stable/MANIFESTO.md). We welcome contributors to improve Parabeac-Core, create [Parabeac Eggs](https://github.com/Parabeac/parabeac-egg-template), & to join our [Discord](https://discord.com/invite/qUrghes) community!




# Get Started

If you have any trouble with getting Parabeac-Core running, check out this video! [![Parabeac-Core Getting Started](https://img.youtube.com/vi/e4CJgPMNCyo/0.jpg)](https://www.youtube.com/watch?v=e4CJgPMNCyo&feature=youtu.be)
Expand Down
7 changes: 5 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ targets:
builders:
parabeac_core|json_serializable:
generate_for:
- lib/**
include:
- lib/**
exclude:
- test/lib/**
options:
any_map: false
checked: false
create_factory: true
create_to_json: true
disallow_unrecognized_keys: false
explicit_to_json: false
ignore_unannotated: false
ignore_unannotated: true
include_if_null: true
nullable: true
4 changes: 2 additions & 2 deletions lib/eggs/injected_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class InjectedNavbar extends PBEgg implements PBInjectedIntermediate {

String UUID;

String widgetType = 'AppBar';


InjectedNavbar(Point topLeftCorner, Point bottomRightCorner, this.UUID,
{this.currentContext})
Expand Down Expand Up @@ -80,7 +80,7 @@ class InjectedNavbar extends PBEgg implements PBInjectedIntermediate {
}

class PBAppBarGenerator extends PBGenerator {
PBAppBarGenerator() : super('AppBar');
PBAppBarGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
3 changes: 1 addition & 2 deletions lib/eggs/injected_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import 'package:uuid/uuid.dart';
class Tab extends PBEgg implements PBInjectedIntermediate {
PBContext currentContext;

String widgetType = 'Tab';

PrototypeNode prototypeNode;

Expand Down Expand Up @@ -88,7 +87,7 @@ class Tab extends PBEgg implements PBInjectedIntermediate {
}

class PBTabGenerator extends PBGenerator {
PBTabGenerator() : super('Tab');
PBTabGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
4 changes: 1 addition & 3 deletions lib/eggs/injected_tab_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class InjectedTabBar extends PBEgg implements PBInjectedIntermediate {
String semanticName = '.*tabbar';
List<Tab> tabs = [];

String widgetType = 'APPBAR';

InjectedTabBar(
Point topLeftCorner,
Point bottomRightCorner,
Expand Down Expand Up @@ -65,7 +63,7 @@ class InjectedTabBar extends PBEgg implements PBInjectedIntermediate {
}

class PBTabBarGenerator extends PBGenerator {
PBTabBarGenerator() : super('TABBAR');
PBTabBarGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte

///For example, generating the size of Container or any other widget.
abstract class PBAttributesHelper extends PBGenerator {
PBAttributesHelper(String widgetType) : super(widgetType);
PBAttributesHelper() : super();
@override
String generate(PBIntermediateNode source);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import 'package:parabeac_core/interpret_and_optimize/entities/inherited_container.dart';

class PBBoxDecorationHelper extends PBAttributesHelper {
PBBoxDecorationHelper() : super('borderInfo');
PBBoxDecorationHelper() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/inherited_scaffold
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

class PBColorGenHelper extends PBAttributesHelper {
PBColorGenHelper() : super('color');
PBColorGenHelper() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import '../pb_flutter_generator.dart';

class PBSizeHelper extends PBAttributesHelper {
PBSizeHelper() : super('size');
PBSizeHelper() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
1 change: 0 additions & 1 deletion lib/generation/generators/config/pb_generator_const.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/generation/generators/helpers/pb_gen_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte

abstract class PBGenHelper {
String generate(PBIntermediateNode source);
bool containsIntermediateNode(PBIntermediateNode widgetType);
bool containsIntermediateNode(PBIntermediateNode node);
void registerIntemediateNode(PBIntermediateNode generator);
}
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_column_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import '../pb_flutter_generator.dart';

class PBColumnGenerator extends PBLayoutGenerator {
PBColumnGenerator() : super('COLUMN');
PBColumnGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_layout_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:parabeac_core/generation/generators/pb_generator.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

abstract class PBLayoutGenerator extends PBGenerator {
PBLayoutGenerator(String widgetType) : super(widgetType);
PBLayoutGenerator() : super();

@override
String generate(PBIntermediateNode source);
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_row_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import '../pb_flutter_generator.dart';

class PBRowGenerator extends PBLayoutGenerator {
PBRowGenerator() : super('ROW');
PBRowGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_scaffold_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import '../pb_flutter_generator.dart';

class PBScaffoldGenerator extends PBGenerator {
PBScaffoldGenerator() : super('Scaffold');
PBScaffoldGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_stack_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import '../pb_flutter_generator.dart';

class PBStackGenerator extends PBGenerator {
PBStackGenerator() : super('Stack');
PBStackGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/layouts/pb_v_scrollview_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:parabeac_core/generation/generators/layouts/pb_layout_gen.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

class PBVerticalScrollViewGen extends PBLayoutGenerator {
PBVerticalScrollViewGen() : super('VERTICAL_SCROLLVIEW');
PBVerticalScrollViewGen() : super();
// PBIntermediateColumnLayout
@override
String generate(PBIntermediateNode source) {
Expand Down
5 changes: 3 additions & 2 deletions lib/generation/generators/pb_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import 'package:parabeac_core/generation/generators/pb_widget_manager.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

abstract class PBGenerator {
@Deprecated('Widget Indentifier is not being used anymore')
final String WIDGET_TYPE_IDENTIFIER = 'widgetType';
final String OBJECTID = 'do_objectID';
final String widgetType;
PBGenerationManager _manager;
set manager (PBGenerationManager generationManager) => _manager = generationManager;
PBGenerationManager get manager => _manager;

PBGenerator(this.widgetType);
PBGenerator();
String generate(PBIntermediateNode source);

///Generating just a line in the code; this is used when to 'special' handleing is
@Deprecated('Widget Indentifier is not being used anymore')
String generateMapEntry(String key, String value) =>
value == null || key == WIDGET_TYPE_IDENTIFIER ? '' : '$key : $value,';
}
2 changes: 1 addition & 1 deletion lib/generation/generators/symbols/pb_instancesym_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import 'package:quick_log/quick_log.dart';

class PBSymbolInstanceGenerator extends PBGenerator {
PBSymbolInstanceGenerator() : super('SYMBOL_INSTANCE');
PBSymbolInstanceGenerator() : super();

var log = Logger('Symbol Instance Generator');

Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/symbols/pb_mastersym_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PBMasterSymbolGenerator extends PBGenerator {
};
List<PBSymbolMasterParameter> _parameterDefinition = [];

PBMasterSymbolGenerator() : super('PBSymbolMaster');
PBMasterSymbolGenerator() : super();

///Generating the parameters of the symbol master, keeping [definitions] so
///we can replace the generic names of the paramters by that of the real overridable node's name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:parabeac_core/generation/generators/pb_variable.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

class PBSymbolMasterParamGen extends PBGenerator {
PBSymbolMasterParamGen() : super('PBSymbolMasterParam');
PBSymbolMasterParamGen() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/visual-widgets/pb_align_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../pb_flutter_generator.dart';

class PBAlignGenerator extends PBGenerator {
var log = Logger('Align Generator');
PBAlignGenerator() : super('ALIGN');
PBAlignGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/inherited_bitmap.d
class PBBitmapGenerator extends PBGenerator {
var _sizehelper;

PBBitmapGenerator() : super('Bitmap') {
PBBitmapGenerator() : super() {
_sizehelper = PBSizeHelper();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../pb_flutter_generator.dart';
class PBContainerGenerator extends PBGenerator {
String color;

PBContainerGenerator() : super('CONTAINER');
PBContainerGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:parabeac_core/generation/generators/pb_generator.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

class PBCupertinoSearchBar extends PBGenerator {
PBCupertinoSearchBar() : super('CUPERTINOSEARCHBAR');
PBCupertinoSearchBar() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../pb_flutter_generator.dart';

class PBFlexibleGenerator extends PBGenerator {
var log = Logger('Flexible Generator');
PBFlexibleGenerator() : super('FLEXIBLE');
PBFlexibleGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../pb_flutter_generator.dart';
import '../pb_generator.dart';

class PBPaddingGen extends PBGenerator {
PBPaddingGen() : super('PADDING');
PBPaddingGen() : super();

String relativePadding(BUILDER_TYPE type, bool isVertical, double value) {
var fixedValue = value.toStringAsFixed(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:quick_log/quick_log.dart';
import '../pb_flutter_generator.dart';

class PBPositionedGenerator extends PBGenerator {
PBPositionedGenerator() : super('POSITIONED');
PBPositionedGenerator() : super();
var log = Logger('Positioned Generator');

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte

class PBShapeGroupGen extends PBGenerator {
var _sizehelper;
PBShapeGroupGen() : super('ShapeGroup') {
PBShapeGroupGen() : super() {
_sizehelper = PBSizeHelper();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:parabeac_core/generation/generators/pb_generator.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';
import 'package:parabeac_core/interpret_and_optimize/entities/alignments/spacer.dart';
class PBSpacerGenerator extends PBGenerator {
PBSpacerGenerator() : super('SPACER');
PBSpacerGenerator() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 1 addition & 1 deletion lib/generation/generators/visual-widgets/pb_text_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:parabeac_core/interpret_and_optimize/entities/inherited_text.dar
import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_intermediate_node.dart';

class PBTextGen extends PBGenerator {
PBTextGen() : super('TEXT');
PBTextGen() : super();

@override
String generate(PBIntermediateNode source) {
Expand Down
2 changes: 0 additions & 2 deletions lib/generation/prototyping/pb_dest_holder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import 'package:parabeac_core/interpret_and_optimize/entities/subclasses/pb_inte
import 'package:parabeac_core/interpret_and_optimize/value_objects/point.dart';

class PBDestHolder extends PBIntermediateNode {
@override
String widgetType = 'PROTOTYPE';

PrototypeNode pNode;

Expand Down
2 changes: 1 addition & 1 deletion lib/generation/prototyping/pb_prototype_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PBPrototypeGenerator extends PBGenerator {
PrototypeNode prototypeNode;
PBPrototypeStorage _storage;

PBPrototypeGenerator(this.prototypeNode) : super('PROTOTYPE') {
PBPrototypeGenerator(this.prototypeNode) : super() {
_storage = PBPrototypeStorage();
}

Expand Down
7 changes: 7 additions & 0 deletions lib/generation/prototyping/pb_prototype_node.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import 'package:json_annotation/json_annotation.dart';

part 'pb_prototype_node.g.dart';

@JsonSerializable(nullable: true)
class PrototypeNode {
PrototypeNode(this.destinationUUID, {this.destinationName});
String destinationUUID;
String destinationName;
factory PrototypeNode.fromJson(Map<String, dynamic> json) => _$PrototypeNodeFromJson(json);
Map<String, dynamic> toJson() => _$PrototypeNodeToJson(this);
}
Loading

0 comments on commit 9c39129

Please sign in to comment.