-
Notifications
You must be signed in to change notification settings - Fork 1.3k
experimental: Proof of concept of the Animation component using ScrollTimeline #4797
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
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI setup | ||
|
||
description: | | ||
Sets up the CI environment for the project. | ||
inputs: | ||
submodules-ssh-key: | ||
description: "The SSH key to private submodules to use for the checkout" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Set up SSH for Git | ||
if: ${{ inputs.submodules-ssh-key }} | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ inputs.submodules-ssh-key }}" > ~/.ssh/id_ed25519 | ||
chmod 600 ~/.ssh/id_ed25519 | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
shell: bash | ||
|
||
- name: Verify SSH Connection (Optional) | ||
if: ${{ inputs.submodules-ssh-key }} | ||
run: | | ||
ssh -T [email protected] || true | ||
shell: bash | ||
|
||
- name: Verify SSH Connection (Optional) | ||
if: ${{ inputs.submodules-ssh-key }} | ||
run: | | ||
echo Branch is ${{ github.event.pull_request.head.ref || github.ref_name }} | ||
shell: bash | ||
|
||
- name: Try checkout submodules to the same branch as main repo | ||
if: ${{ inputs.submodules-ssh-key }} | ||
run: | | ||
./submodules.sh ${{ github.event.pull_request.head.ref || github.ref_name }} | ||
shell: bash | ||
|
||
- name: Show main readme | ||
if: ${{ inputs.submodules-ssh-key }} | ||
run: | | ||
cat ./packages/sdk-components-animation/private-src/README.md || echo "No README found" | ||
shell: bash |
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,67 @@ | ||
name: Check submodules | ||
|
||
on: | ||
pull_request: | ||
|
||
# cancel in-progress runs on new commits to same PR (gitub.event.number) | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
checks: | ||
timeout-minutes: 20 | ||
|
||
environment: | ||
name: development | ||
|
||
env: | ||
DATABASE_URL: postgres:// | ||
AUTH_SECRET: test | ||
|
||
runs-on: ubuntu-24.04-arm | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
||
- uses: ./.github/actions/submodules-checkout | ||
with: | ||
submodules-ssh-key: ${{ secrets.PRIVATE_GITHUB_DEPLOY_TOKEN }} | ||
|
||
- name: Check if any submodule branch matches github.ref_name | ||
run: | | ||
echo "C ${{ github.workflow }}-${{ github.event.number || github.sha }}" | ||
# Get the current branch or tag name | ||
REF_NAME="${{ github.event.pull_request.head.ref || github.ref_name }}" | ||
|
||
echo "Branch is:" $REF_NAME | ||
|
||
# List all submodule paths | ||
SUBMODULES=$(git submodule status | awk '{print $2}') | ||
|
||
# Check each submodule's branch | ||
for SUBMODULE in $SUBMODULES; do | ||
echo "Checking submodule: $SUBMODULE" | ||
( | ||
cd "$SUBMODULE" | ||
# Get the current branch of the submodule | ||
SUBMODULE_BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
echo "Submodule branch: $SUBMODULE_BRANCH" | ||
|
||
# Compare the submodule branch to the ref_name | ||
if [ "$SUBMODULE_BRANCH" = "$REF_NAME" ]; then | ||
echo "::error::Submodule '$SUBMODULE' is on branch '$SUBMODULE_BRANCH', which matches the current ref '$REF_NAME'." | ||
exit 1 | ||
fi | ||
) | ||
if [ $? -ne 0 ]; then | ||
exit 1 # Fail the workflow if any submodule branch matches | ||
fi | ||
done | ||
|
||
echo "No submodule is on the same branch as the current ref '$REF_NAME'." |
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
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
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
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,4 @@ | ||
[submodule "packages/sdk-components-animation/private-src"] | ||
path = packages/sdk-components-animation/private-src | ||
url = [email protected]:webstudio-is/sdk-components-animation.git | ||
branch = main |
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,14 @@ | ||
type ScrollAxis = "block" | "inline" | "x" | "y"; | ||
|
||
interface ScrollTimelineOptions { | ||
source?: Element | Document | null; | ||
axis?: ScrollAxis; | ||
} | ||
|
||
declare class ScrollTimeline extends AnimationTimeline { | ||
constructor(options?: ScrollTimelineOptions); | ||
} | ||
|
||
declare class ViewTimeline extends ScrollTimeline { | ||
constructor(options?: ScrollTimelineOptions); | ||
} |
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.