mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
🔥 refactor: remove crossfade transition from commit boxes
This commit is contained in:
parent
fb96d91164
commit
8213e0628c
@ -13,8 +13,6 @@
|
||||
import { Ownership } from '$lib/vbranches/ownership';
|
||||
import { getExpandedWithCacheFallback, setExpandedWithCache } from './cache';
|
||||
import type { BranchController } from '$lib/vbranches/branchController';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
import { crossfade } from 'svelte/transition';
|
||||
import type { User, getCloudApiClient } from '$lib/backend/cloud';
|
||||
import Resizer from '$lib/components/Resizer.svelte';
|
||||
import { SETTINGS_CONTEXT, type SettingsStore } from '$lib/settings/userSettings';
|
||||
@ -30,24 +28,6 @@
|
||||
import BranchFiles from './BranchFiles.svelte';
|
||||
import CommitList from './CommitList.svelte';
|
||||
|
||||
const [send, receive] = crossfade({
|
||||
duration: (d) => Math.sqrt(d * 200),
|
||||
|
||||
fallback(node) {
|
||||
const style = getComputedStyle(node);
|
||||
const transform = style.transform === 'none' ? '' : style.transform;
|
||||
|
||||
return {
|
||||
duration: 600,
|
||||
easing: quintOut,
|
||||
css: (t) => `
|
||||
transform: ${transform} scale(${t});
|
||||
opacity: ${t}
|
||||
`
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export let branch: Branch;
|
||||
export let readonly = false;
|
||||
export let projectId: string;
|
||||
@ -329,8 +309,6 @@
|
||||
<CommitList
|
||||
{branch}
|
||||
{base}
|
||||
{send}
|
||||
{receive}
|
||||
{githubContext}
|
||||
{projectId}
|
||||
{branchController}
|
||||
@ -346,8 +324,6 @@
|
||||
<CommitList
|
||||
{branch}
|
||||
{base}
|
||||
{send}
|
||||
{receive}
|
||||
{githubContext}
|
||||
{projectId}
|
||||
{branchController}
|
||||
@ -363,8 +339,6 @@
|
||||
<CommitList
|
||||
{branch}
|
||||
{base}
|
||||
{send}
|
||||
{receive}
|
||||
{githubContext}
|
||||
{projectId}
|
||||
{branchController}
|
||||
|
@ -35,20 +35,6 @@
|
||||
export let onSquash: (commit: Commit) => (data: DraggableCommit) => void;
|
||||
export let resetHeadCommit: () => void;
|
||||
|
||||
export let receive: (
|
||||
node: any,
|
||||
params: CrossfadeParams & {
|
||||
key: any;
|
||||
}
|
||||
) => () => TransitionConfig;
|
||||
|
||||
export let send: (
|
||||
node: any,
|
||||
params: CrossfadeParams & {
|
||||
key: any;
|
||||
}
|
||||
) => () => TransitionConfig;
|
||||
|
||||
let isPushing: boolean;
|
||||
|
||||
$: branchName = branch.upstream?.name.split('/').slice(-1)[0];
|
||||
@ -147,12 +133,7 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="commits">
|
||||
{#each commits as commit, idx (commit.id)}
|
||||
<div
|
||||
class="draggable-wrapper"
|
||||
in:receive={{ key: commit.id }}
|
||||
out:send={{ key: commit.id }}
|
||||
animate:flip
|
||||
>
|
||||
<div class="draggable-wrapper">
|
||||
<CommitListItem
|
||||
{commit}
|
||||
{base}
|
||||
|
Loading…
Reference in New Issue
Block a user