-
Notifications
You must be signed in to change notification settings - Fork 37
Squoosh Designer Plugin: Figma plugin for orchestrating layout animations #2402
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
Merged
Merged
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
2d13962
Squoosh Designer Plugin: Figma plugin for orchestrating layout animat…
kovmarci86 7a85ac3
Update proto submodule pointer to squoosh-designer fork
kovmarci86 babe052
Inherit animation easing type
kovmarci86 3a252d3
Parse timeline data to avoid strings passed to Squoosh
kovmarci86 ac05221
Parse strings into AnimatableProperty.
kovmarci86 ee86766
Optimize the data structures
kovmarci86 a7a1e1d
Wrap NodeTimelines in Arc
kovmarci86 6c53f8b
fix(squoosh): respect custom keyframes for spatial properties
kovmarci86 ff9d414
chore(squoosh): update Cargo metadata and cleanly scrub console logs …
kovmarci86 384a558
feat(animations): integrate Figma custom keyframe animations with Squ…
kovmarci86 9e370d9
Fix: remove merge conflict marker
kovmarci86 1fc6d53
chore: update proto submodule
kovmarci86 bf84a71
chore: point proto submodule to local fix
kovmarci86 e809696
Revert "feat(animations): integrate Figma custom keyframe animations …
kovmarci86 d36b870
build: add dc-squoosh-parser to workspace members
kovmarci86 b500574
Update the protos version
kovmarci86 2c7652a
Fix view comparison
kovmarci86 379e107
Update the data model, parsing. Fix bugs.
kovmarci86 701bb8c
Serialize into JSON String instead of using base64
kovmarci86 600605e
Fix problems, compatibility
kovmarci86 ecc10ac
Update submodule after merging the required changes
kovmarci86 64cba10
Sync with main
kovmarci86 edecb43
Remove the lazy_static dependency
kovmarci86 abf667f
Add more tests
kovmarci86 d009b15
Delete leftover earlier versions
kovmarci86 265bf19
Fix lint
kovmarci86 a0de4a9
Use env logger
kovmarci86 2568ad6
Update rustls-webpki to v0.103.10
kovmarci86 f2cf460
Fix more lints
kovmarci86 fd02e09
Fix checks for PRs from external forks
kovmarci86 8597fe6
Remove SVG support, unused
kovmarci86 053fb5f
Remove extra whitespace
kovmarci86 5596830
Remove figplug from the dependencies list.
kovmarci86 ca646c3
Add more tests
kovmarci86 01b7702
Use the log crate to print error logs in crates/dc_figma_import/src/b…
kovmarci86 959dde7
Add more tests for support-figma/DC Squoosh designer/rs
kovmarci86 5557865
Restore #[serde(default)] for shared_plugin_data
kovmarci86 52dc0c8
Remove support-figma/DC Squoosh designer/FIX-LINTS.md
kovmarci86 4fd5424
Remove allowed domain
kovmarci86 d153d01
Move DC Squoosh Designer to dc_squoosh_designer
kovmarci86 514124b
Rename the parser to dc_squoosh_parser
kovmarci86 f25d095
Update Cargo.lock
kovmarci86 528950f
Update dc_squoosh_parser name in README.md
kovmarci86 a17815a
Fix review comments
kovmarci86 42d4a9c
Update npm dependency urls
kovmarci86 df3e979
Use the log crate in support-figma/dc_squoosh_designer/rs/examples/si…
kovmarci86 ab67b2a
Address more review comments
kovmarci86 a27d591
Update the data format docs
kovmarci86 109a217
feat(figma-import): fully integrate native JSON structured timeline r…
kovmarci86 4d6a32b
Update docs for the data format/parsing change
kovmarci86 70f54f9
Update the dc_bundle submodule
kovmarci86 cb8c2a9
Use the strongly typed animation values instead of JSON
kovmarci86 de07e0d
Complete migrating off of JSON data in the doc. Split the parser to a…
kovmarci86 048033f
Update submodule
kovmarci86 e460423
Fix tests and licence declaration
kovmarci86 aec92fb
Update the protos module
kovmarci86 2a9b310
chore: update proto submodule to tip of tree
kovmarci86 f2b7115
chore: update proto submodule to latest Tip of Tree
kovmarci86 7441e86
Chang log::info to debug for squoosh animation parsing
kovmarci86 56672e1
Improve documentation comments
kovmarci86 68ff1bb
Move test design file into project repo
kovmarci86 3d2dfa0
Remove unused base64 dependency as suggested by dipenpradhan
kovmarci86 cfdb8f4
Implement From instead of Into for AnimationOverride as suggested by …
kovmarci86 3ce84d8
Use strongly-typed enum for CustomKeyframeValue deserialization and u…
kovmarci86 f05aa4c
Only set animation override if it differs from template, as suggested…
kovmarci86 6686978
Remove redundant squoosh animation parsing and logging in document.rs…
kovmarci86 17f8c2a
Log warning for unimplemented CubicBezier easing in dc_squoosh_animat…
kovmarci86 762c1c1
Remove unused import AnimationOverrideJson in document.rs
kovmarci86 2b41183
Document gradient stop mismatch limitation as suggested by anshu10sep
kovmarci86 587c6d6
Simplify property parsing using slice patterns as suggested by anshu1…
kovmarci86 0e82a4d
Refactor NodeTimelines to use HashMap as suggested by anshu10sep
kovmarci86 2e5ea5a
Remove global eslint-disable in PlaybackController.ts as suggested by…
kovmarci86 a3d8000
Fix tests in designer/rs after NodeTimelines refactor
kovmarci86 ac706f8
Update Cargo.lock
kovmarci86 e08d57f
Fix animation override regression by reverting optimization in comput…
kovmarci86 c0eeaec
Update gradient interpolation fallback to ending gradient and update …
kovmarci86 275042c
Implemented Cubic Bezier easing support
kovmarci86 d88dbc5
Added comment explaining Cubic Bezier solver decision
kovmarci86 5b74b38
Fix non-linear easing
kovmarci86 b7e2de7
Filter out redundant animation override copying in ViewStyle templating
kovmarci86 4781754
Format
kovmarci86 622f0e4
Address PR feedback: Robust hex parsing with Result
kovmarci86 442f0a4
Address PR feedback: Prevent width/height collapse
kovmarci86 7548cc2
Format
kovmarci86 a867547
Merge upstream/main into squoosh-designer after resolving conflicts
kovmarci86 ba7197f
Update Cargo.lock
kovmarci86 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| name: Roborazzi Comment | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["CompareScreenshot"] | ||
| types: | ||
| - completed | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| actions: read | ||
|
|
||
| jobs: | ||
| Update-Comment: | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden Runner | ||
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Download PR number | ||
| uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11 | ||
| with: | ||
| name: pr | ||
| run_id: ${{ github.event.workflow_run.id }} | ||
| path: pr | ||
|
|
||
| - name: Read PR number | ||
| id: pr_number | ||
| run: | | ||
| echo "PR_NUMBER=$(cat pr/NR)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Download diff | ||
| uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11 | ||
| with: | ||
| name: diff-vs-base-branch | ||
| run_id: ${{ github.event.workflow_run.id }} | ||
| path: screenshot-diff | ||
|
|
||
| - name: Checkout base | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| submodules: 'recursive' | ||
| ref: ${{ github.event.workflow_run.pull_requests[0].base.ref }} | ||
|
|
||
| - name: Switch to companion branch | ||
| id: switch-companion-branch | ||
| env: | ||
| BRANCH_NAME: roborazzi_companion_${{ github.event.workflow_run.pull_requests[0].head.ref }} | ||
| run: | | ||
| git branch -D "$BRANCH_NAME" || true | ||
| git checkout --orphan "$BRANCH_NAME" | ||
| git rm -rf . | ||
|
|
||
| - id: check-if-there-are-valid-files | ||
| name: Check if there are valid files | ||
| shell: bash | ||
| run: | | ||
| mapfile -t files_to_add < <(find . -type f -name "*_compare.png") | ||
| exist_valid_files="false" | ||
| for file in "${files_to_add[@]}"; do | ||
| if [[ $file =~ ^[a-zA-Z0-9_./-]+$ ]]; then | ||
| exist_valid_files="true" | ||
| break | ||
| fi | ||
| done | ||
| echo "exist_valid_files=$exist_valid_files" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - id: push-screenshot-diff | ||
| shell: bash | ||
| if: steps.check-if-there-are-valid-files.outputs.exist_valid_files == 'true' | ||
| env: | ||
| BRANCH_NAME: roborazzi_companion_${{ github.event.workflow_run.pull_requests[0].head.ref }} | ||
| run: | | ||
| files_to_add=$(find . -type f -name "*_compare.png") | ||
| for file in $files_to_add; do | ||
| if [[ "$file" =~ ^[a-zA-Z0-9_./-]+$ ]]; then | ||
| git add "$file" | ||
| fi | ||
| done | ||
| git config --global user.name ScreenshotBot | ||
| git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
| git commit -m "Add screenshot diff" | ||
| git push origin HEAD:"$BRANCH_NAME" -f | ||
|
|
||
| - id: generate-diff-reports | ||
| name: Generate diff reports | ||
| env: | ||
| BRANCH_NAME: roborazzi_companion_${{ github.event.workflow_run.pull_requests[0].head.ref }} | ||
| BASE_REF: ${{ github.event.workflow_run.pull_requests[0].base.ref }} | ||
| HEAD_SHA: ${{ github.event.workflow_run.pull_requests[0].head.sha }} | ||
| EXIST_VALID_FILES: ${{ steps.check-if-there-are-valid-files.outputs.exist_valid_files }} | ||
| shell: bash | ||
| run: | | ||
| delimiter="$(openssl rand -hex 8)" | ||
| { | ||
| echo "reports<<${delimiter}" | ||
| echo "Snapshot diff report vs base branch: $BASE_REF" | ||
| echo "Last updated: $(TZ='America/Los_Angeles' date), Sha: $HEAD_SHA" | ||
| } >> "$GITHUB_OUTPUT" | ||
|
|
||
| if [[ "$EXIST_VALID_FILES" == 'true' ]]; then | ||
| files=$(find . -type f -name "*_compare.png" | grep "roborazzi/" | grep -E "^[a-zA-Z0-9_./-]+$") | ||
| { | ||
| echo "| File name | Image |" | ||
| echo "|-------|-------|" | ||
| } >> "$GITHUB_OUTPUT" | ||
| for file in $files; do | ||
| fileName=$(basename "$file" | sed -r 's/(.{20})/\1<br>/g') | ||
| echo "| [$fileName](https://github.com/${{ github.repository }}/blob/$BRANCH_NAME/$file) |  |" >> "$GITHUB_OUTPUT" | ||
| done | ||
| else | ||
| echo "No differences detected" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| echo "${delimiter}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Find Comment | ||
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | ||
| id: fc | ||
| if: steps.generate-diff-reports.outputs.reports != '' | ||
| with: | ||
| issue-number: ${{ steps.pr_number.outputs.PR_NUMBER }} | ||
| comment-author: 'github-actions[bot]' | ||
| body-includes: Snapshot diff report | ||
|
|
||
| - name: Add or update comment on PR | ||
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | ||
| if: steps.generate-diff-reports.outputs.reports != '' | ||
| with: | ||
| comment-id: ${{ steps.fc.outputs.comment-id }} | ||
| issue-number: ${{ steps.pr_number.outputs.PR_NUMBER }} | ||
| body: ${{ steps.generate-diff-reports.outputs.reports }} | ||
| edit-mode: replace | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| [submodule "crates/dc_bundle/src/proto"] | ||
| path = crates/dc_bundle/src/proto | ||
| url = https://github.com/google/automotive-design-compose-protos.git | ||
| branch = main |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.