-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat: extract GitHub into the sync-providers
package
#3092
base: main
Are you sure you want to change the base?
Conversation
|
|
packages/tokens-studio-for-figma/src/app/components/modals/CreateStorageItemModal.tsx
Fixed
Show fixed
Hide fixed
* [WIP] webpack config setup for fast refresh + websocket server * add prod/dev hmr webpack config option * render immediately and handle AsyncMessage in startup app hook * forward ui AsyncMessages to browser via WebSockets * null check sentry transaction to fix browser error * refactor AsyncMessageChannel code for browser implementation * webpack use swc-loader for browser version + speed/bundle size plugin options * prettify browser dev preview UI * enable loading screen if startup params missing (for web serve + disconnected browser dev preview) * attempt to fix webpack build for tests * add SpeedMeasurePlugin package * create AsyncMessageChannel dev docs * replace web-preview.md ASCII data flow diagram with mermaid * use radii/spacing tokens instead of px for web preview.tsx styles Co-authored-by: Jan Six <six.jan@gmail.com> * remove commented out startup handler (handled in startup.tsx useEffect now) Co-authored-by: Jan Six <six.jan@gmail.com> * remove commented out code Co-authored-by: Jan Six <six.jan@gmail.com> * replace px values with tokens Co-authored-by: Jan Six <six.jan@gmail.com> * conditional export for AsyncMessageChannel preview env * add browser preview WEBSOCKETS_PORT env * fix typescript issue with PreviewAsyncMessageChannel.isWsConnected * add test coverage for AsyncMessageChannelPreview * Browser preview debug UI (#2803) * fix AsyncMessageChannelPreview undefined error + export WS URI * browser preview CSS file for UI fixes * create previewUtils for browser color scheme + setFigmaBrowserTheme * browser preview URL params + fullscreen/theme/action modes * two bug fixes for browser/plugin websocket preview bridge * add preview dist folder for web preview builds * [WIP] browser preview dev knowledge docs * feat(dev): request startup on browser preview page open * refactor(dev): use env vars for browser preview ws src * fix(debug): remove console.log from asyncmessagechannelpreview * fix(css): figmaloading full height css for browser preview * refactor(dev): use enums for websockets src in browser preview tsx * fix(dev): remove comments * refactor: reuse htmlClassList variable * remove unused package --------- Co-authored-by: macintoshhelper <6757532+macintoshhelper@users.noreply.github.com> --------- Co-authored-by: macintoshhelper <6757532+macintoshhelper@users.noreply.github.com> Co-authored-by: Jan Six <six.jan@gmail.com>
b7ca311
to
62b14f8
Compare
packages/tokens-studio-for-figma/src/AsyncMessageChannelPreview.ts
Dismissed
Show dismissed
Hide dismissed
return temp; | ||
} | ||
} catch (err) { | ||
console.warn('not a valid message', err); |
Check warning
Code scanning / ESLint
disallow the use of `console`
if (this.environment === Environment.BROWSER) { | ||
this.sendMessageFromBrowser({ id: msg.id, message: payload, src: WebSocketsSource.browser }); | ||
} else { | ||
sendMessageToController({ id: msg.id, message: payload }); | ||
} |
Check failure
Code scanning / ESLint
disallow `if` statements as the only statement in `else` blocks
} | ||
} | ||
} catch (err) { | ||
console.error(err); |
Check warning
Code scanning / ESLint
disallow the use of `console`
import FigmaLoading from '../components/FigmaLoading'; | ||
|
||
// eslint-disable-next-line | ||
const PREVIEW_ENV = process.env.PREVIEW_ENV; |
Check failure
Code scanning / ESLint
require destructuring from arrays and/or objects
return temp; | ||
} | ||
} catch (err) { | ||
console.error('not a valid message', err); |
Check warning
Code scanning / ESLint
disallow the use of `console`
const handleJsonEditChange = useCallback((val) => { | ||
try { | ||
// eslint-disable-next-line | ||
const a = JSON.parse(val); |
Check failure
Code scanning / ESLint
Disallow unused variables
if (tab) { | ||
dispatch.uiState.setActiveTab(Tabs[tab]); | ||
} | ||
}, []); |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar
|
||
const onThemeSelected = useCallback((type) => () => { | ||
setFigmaBrowserTheme(type, updateHash); | ||
}, []); |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar
} | ||
} | ||
}, | ||
[], |
Check warning
Code scanning / ESLint
verifies the list of dependencies for Hooks like useEffect and similar
className="content scroll-container" | ||
> | ||
{ | ||
[{ type: 'STARTUP' }, { type: 'CUSTOM' }].map((action) => ( |
Check warning
Code scanning / ESLint
Disallow variable declarations from shadowing variables declared in the outer scope
62b14f8
to
98ae669
Compare
e46e704
to
831f8d0
Compare
cac34d0
to
55f3fa6
Compare
b2e5356
to
9850135
Compare
sync-providers
package
9850135
to
c88367c
Compare
c88367c
to
bb5ff11
Compare
Why does this PR exist?
Closes 1 task of #3000
In an effort to reuse the logic behind remote token storage solutions, this aims to set a starting point with GitHub, the most popular one.
What does this pull request do?
See the README for a detailed list of changes.
Testing this change
Additional Notes (if any)
Related follow-up tasks, will most likely need refinement depending on speific future needs: