File tree 10 files changed +34
-39
lines changed
frontend/src/lib/components
proposal-detail/VotingCard
10 files changed +34
-39
lines changed Original file line number Diff line number Diff line change 9
9
TransactionIconType ,
10
10
UiTransaction ,
11
11
} from " $lib/types/transaction" ;
12
- import { KeyValuePair , testSafeFade } from " @dfinity/gix-components" ;
12
+ import { KeyValuePair } from " @dfinity/gix-components" ;
13
13
import {
14
14
nonNullish ,
15
15
type TokenAmount ,
16
16
type TokenAmountV2 ,
17
17
} from " @dfinity/utils" ;
18
+ import { fade } from " svelte/transition" ;
18
19
19
20
export let transaction: UiTransaction ;
20
21
55
56
$ : seconds = timestamp && timestamp .getTime () / 1000 ;
56
57
</script >
57
58
58
- <article data-tid =" transaction-card" transition:testSafeFade >
59
+ <article data-tid =" transaction-card" transition:fade | global >
59
60
<div class =" icon" >
60
61
<TransactionIcon type ={iconType } {isPending } />
61
62
</div >
Original file line number Diff line number Diff line change 4
4
import { jsonRepresentationModeStore } from " $lib/derived/json-representation.derived" ;
5
5
import { i18n } from " $lib/stores/i18n" ;
6
6
import { expandObject , getObjMaxDepth } from " $lib/utils/utils" ;
7
- import {
8
- IconCollapseAll ,
9
- IconExpandAll ,
10
- testSafeFade ,
11
- } from " @dfinity/gix-components" ;
7
+ import { IconCollapseAll , IconExpandAll } from " @dfinity/gix-components" ;
12
8
import { isNullish } from " @dfinity/utils" ;
9
+ import { fade } from " svelte/transition" ;
13
10
14
11
const DEFAULT_EXPANDED_LEVEL = 1 ;
15
12
41
38
on:click ={toggleExpanded }
42
39
>
43
40
{#if isAllExpanded }
44
- <div in:testSafeFade >
41
+ <div in:fade >
45
42
<IconCollapseAll />
46
43
<span class ="expand-all-label" >{$i18n .core .collapse_all }</span >
47
44
</div >
48
45
{:else }
49
- <div in:testSafeFade >
46
+ <div in:fade >
50
47
<IconExpandAll />
51
48
<span class ="expand-all-label" >{$i18n .core .expand_all }</span >
52
49
</div >
55
52
{/if }
56
53
<div data-tid =" json-wrapper" class =" json-wrapper" >
57
54
{#if $jsonRepresentationModeStore === " tree" }
58
- <div in:testSafeFade >
55
+ <div in:fade >
59
56
<TreeJson
60
57
testId =" tree-json"
61
58
json ={expandedData }
62
59
defaultExpandedLevel ={isAllExpanded ? Number .MAX_SAFE_INTEGER : 1 }
63
60
/>
64
61
</div >
65
62
{:else }
66
- <div in:testSafeFade >
63
+ <div in:fade >
67
64
<RawJson testId ="raw-json" {json } />
68
65
</div >
69
66
{/if }
Original file line number Diff line number Diff line change 28
28
ThemeToggleButton ,
29
29
layoutMenuOpen ,
30
30
menuCollapsed ,
31
- testSafeScale ,
32
31
} from " @dfinity/gix-components" ;
33
32
import type { ComponentType } from " svelte" ;
34
33
import { cubicIn , cubicOut } from " svelte/easing" ;
34
+ import { scale } from " svelte/transition" ;
35
35
36
36
let routes: {
37
37
context: string ;
127
127
<div
128
128
data-tid =" menu-footer"
129
129
class =" menu-footer"
130
- out:testSafeScale ={{ duration : 200 , easing : cubicOut }}
131
- in:testSafeScale ={{ duration : 200 , easing : cubicIn }}
130
+ out:scale ={{ duration : 200 , easing : cubicOut }}
131
+ in:scale ={{ duration : 200 , easing : cubicIn }}
132
132
>
133
133
<TotalValueLocked layout =" stacked" />
134
134
<div class =" menu-footer-buttons" >
Original file line number Diff line number Diff line change 6
6
type TreeJsonValueType ,
7
7
} from " $lib/utils/json.utils" ;
8
8
import { typeOfLikeANumber } from " $lib/utils/utils" ;
9
- import { IconExpandMore , testSafeFade } from " @dfinity/gix-components" ;
9
+ import { IconExpandMore } from " @dfinity/gix-components" ;
10
+ import { fade } from " svelte/transition" ;
10
11
11
12
export let json: unknown | undefined = undefined ;
12
13
export let defaultExpandedLevel = Infinity ;
71
72
{/if }
72
73
{#if ! collapsed }
73
74
<!-- children of expandable-key -->
74
- <ul class:root class:is-array ={isArray } in:testSafeFade data-tid ={testId }>
75
+ <ul class:root class:is-array ={isArray } in:fade data-tid ={testId }>
75
76
{#each children as [key, value]}
76
77
<li class:root class:key-is-index ={keyIsIndex }>
77
78
<svelte:self
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import {
3
- Collapsible ,
4
- IconExpandCircleDown ,
5
- testSafeFade ,
6
- } from " @dfinity/gix-components" ;
2
+ import { Collapsible , IconExpandCircleDown } from " @dfinity/gix-components" ;
3
+ import { fade } from " svelte/transition" ;
7
4
8
5
export let testId: string ;
9
6
10
7
let toggleContent: () => void ;
11
8
let expanded: boolean ;
12
9
</script >
13
10
14
- <div class =" container" in:testSafeFade >
11
+ <div class =" container" in:fade >
15
12
<Collapsible
16
13
{testId }
17
14
expandButton ={false }
Original file line number Diff line number Diff line change 4
4
import type { Universe } from " $lib/types/universe" ;
5
5
import { replacePlaceholders } from " $lib/utils/i18n.utils" ;
6
6
import { isUniverseNns } from " $lib/utils/universe.utils" ;
7
- import { Tooltip , testSafeScale } from " @dfinity/gix-components" ;
7
+ import { Tooltip } from " @dfinity/gix-components" ;
8
8
import { Principal } from " @dfinity/principal" ;
9
9
import { cubicOut } from " svelte/easing" ;
10
+ import { scale } from " svelte/transition" ;
10
11
11
12
export let count: number ;
12
13
export let universe: Universe | " all" ;
33
34
<TestIdWrapper testId =" actionable-proposal-count-badge-component" >
34
35
<Tooltip idPrefix ="actionable-count-tooltip" text ={tooltipText } top ={true }
35
36
><span
36
- transition:testSafeScale ={{
37
+ transition:scale ={{
37
38
duration : 250 ,
38
39
easing : cubicOut ,
39
40
}}
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { testSafeFade } from " @dfinity/gix-components " ;
2
+ import { fade } from " svelte/transition " ;
3
3
</script >
4
4
5
- <div
6
- class =" filters"
7
- data-tid =" proposals-filters"
8
- in:testSafeFade ={{ duration : 150 }}
9
- >
5
+ <div class ="filters" data-tid ="proposals-filters" in:fade ={{ duration : 150 }}>
10
6
<slot />
11
7
</div >
12
8
Original file line number Diff line number Diff line change 12
12
import { authSignedInStore } from " $lib/derived/auth.derived" ;
13
13
import { filteredActionableProposals } from " $lib/derived/proposals.derived" ;
14
14
import { actionableNnsProposalsStore } from " $lib/stores/actionable-nns-proposals.store" ;
15
- import { InfiniteScroll , testSafeFade } from " @dfinity/gix-components" ;
15
+ import { InfiniteScroll } from " @dfinity/gix-components" ;
16
16
import type { ProposalInfo } from " @dfinity/nns" ;
17
17
import { isNullish } from " @dfinity/utils" ;
18
-
18
+ import { fade } from " svelte/transition " ;
19
19
export let hidden: boolean ;
20
20
export let disableInfiniteScroll: boolean ;
21
21
export let loading: boolean ;
35
35
36
36
{#if display }
37
37
{#if ! $actionableProposalsActiveStore }
38
- <div in:testSafeFade data-tid =" all-proposal-list" >
38
+ <div in:fade data-tid =" all-proposal-list" >
39
39
{#if loadingAnimation === " skeleton" }
40
40
<LoadingProposals />
41
41
{:else if $filteredActionableProposals .proposals .length === 0 }
59
59
{/if }
60
60
</div >
61
61
{:else }
62
- <div in:testSafeFade data-tid =" actionable-proposal-list" >
62
+ <div in:fade data-tid =" actionable-proposal-list" >
63
63
{#if ! $authSignedInStore }
64
64
<ActionableProposalsSignIn />
65
65
{:else if isNullish (actionableProposals )}
Original file line number Diff line number Diff line change 10
10
import { authSignedInStore } from " $lib/derived/auth.derived" ;
11
11
import { pageStore } from " $lib/derived/page.derived" ;
12
12
import type { SnsProposalActionableData } from " $lib/derived/sns/sns-filtered-actionable-proposals.derived" ;
13
- import { InfiniteScroll , testSafeFade } from " @dfinity/gix-components" ;
13
+ import { InfiniteScroll } from " @dfinity/gix-components" ;
14
14
import type { SnsNervousSystemFunction } from " @dfinity/sns" ;
15
15
import { fromNullable , isNullish } from " @dfinity/utils" ;
16
+ import { fade } from " svelte/transition" ;
16
17
17
18
export let proposals: SnsProposalActionableData [] | undefined ;
18
19
export let actionableSelected: boolean ;
25
26
<SnsProposalsFilters />
26
27
27
28
{#if ! actionableSelected }
28
- <div in:testSafeFade data-tid =" all-proposal-list" >
29
+ <div in:fade data-tid =" all-proposal-list" >
29
30
{#if proposals === undefined }
30
31
<LoadingProposals />
31
32
{:else if proposals .length === 0 }
50
51
{/if }
51
52
</div >
52
53
{:else }
53
- <div in:testSafeFade data-tid =" actionable-proposal-list" >
54
+ <div in:fade data-tid =" actionable-proposal-list" >
54
55
{#if ! $authSignedInStore }
55
56
<ActionableProposalsSignIn />
56
57
{:else if isNullish (proposals )}
Original file line number Diff line number Diff line change 15
15
import { i18n } from " $lib/stores/i18n" ;
16
16
import type { Universe } from " $lib/types/universe" ;
17
17
import { isSelectedPath } from " $lib/utils/navigation.utils" ;
18
- import { Card , testSafeScale } from " @dfinity/gix-components" ;
18
+ import { Card } from " @dfinity/gix-components" ;
19
19
import { nonNullish } from " @dfinity/utils" ;
20
20
import { onMount } from " svelte" ;
21
21
import { cubicOut } from " svelte/easing" ;
22
+ import { scale } from " svelte/transition" ;
22
23
23
24
export let selected: boolean ;
24
25
// "link" for desktop, "button" for mobile, "dropdown" to open the modal
73
74
{#if $actionableProposalIndicationVisibleStore }
74
75
{#if $actionableProposalTotalCountStore > 0 && mounted }
75
76
<div
76
- in:testSafeScale ={{
77
+ in:scale ={{
77
78
duration : 250 ,
78
79
easing : cubicOut ,
79
80
}}
You can’t perform that action at this time.
0 commit comments