Skip to content

Commit

Permalink
Merge pull request #56 from bridgedxyz/channels/beta
Browse files Browse the repository at this point in the history
2021.0.1 release
  • Loading branch information
softmarshmallow authored Jan 6, 2021
2 parents 70db1a6 + 4a40c99 commit 31172be
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 103 deletions.
41 changes: 18 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# CHANGELOG

> this changelog follows guideline at [keepachangelog.com](https://keepachangelog.com/en/1.0.0/)

> this changelog follows guideline at [keepachangelog.com](https://keepachangelog.com/en/1.0.0/)
## UNRELEASED

> unreleased features will be added here
- [packages/detection] Icon detection - determines if selected node should be considered as an icon or not.
- [packages/detection] Screen detection - determines if selected node should be considered as an screen or not.
- [packages/detection] Pattern detection - detects the patttern from givven layout (node), finds the pattern from it if exists. (used for List layout detection)
- [packages/detection] List detection - determines if selected node is a list of specific component, or complex layout.
- [interpreter/text] Dart String escape optimized, and fixed with execution order
- [interpreter/column] column crossAxisAlignment fixed with explicit order providence. Now supports start, end, center and stretch.



### Will be added

- [Builder] Core builder logic re-design
Expand All @@ -27,8 +21,19 @@
- [Flutter] Poligon Node support with XImage (svg)
- [Lint] Primal naming & grouping linting for better code export quality. this is tracked sperately on [lint](https://github.com/bridgedxyz/lint)

## [2021.0.1] - 2021-1-6

> Update focused on improving UI/UX, and console integrations. other tools will be added under toolbox
- [interpreter/text] Dart String escape optimized, and fixed with execution order
- [packages/detection] Icon detection - determines if selected node should be considered as an icon or not.
- [packages/detection] chip detection - determines if selected node should be considered as an chip or not.
- [packages/detection] button detection - determines if selected node should be considered as an button or not.
- [ui/tabs] New tabs are added (design, tools, contents)
- [ui/design] assistant design updated with clean and clear black theme.

## [0.1.3] - 2020-11-08

> Update focused on quicklook and resolving flutter compile issues.
- 3 major error causing building-logic is fixed.
Expand All @@ -37,13 +42,12 @@
- quicklook has major performance boost, up to 5 times faster loading time.
- dart character escape is implemented


## [0.1.2] - 2020-10-30
> Mainly update of quicklook feature. Make your design compiled within few seconds.
- [packages/design-sdk] using design SDK for better capability.
[features/quicklook] Newly added.

> Mainly update of quicklook feature. Make your design compiled within few seconds.
- [packages/design-sdk] using design SDK for better capability.
[features/quicklook] Newly added.

## [0.1.0] - 2020-10-23 (ETA)

Expand All @@ -55,19 +59,17 @@ Initial release of Bridged's figma plugin (a.k.a assistant)
- Supported : Fimga / Flutter
- Flutter code exporter built with [flutter-builder](https://github.com/bridgedxyz/flutter-builder)



### Info

[v0.1.0]

**name** : Bridged (design to flutter)

**description** :
**description** :

Bridged's assistant plugin that generates usable & readable flutter code for production. Run this plugin, Select any design of yours, It will generate ready-to-use formatted native flutter code for you.

*Notice*
_Notice_

No matter how big and complex frame you select, it will generate the code. Anyway we recommend you to use it on a component level for best experience. Code may not be manageable if you are tring to build full-screen level code in one single code base.

Expand All @@ -77,11 +79,7 @@ contribute on [github](https://github.com/bridgedxyz/assistant)

**support contact**: https://github.com/bridgedxyz/assistant/issues/new/choose

----




---

### Added

Expand Down Expand Up @@ -109,13 +107,10 @@ contribute on [github](https://github.com/bridgedxyz/assistant)
- preview interface -- shows the selected node's image on preview
- code section -- shows the generated code



### Changed

N/A -- this is an initial release

### Removed

N/A -- this is an initial release

48 changes: 16 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
framework: figma, flutter, react
platform: Android, iOS, Web, macOS, Linux, Windows
title: bridged figma plugin
title: bridged assistant plugin
---

<meta name="description" content="figma to flutter code exporter, lint your design. generate human level quality code from figma">
<meta name="title" content="bridged assistant">


![bridged assistant](./branding/assistant-cover-v0.1.1.png)



# Bridged Assistant plugin (figma to flutter)

- ✅ Human readable code generation.
- ✅ code generation built with CoLI, developed especially for assistant usage, ensuring the best code generation quality.
- ✅ Slots support (Component with parameters)
Expand All @@ -24,14 +22,13 @@ title: bridged figma plugin

> install figma plugin via below link. note that the published plugin is allways behind few new features behind this repository. for trying out the latest and mindblowing features, please build from your local environment directly.

install via figma plugin [link here](https://www.figma.com/community/plugin/896445082033423994)


> Cloning and running the project.
> we use yarn workspace for maintaining this project as monorepository.
> Some additional steps are required to run this project properly.
``` shell
```shell
# [REQUIRED] we use git submodules for `packages/`. you have to explicitly execute this command instead default clone.
git clone --recurse-submodules https://github.com/bridgedxyz/assistant.git

Expand All @@ -47,73 +44,61 @@ yarn figma
yarn sketch
```

*soon as the subpackages are released as stable, we will remove git submodule dependency for ease of use. until then, this will be the primary repository and all the edits and PRs will be caused by this project.*


_soon as the subpackages are released as stable, we will remove git submodule dependency for ease of use. until then, this will be the primary repository and all the edits and PRs will be caused by this project._

> sometimes, when pulling this repo from remote, if new submodule package is added, you'll need to run below command to pull with updated submodules (we recommand you to know what this command actually does in a nut shell.)
``` shell
```shell
git submodule update --init --recursive
```


### Pre-requisites

- [Node.js](https://nodejs.org/)
- [Figma desktop app](https://figma.com/downloads/)



## Flutter code builder



![](doc/gifs/quicklook-demo-v002.gif)



flutter widget builder is done by [figma/flutter](/flutter) and the core builder is powered by [bridged's dynamic](https://github.com/bridgedxyz/dynamic)

- [figma/flutter](/figma/src/flutter)
- [bridgedxyz/flutter-js](https://github.com/bridgedxyz/flutter-builder)
- [bridgedxyz/dynamic](https://github.com/bridgedxyz/dynamic)


-`Theme.of` Textstyle support
-`Colors.` Color support
- ✅ Slots support (not static content)
- ✅ Modularized builder functions - (not all-in-one widget tree)
- ✅ formatted dart code
- ✅ Best code quality (I Assure,) in this planet

## Console & Cloud integrations

> Watch the demo on our [website](https://bridged.xyz)
## UI Element Detection

> rule based button / input / icon detection with [@reflect.bridged.xyz/detection](./packages/detection)
> Higher quality ML based detection available at [Bridged's context engine](https://github.com/bridgedxyz/context)

### Debugging

Use `console.log` statements to inspect values in your code.

To open the developer console in the Figma desktop app, go to `Plugins``Development``Open Console`.



### Change Log

visit [CHANGELOG.md](./CHANGELOG.md)




## Development guide


### Building the plugin

See [plugin README](/plugin/README.md)


### Docs

- [Create Figma Plugin docs](https://github.com/yuanqing/create-figma-plugin#docs)
Expand All @@ -124,20 +109,19 @@ See [plugin README](/plugin/README.md)
See this project's contributing guideline [here](./CONTRIBUTING.md).
And general bridged project contribution and collaboration guideline [here](https://github.com/bridgedxyz/contributing-and-license).


## LEGAL

> read [LICENSE](./LICENSE).
***to shortly brief,***
**_to shortly brief,_**

- any form of modifing this software, including clone, fork, merge is allowed with no restrictions.
- making profit "by using" this software is allowed with no restrictions.
- making profit "by re-distributing" is not allowed. recap, you cannot publish this plugin as an alternative to this original plugin.
-- why is that? we are taking "minimum" profit from this software, we will prevent from other enterprise from copycatting this software.
-- why is that? we are taking "minimum" profit from this software, we will prevent from other enterprise from copycatting this software.
- the code and packages distributed via this repository is free to use without any restrictions.
- code, design is free to use and modify. (just don't make any profits by re-distributing this plugin.)



### DISCLAIMER

re-use of this software and it's license is overrided by [contributing-and-license](https://github.com/bridgedxyz/contributing-and-license)
47 changes: 27 additions & 20 deletions figma/src/app/screens/tool-box/font-replacer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
import React from "react"
import React from "react";
import { Button } from "@material-ui/core";
import { EK_REPLACE_FONT } from "../../../constants/ek.constant";

export function FontReplacerScreen() {
function onReplaceFontClick() {
console.log("onReplaceFontClick");

function onReplaceFontClick() {
console.log('onReplaceFontClick')
parent.postMessage(
{
pluginMessage: {
type: EK_REPLACE_FONT,
data: {
// todo add more options for user to chose font maps to be replaced
},
},
},
"*"
);
}

parent.postMessage({
pluginMessage: {
type: EK_REPLACE_FONT,
data: {
// todo add more options for user to chose font maps to be replaced
}
}
}, "*")
}

return <div>
<p>
converts all text in selected frame as Roboto Regular.
this can be used when no font on original design is installed on your device.
</p>
<Button onClick={onReplaceFontClick}>replace fonts to roboto regular</Button>
return (
<div>
<em>WARNING! this is a hightly distructive operation.</em>
<p>
converts all text in selected frame as Roboto Regular. this can be used
when no font on original design is installed on your device.
</p>
<Button variant="outlined" onClick={onReplaceFontClick} color="secondary">
replace fonts to roboto regular
</Button>
</div>
}
);
}
22 changes: 14 additions & 8 deletions figma/src/app/states/app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ export enum WorkspaceMode {
}

export enum WorkScreen {
code,
icon,
lint,
g11n,
dev,
slot,
desing_button_maker,
tool_font_replacer
code = 'code',
icon = 'icon',
lint = 'lint',
g11n = 'g11n',
dev = 'dev',
slot = 'slot',
desing_button_maker = 'desing_button_maker',
tool_font_replacer = 'tool_font_replacer'
}

export type ReleaseChannel = 'release' | 'beta' | 'alpha'
export interface ReleaseVisibilityPreference{
screen: WorkScreen
allowedChannel: ReleaseChannel
}


Expand Down
6 changes: 0 additions & 6 deletions figma/src/flutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,10 @@ function flutterWidgetGenerator(sceneNode: ReadonlyArray<ReflectSceneNode> | Ref
console.log(`starting handling node ${node.toString()} type of ${node.type}`)


console.log('Chip Test', node.name)
const chipDetectionResult = detectIfChip(node)
if(chipDetectionResult.result){
console.log('this node is detected as Chip', node.name)

console.log('ChipResultData ',chipDetectionResult.data)
return makeChip(chipDetectionResult.data)
}else{
console.log(node.name);
console.log(chipDetectionResult.reason);
}

const buttonDetectionResult = detectIfButton(node)
Expand Down
Loading

0 comments on commit 31172be

Please sign in to comment.