Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistant 2021.9 Release #159

Merged
merged 291 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
5a78312
implement simple text content syntax highlighter
softmarshmallow Sep 2, 2021
1c67814
fix contorl code - app initialized
You-J Sep 3, 2021
c1d5a65
update @code-ui/docstring package
You-J Sep 6, 2021
0d9ccb5
register code-syntax-hightliter with staging - `beta`
softmarshmallow Sep 7, 2021
fcb1886
Merge branch 'staging' of https://github.com/gridaco/assistant into @…
softmarshmallow Sep 7, 2021
c61e54d
yarn
softmarshmallow Sep 7, 2021
5d6c721
Merge pull request #156 from gridaco/@app/design-text-code-syntax-hig…
softmarshmallow Sep 7, 2021
66508ab
rm webpack html inline plugin since it's no longer required in hosted…
softmarshmallow Sep 7, 2021
ed69036
yarn
softmarshmallow Sep 7, 2021
d274960
bump packages
softmarshmallow Sep 8, 2021
7927f42
update lint screen event listener to be unregistered with hooks
softmarshmallow Sep 8, 2021
90457c0
add null safety
softmarshmallow Sep 8, 2021
af49a73
update code wrapper bg color to match vscode bg color
softmarshmallow Sep 8, 2021
8564bf8
Merge branch 'staging' of https://github.com/gridaco/assistant into a…
softmarshmallow Sep 8, 2021
06f98a6
Merge pull request #155 from gridaco/app/component-manage
softmarshmallow Sep 8, 2021
461d593
enable colordecorator to monaco
softmarshmallow Sep 8, 2021
06890cc
update language sorting order for syntax highlight select
softmarshmallow Sep 9, 2021
b2f7fd0
disable response logging
softmarshmallow Sep 9, 2021
59ad620
Merge branch 'staging' of https://github.com/gridaco/assistant into a…
softmarshmallow Sep 9, 2021
3d290fe
add theme
softmarshmallow Sep 9, 2021
ebb5976
add empty selection view
softmarshmallow Sep 9, 2021
1c118c7
move code/preview to @app/design-to-code
softmarshmallow Sep 9, 2021
542dace
extract controlled code view from code screen for reuse
softmarshmallow Sep 9, 2021
7c45959
update invalid selection screen
softmarshmallow Sep 9, 2021
bff9cfa
update invalid selection optimized
softmarshmallow Sep 9, 2021
28fa697
add placeholder views fro master / instance component
softmarshmallow Sep 9, 2021
3b90e07
add data view for instance selection
softmarshmallow Sep 9, 2021
71b488d
add layer selection case
softmarshmallow Sep 9, 2021
5c3a90f
update configurable layer targetting & add notify to invalid selection
softmarshmallow Sep 9, 2021
e650882
single layer property saving with suggestion on root reference
softmarshmallow Sep 9, 2021
fc84887
update plugin-sdk meta storage
softmarshmallow Sep 10, 2021
8685db1
update single layer property shape & add index path finder, store it …
softmarshmallow Sep 10, 2021
da635f4
extract sibling finder to figma-xpath
softmarshmallow Sep 10, 2021
c81d773
add master property loading on instance
softmarshmallow Sep 10, 2021
578fab8
add mapped properties loading to variant master and instance
softmarshmallow Sep 10, 2021
150918d
add style: selection invalid
You-J Sep 10, 2021
ccc9841
add warning icon in package
You-J Sep 10, 2021
560278b
temp fix style: code wrapper opacity
You-J Sep 10, 2021
c13b672
bump design sdk with numeric variant type support
softmarshmallow Sep 10, 2021
515d294
Merge branch 'app/component-manage' of https://github.com/gridaco/ass…
softmarshmallow Sep 10, 2021
fc2814e
bump design sdk with figma api version up
softmarshmallow Sep 10, 2021
222d291
yarn
softmarshmallow Sep 10, 2021
ca1a0d9
stash fix style: selection code boxs
You-J Sep 10, 2021
29cf8f6
Merge branch 'app/component-manage' of https://github.com/gridaco/ass…
You-J Sep 10, 2021
bf5aa60
fix style selection none
You-J Sep 10, 2021
6b20a4f
fix style: pre
You-J Sep 10, 2021
1a56068
update configurablle layer to use pure coli for dynamic interface bui…
softmarshmallow Sep 10, 2021
a13793c
update all selection view to show coli based code ui
softmarshmallow Sep 10, 2021
645bb9c
update wrapper style
softmarshmallow Sep 10, 2021
6d61e2c
add cache to invalid code previewer
softmarshmallow Sep 10, 2021
2686fac
bump with design sdk - main component's deep layer selection error fi…
softmarshmallow Sep 10, 2021
da80b82
add general session caching for non cached-only type
softmarshmallow Sep 10, 2021
2ae5341
update node conversion short lived memory cache
softmarshmallow Sep 10, 2021
4b89073
update deselection cache timeout reset
softmarshmallow Sep 10, 2021
f2a6202
add visual store page manager
softmarshmallow Sep 10, 2021
3c27184
add more coli interface builder features with native formatting
softmarshmallow Sep 11, 2021
2eef165
add divider core component
softmarshmallow Sep 11, 2021
4a5f95c
move accessor type
softmarshmallow Sep 11, 2021
523b73a
fix style syntax error
softmarshmallow Sep 11, 2021
b946e4d
rm material ui, replaced with native
softmarshmallow Sep 11, 2021
9bea38e
update scoped react namer to follow & to be based on master component…
softmarshmallow Sep 11, 2021
e766226
add property suggestions to rect, ellipse and frame
softmarshmallow Sep 11, 2021
8207d01
update namer
softmarshmallow Sep 11, 2021
244449f
fix coli typo
softmarshmallow Sep 11, 2021
de26c91
bump coli & design to code
softmarshmallow Sep 11, 2021
12d7ef0
fix ci build
softmarshmallow Sep 11, 2021
b737d3b
add property hover with mock data based on @code-ui/hover
softmarshmallow Sep 12, 2021
9d16f48
bump with fixed design to code pkg
softmarshmallow Sep 12, 2021
b57e7f1
bump dtc
softmarshmallow Sep 12, 2021
4a717d3
update preview component & plugin sdk to get the targeet node's preview
softmarshmallow Sep 12, 2021
64501c7
add temp fields viewer to all selection type
softmarshmallow Sep 12, 2021
b7fdbaa
fix hover-view content style
You-J Sep 12, 2021
816be02
fix preview style to temp
You-J Sep 12, 2021
004055f
fix ci build with updated coli
softmarshmallow Sep 13, 2021
eee3721
Merge branch 'app/component-manage' of https://github.com/gridaco/ass…
You-J Sep 14, 2021
28c49f0
Change single propert to using code-ui package
You-J Sep 14, 2021
67a611c
stash add suggestions
You-J Sep 14, 2021
f637ab8
update package
You-J Sep 14, 2021
efab340
ci fix - explicit import figma type
softmarshmallow Sep 14, 2021
1fc49fc
Merge branch 'app/component-manage' of https://github.com/gridaco/ass…
softmarshmallow Sep 14, 2021
18a0f22
update button style
softmarshmallow Sep 14, 2021
b19c031
init app preference
softmarshmallow Sep 14, 2021
2662f95
add prefered framework preferences;
softmarshmallow Sep 14, 2021
707ed9c
add framework option persistance
softmarshmallow Sep 14, 2021
3db64dc
bump designtocode
softmarshmallow Sep 14, 2021
2d27693
add preview cache storage i/o
softmarshmallow Sep 14, 2021
87008b8
upate code-ui/token
You-J Sep 15, 2021
1077794
fix input attr
You-J Sep 15, 2021
b7ab2cc
Merge branch 'app/component-manage' of https://github.com/gridaco/ass…
You-J Sep 15, 2021
8e2831e
Merge pull request #161 from gridaco/app/component-manage
softmarshmallow Sep 15, 2021
170d6c5
bump design to code & related pacakges
softmarshmallow Sep 15, 2021
6f9f14f
add btn style
You-J Sep 15, 2021
fff2fd2
update package and stash add handling hover
You-J Sep 15, 2021
55b6e84
update node type imports
softmarshmallow Sep 26, 2021
67d324a
update icon config type imports
softmarshmallow Sep 26, 2021
5d8703f
update color converter use
softmarshmallow Sep 26, 2021
de9deac
update image repo api
softmarshmallow Sep 26, 2021
a131ec0
update color converter
softmarshmallow Sep 26, 2021
6e233dd
bump packages; update next config; yarn
softmarshmallow Sep 26, 2021
3f87a72
bump lint
softmarshmallow Sep 26, 2021
3193005
update node type imports from "@design-sdk/figma-node"
softmarshmallow Sep 26, 2021
39421d9
bump base-sdk with updated icon spec
softmarshmallow Sep 26, 2021
a8e1a32
add plugin asset provider
softmarshmallow Sep 26, 2021
bd90a12
bump design to code - resolve flutter image error caused by update
softmarshmallow Sep 26, 2021
d91e47a
Merge pull request #162 from gridaco/engine/react
softmarshmallow Sep 26, 2021
e17e166
init runtime vanilla previewer
softmarshmallow Sep 26, 2021
8930201
bump design to code & flutter builder next config
softmarshmallow Oct 3, 2021
eff1101
update d2c universal interface, update preview uploading as with it.
softmarshmallow Oct 3, 2021
12f0d1d
update dir name
softmarshmallow Oct 3, 2021
2084a13
implemented non scalling responsive preview
softmarshmallow Oct 3, 2021
7811beb
update monaco lang styling
softmarshmallow Oct 3, 2021
a131fb1
add full responsive preview image support
softmarshmallow Oct 3, 2021
4efa339
add additional lines on monaco editor
softmarshmallow Oct 3, 2021
dc92fe3
ci trigger
softmarshmallow Oct 3, 2021
8ee7a9b
Merge pull request #164 from gridaco/preview/runtime-vanilla
softmarshmallow Oct 3, 2021
6ab2354
Merge branch 'staging' of https://github.com/gridaco/assistant into a…
softmarshmallow Oct 3, 2021
d555d15
bump design to code
softmarshmallow Oct 3, 2021
b9b89bb
add handly only-env root scripts
softmarshmallow Oct 6, 2021
71f22ae
fix copy code for react platform
softmarshmallow Oct 6, 2021
2901566
bump design-to-code
softmarshmallow Oct 6, 2021
c2f7e91
pr trigger
softmarshmallow Oct 6, 2021
fab97f3
bump reflect-core
softmarshmallow Oct 6, 2021
12a11bf
stash fix monaco editor height handling
You-J Oct 6, 2021
6fb423a
add relauchdata setting
softmarshmallow Oct 6, 2021
8036b11
bump with `--flags` support on `design to code`
softmarshmallow Oct 6, 2021
bccb5de
fix with browser compatibility
softmarshmallow Oct 6, 2021
8fe5136
Modify preview contents size to scroll preview
You-J Oct 7, 2021
cc1ed5a
add: iframe zoom to fit width preview
You-J Oct 7, 2021
ca276e3
add: preview contents zoom without zoom-in
You-J Oct 7, 2021
471b1db
fix style: preview
You-J Oct 7, 2021
dd501f4
stash add: code view resizing
You-J Oct 8, 2021
c53cff7
remove log
You-J Oct 8, 2021
d5608c6
stash add preview height control
You-J Oct 8, 2021
1f8a3f6
(`yarn` required) bump design to code with `--as-wrap` support
softmarshmallow Oct 8, 2021
3b91a56
fix preview style
You-J Oct 8, 2021
58ac1c5
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 8, 2021
244ab5d
stash add: code view resize func
You-J Oct 8, 2021
c86c0de
add re-resizable
You-J Oct 8, 2021
6db89ea
add editor re-sizable in code-screen
You-J Oct 8, 2021
a65cfeb
fix issue: code wrapper height infinite multiplication
You-J Oct 8, 2021
78cab91
fix yarn.lock for flutter builder deps
softmarshmallow Oct 8, 2021
a3d5df3
fix preview render issue - add preview ref
You-J Oct 8, 2021
86d4558
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 8, 2021
9cf9cc8
impact on static preview; remove padding - temporal fix of scaling is…
softmarshmallow Oct 8, 2021
d125882
fix navigation icon sorting
You-J Oct 8, 2021
601ffe5
fix resize bar reaction zone to highly
You-J Oct 8, 2021
988738c
update toolbox routing
softmarshmallow Oct 9, 2021
c722fde
fix global layout styling
softmarshmallow Oct 9, 2021
5154b29
update monaco editor autosizing
softmarshmallow Oct 9, 2021
d636416
update mimic code & bg styles
softmarshmallow Oct 9, 2021
5f397ad
update footer theme
softmarshmallow Oct 9, 2021
07702be
rename pW to wrapWidth
You-J Oct 9, 2021
c6c8643
Merge pull request #165 from gridaco/@ui/previewer
softmarshmallow Oct 9, 2021
0868ced
update directory names
softmarshmallow Oct 9, 2021
c1fbac2
add global show / hide navigation animation by preview scroll
softmarshmallow Oct 9, 2021
9cb8135
adjust animation
softmarshmallow Oct 9, 2021
baf7622
add scroll anim trigger to code area & add 2line tab under root nav app
softmarshmallow Oct 9, 2021
6b7058a
shadow on only code preview screen
softmarshmallow Oct 9, 2021
50b30e5
Merge pull request #167 from gridaco/app-navigation
softmarshmallow Oct 9, 2021
97c8c33
update root scripts
softmarshmallow Oct 9, 2021
249aa35
update opencollective url
softmarshmallow Oct 9, 2021
5872381
bump `@designto/code`
softmarshmallow Oct 9, 2021
223bf24
update preview min max height
You-J Oct 10, 2021
8e71c7e
stash fix: editor reszing
You-J Oct 10, 2021
efad67d
reset unused code
You-J Oct 10, 2021
b529420
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
08ce445
fix to preview responsive according to editor size
You-J Oct 10, 2021
1f9e90f
fix: no scale handling for width smaller than the design width
You-J Oct 10, 2021
d25295a
add border raius to responsive preview frame
softmarshmallow Oct 10, 2021
851ba6e
fix: designs smaller than preview are centered
You-J Oct 10, 2021
477c39d
Merge branch 'staging' of https://github.com/gridaco/assistant into @…
softmarshmallow Oct 10, 2021
681102a
fix navigation content loading trigger on tab index change | workmode…
softmarshmallow Oct 10, 2021
81da6e1
Merge branch 'staging' of https://github.com/gridaco/assistant into @…
softmarshmallow Oct 10, 2021
ffab497
bump design to code & reflect core with fixed size export feature
softmarshmallow Oct 10, 2021
dbeb7f4
force responsive preview to have a fixed size vanilla preview
softmarshmallow Oct 10, 2021
317f561
fix flutter not building on assistant with vanilla preview
softmarshmallow Oct 10, 2021
0eb4749
fix preview contents style
You-J Oct 10, 2021
4807625
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
65b349e
fixe flutter next upload
softmarshmallow Oct 10, 2021
65610a4
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
softmarshmallow Oct 10, 2021
98464ee
fix flutter preview interface
softmarshmallow Oct 10, 2021
ee0d356
update anim trigger gates
softmarshmallow Oct 10, 2021
d5c0528
update vscode search settings
softmarshmallow Oct 10, 2021
e468fcd
update code screen preview default height from `200` to `300`
softmarshmallow Oct 10, 2021
51f999b
fix lint screen styles
softmarshmallow Oct 10, 2021
960815f
add explicit scroll blocking
softmarshmallow Oct 10, 2021
da16c97
rm logs
softmarshmallow Oct 10, 2021
f5549a8
fix navigation style issu
You-J Oct 10, 2021
cc26138
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
1c97015
update zindex & shadow layouts
softmarshmallow Oct 10, 2021
93695de
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
softmarshmallow Oct 10, 2021
2b466b0
fix navigvation wrapper style issue
You-J Oct 10, 2021
832c673
remove unused atoms
You-J Oct 10, 2021
e9b87f3
rm usedesign in preview; add size & id props for responsive preview
softmarshmallow Oct 10, 2021
d04eade
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
softmarshmallow Oct 10, 2021
388f73e
fix style: code area ref bg color
You-J Oct 10, 2021
06aacf7
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
5c5aada
update nav anim
softmarshmallow Oct 10, 2021
019a286
add bg color in workmode wrap
You-J Oct 10, 2021
d8dbc66
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
2a806d0
update secondar menu bg color
softmarshmallow Oct 10, 2021
936cc51
fix about back icon style
You-J Oct 10, 2021
36c5971
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
52dff5c
update anim
softmarshmallow Oct 10, 2021
1d2cdf6
move wrap style
You-J Oct 10, 2021
c9854dc
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
softmarshmallow Oct 10, 2021
f260ed8
responsive scaled preview
softmarshmallow Oct 10, 2021
9b31db7
fix smaller items align
softmarshmallow Oct 10, 2021
8ac1f8c
remove unused code
You-J Oct 10, 2021
983cdd3
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
d146429
try to improve top align smaller fitting content - no impact
softmarshmallow Oct 10, 2021
aa66ca0
tryto fix updating container height with ifram scale factor
softmarshmallow Oct 10, 2021
eb531b3
stash fix icon-loader gird list height
You-J Oct 10, 2021
78f7be0
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
2b57750
fix copy code
softmarshmallow Oct 10, 2021
9d87a49
fix minheight
softmarshmallow Oct 10, 2021
8690fa3
remove preview auto in code screen
You-J Oct 10, 2021
11427fc
add preivew static empty component
You-J Oct 10, 2021
95d0f5a
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
583d36b
fix z-index
You-J Oct 10, 2021
a6713e6
add large design blocking
softmarshmallow Oct 10, 2021
1a491b8
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
softmarshmallow Oct 10, 2021
08060bd
rm logging
softmarshmallow Oct 10, 2021
78d285b
fix cache logic
softmarshmallow Oct 10, 2021
44b4aca
fix style: emtpy select preview bg
You-J Oct 10, 2021
45aa73e
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
9f213d1
fix icon scaling issue
softmarshmallow Oct 10, 2021
9824366
bump
softmarshmallow Oct 10, 2021
1693322
update buildscripts; fix plugin typings
softmarshmallow Oct 10, 2021
3b2a8b3
handle preview empty
You-J Oct 10, 2021
702f4bf
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 10, 2021
c6e7b9a
update timeout
softmarshmallow Oct 10, 2021
e954388
final design to code sync before release
softmarshmallow Oct 10, 2021
8b7406a
update staging mode plugin build
softmarshmallow Oct 10, 2021
937c55c
Merge pull request #169 from gridaco/@ui/previewer
softmarshmallow Oct 10, 2021
928b477
update d2c with plugin optimized ver
softmarshmallow Oct 11, 2021
ce775c8
fix image link to png file
You-J Oct 11, 2021
a472b93
Merge branch '@ui/previewer' of https://github.com/gridaco/assistant …
You-J Oct 11, 2021
18e8789
Merge branch '@ui/previewer' into staging
You-J Oct 11, 2021
0e1daab
disabled unstable features
softmarshmallow Oct 11, 2021
da574c5
add `2021.8.0b` release notes
softmarshmallow Oct 11, 2021
b0405d6
add `2021.9.1` release note
softmarshmallow Oct 11, 2021
1edef3a
update webpack to use optimized tsconfig on prod
softmarshmallow Oct 11, 2021
5bcbf25
remove log
You-J Oct 11, 2021
5a7c56a
Merge branch 'staging' of https://github.com/gridaco/assistant into s…
You-J Oct 11, 2021
da9fd5e
optimized production build. decrease size by 50%. 2X faster loading (…
softmarshmallow Oct 11, 2021
152d7bc
remove to public, unused code
You-J Oct 11, 2021
ef69bfe
Merge branch 'staging' of https://github.com/gridaco/assistant into s…
You-J Oct 11, 2021
2fe8f39
yarn & final view update
softmarshmallow Oct 11, 2021
fca867a
update gitignore
softmarshmallow Oct 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
"**/.DS_Store": true,
"**/dist": true,
"**/node_modules": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/yarn.lock": true
}
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,35 @@
- [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.9.1] - 2021-10-11

> 2021.9 is a cold release

[PR#159](https://github.com/gridaco/assistant/pull/159)

- Instant responsive preview - a realtime application from design, seriously, with a single click.
- adoped monaco editor
- semi-stable react support with styled-component
- minimalistic navigation with hide animation on focus mode
- (fix) wrong cache loading issue on boot
- prevent thread lock on big screen
- prevent thread lock on too many remote component screen

## [2021.8.0b] - 2021-8-26

**What's new**

- Speed
- Navigation UX Renewal
- The code
- Code interaction
- Figma to Flutter
- Figma to React (React as preview feature)
- Icons loader
- Design Lint now on beta channel

[Read thw full release notes from medium blog](https://blog.grida.co/d-figma-assistant-by-grida-supercharge-your-design-development-workflow-e6b2989216e2)

## [2021.0.2f0] - 2021-5-21

> Deisgn to code logical separation. Design to code is now imported from [designto.codes](https://designto.codes)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ yarn sketch

# [OPTIONAL 3 & Contributors only] run plugin ui in webdev mode
yarn web
# visit http://localhost:3000/init-webdev to work on browser
# visit http://localhost:3303/init-webdev to work on browser
```

_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._ - [Learn more here](https://github.com/bridgedxyz/.github/blob/main/contributing/working-with-submodules.md)
Expand Down Expand Up @@ -176,14 +176,13 @@ we release new updates in a by-monthluy cycle. Watch this repository on github o

All update logs available at [CHANGELOG.md](./CHANGELOG.md)


## Blogs

- [Flutter force week 103](https://medium.com/flutterforce/flutterforce-week-103-95b0822ef25f)
- [Flutter force week 135](https://medium.com/flutterforce/flutterforce-week-135-d28b8741302a)
- [Assistant initial release](https://blog.grida.co/assistant-initial-release-f75d0084df9c)
- [Introducng Grida Assistant 2021.8.0b](https://blog.grida.co/figma-assistant-by-grida-supercharge-your-design-development-workflow-e6b2989216e2)


## LEGAL

> read [LICENSE](./LICENSE).
Expand Down
7 changes: 5 additions & 2 deletions app/__plugin__init__/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// DO NOT REMOVE THIS LINE
import "../lib/pages/code/__plugin";
import "@app/data-mapper/__plugin";
import "@app/design-to-code/__plugin";
import "@app/design-lint/__plugin";

// disabled on staging
// import "@app/data-mapper/__plugin";
// import "@app/design-text-code-syntax-highlight/__plugin";
5 changes: 5 additions & 0 deletions app/lib/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
}

body {
/* for reset user agnet style -> margin: 8px */
margin: 0px;
}

/*
If you want to change the font, be sure to check the following!
tippy-1 is `tippyjs' id. it is only for drop item in @code-ui/docstring
Expand Down
5 changes: 1 addition & 4 deletions app/lib/components/comming-soon-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ export function CommingSoonTemplate(props: Props) {
);
}

const Wrapper = styled.div`
/* -8 is for reset body margin */
margin: 0 -8px;
`;
const Wrapper = styled.div``;

const ImageBox = styled.div``;

Expand Down
3 changes: 3 additions & 0 deletions app/lib/components/motions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# General motions

Motions only ! - no symantic ui components allowed here.
2 changes: 2 additions & 0 deletions app/lib/components/motions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./update-hide-by-scroll-position-and-velocity";
export * from "./smooth-dampings";
4 changes: 4 additions & 0 deletions app/lib/components/motions/smooth-dampings/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const smooth_damping_hide_motion_transition = {
ease: [0.1, 0.25, 0.3, 1],
duration: 0.6,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import { useState, useEffect, RefObject } from "react";
import { ScrollMotionValues } from "framer-motion";
import { useElementScroll } from "framer-motion";

export function update_hide_by_scroll_position_and_velocity({
scrollY,
scrollYProgress,
is_animating_by_intense_scrolling,
on_animating_by_intense_scrolling,
on_change,
options = {
top_sensitivity: 0.01,
bottom_sensitivity: 0.01,
define_intense_velocity: 1,
do_show_on_bottom_hit: true,
},
}: {
scrollY: ScrollMotionValues["scrollY"];
scrollYProgress: ScrollMotionValues["scrollYProgress"];
is_animating_by_intense_scrolling: boolean;
on_animating_by_intense_scrolling: (v?: true) => void;
on_change: (hide: boolean) => void;
options?: {
top_sensitivity: number;
bottom_sensitivity: number;
define_intense_velocity: number;
do_show_on_bottom_hit: boolean;
};
}) {
const scroll_progress_percentage = scrollYProgress.get();
const ydiff = Math.abs(scrollY.get() - scrollY.getPrevious());
if (
// don't execute if diff is `<=` than 2. - this is a really small scroll
ydiff <= 2 &&
// except for bottom / top
scroll_progress_percentage !== 0 &&
scroll_progress_percentage !== 1
) {
return;
}

const velocity = scrollYProgress.getVelocity();
const velocity_abs = Math.abs(velocity);
if (
// if < 20, this event is not triggered by human, or caused by extremely short scroll area, causing high velocity.
velocity_abs > 20 ||
scrollYProgress.get() == scrollYProgress.getPrevious()
) {
return;
}
const is_intense_scrolling = velocity_abs > options.define_intense_velocity;
const direction = velocity > 0 ? "down" : "up"; // this is ok. velocity can't be 0.

if (scroll_progress_percentage >= 1 - options.bottom_sensitivity) {
if (options.do_show_on_bottom_hit) {
// bottom = show
on_change(false);
}
} else if (scroll_progress_percentage <= options.top_sensitivity) {
switch (direction) {
// top + down = hide
case "down":
if (!is_intense_scrolling) {
on_change(true);
}
break;
case "up":
// top + up = show
on_change(false);
break;
}
} else {
if (is_intense_scrolling) {
switch (direction) {
// scroll intense + down = hide
case "down":
on_change(true);
break;
// scroll intense + up = show
case "up":
on_animating_by_intense_scrolling(true);
on_change(false);
break;
}
} else {
if (!is_animating_by_intense_scrolling) {
// middle = hide
on_change(true);
}
}
}
}

export function useScrollTriggeredAnimation(el: RefObject<HTMLElement>) {
const { scrollYProgress, scrollY } = useElementScroll(el);
const [hide, setHide] = useState(false);
let is_animating_by_intense_scrolling = false;
useEffect(() => {
return scrollYProgress.onChange(() =>
update_hide_by_scroll_position_and_velocity({
scrollYProgress,
scrollY,
is_animating_by_intense_scrolling,
on_animating_by_intense_scrolling: () => {
is_animating_by_intense_scrolling = true;
},
on_change: (hide) => {
setHide(hide);
},
options: {
do_show_on_bottom_hit: false,
top_sensitivity: 0.05,
bottom_sensitivity: 0.1,
define_intense_velocity: 50,
},
})
);
});

return hide;
}
53 changes: 53 additions & 0 deletions app/lib/components/navigation/navigation-motions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from "react";
import { motion } from "framer-motion";
import { smooth_damping_hide_motion_transition } from "../motions";

export function AppbarContainerMotion({
hidden,
children,
}: {
hidden: boolean;
children: JSX.Element | JSX.Element[];
}) {
/** add this const **/
const variants_for_container = {
visible: { opacity: 1 },
hidden: { opacity: 0, height: 0 },
};

return (
<motion.div
variants={variants_for_container}
animate={hidden ? "hidden" : "visible"}
style={{
zIndex: 1,
}}
transition={smooth_damping_hide_motion_transition}
>
{children}
</motion.div>
);
}

export function AppbarContentMotion({
hidden,
children,
}: {
hidden: boolean;
children: JSX.Element | JSX.Element[];
}) {
const variants_for_child = {
visible: { y: 0 },
hidden: { y: -100 },
};

return (
<motion.div
variants={variants_for_child}
animate={hidden ? "hidden" : "visible"}
transition={smooth_damping_hide_motion_transition}
>
{children}
</motion.div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ const Button = styled.div`

svg {
fill: #cfcfcf;
width: 25px;
height: 34px;
}
`;
60 changes: 2 additions & 58 deletions app/lib/components/navigation/primary-workmode-select.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { css } from "@emotion/react";
import styled from "@emotion/styled";
import React from "react";
import { PrimaryWorkmodeSet, WorkMode } from "../../navigation";
import { PrimaryWorkmodeSet, WorkMode } from "../../routing";
import { WorkmodeButton } from "./work-mode-button";

export function PrimaryWorkmodeSelect(props: {
set: PrimaryWorkmodeSet;
Expand Down Expand Up @@ -31,58 +30,3 @@ export function PrimaryWorkmodeSelect(props: {
</>
);
}

function WorkmodeButton(props: {
name: string;
active: boolean;
onClick: () => void;
}) {
return (
<>
<WorkmodeLabel active={props.active} onClick={props.onClick}>
{props.name}
</WorkmodeLabel>
</>
);
}
interface Props {
active: boolean;
}

const WorkmodeLabel = styled.h3<Props>`
display: flex;
text-transform: capitalize;
font-size: 21px;
letter-spacing: 0em;
cursor: pointer;
user-select: none;

// reset for h3 init style
margin: 0;
margin-top: 14px;

&:first-child {
margin-right: 12px;
}

${(props) =>
props.active
? css`
font-weight: 700;
line-height: 26px;
color: #000;
`
: css`
font-weight: 400;
line-height: 25px;
color: #cfcfcf;

&:hover {
font-size: 21px;
font-weight: 400;
line-height: 25px;
letter-spacing: 0em;
color: #606060;
}
`}
`;
24 changes: 24 additions & 0 deletions app/lib/components/navigation/route-back-button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
import styled from "@emotion/styled";
import { useHistory } from "react-router";
import BackArrow from "@assistant/icons/back-arrow";

export function RouteBackButton() {
const history = useHistory();

const close = () => {
history.goBack();
};

return (
<BackIcon onClick={close}>
<BackArrow />
</BackIcon>
);
}

export const BackIcon = styled.div`
width: 24px;
height: 24px;
cursor: pointer;
`;
Loading