Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sebin/task/#2284-up…
Browse files Browse the repository at this point in the history
…grade-cypress-to-the-latest
  • Loading branch information
SebinSong committed Sep 2, 2024
2 parents 92a839c + 1d951cd commit f65cae0
Show file tree
Hide file tree
Showing 18 changed files with 80,985 additions and 17 deletions.
8,857 changes: 8,857 additions & 0 deletions contracts/1.0.7/chatroom-slim.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/1.0.7/chatroom.1.0.7.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"gi.contracts/chatroom\",\"version\":\"1.0.7\",\"contract\":{\"hash\":\"z9brRu3VHqJMYbjBtJFgj1SyokBMnHs1FXnvCJjDF4qAwR9pNR8R\",\"file\":\"chatroom.js\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"IjAFp6gIzHW2HOIXXS9b4A3EKf8t9NNa5nndHcROiDk=\\\",null]\"],\"contractSlim\":{\"file\":\"chatroom-slim.js\",\"hash\":\"z9brRu3VVj6MRcNQGZ7PgKit8VRGAQ68q2T1n9m7eHZbPemiMgd7\"}}","signature":{"keyId":"z2DrjgbCDg34SaBhFjNEF45AVodCUu7QwcFBksz3BDgN4BekrdN","value":"0yuqAcWREdjTqXsthD+Ok47qGR5xlCYU2lbOSqvB0BsnLQ+zHplndajWEXRAB3O4MGO9Mgqm9fLLkNFiOhwrCg=="}}
17,675 changes: 17,675 additions & 0 deletions contracts/1.0.7/chatroom.js

Large diffs are not rendered by default.

10,103 changes: 10,103 additions & 0 deletions contracts/1.0.7/group-slim.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/1.0.7/group.1.0.7.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"gi.contracts/group\",\"version\":\"1.0.7\",\"contract\":{\"hash\":\"z9brRu3VURNGaXGpziFwxJm3ghr4MpaP4hyQuwN6NmF8DzRASPxy\",\"file\":\"group.js\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"IjAFp6gIzHW2HOIXXS9b4A3EKf8t9NNa5nndHcROiDk=\\\",null]\"],\"contractSlim\":{\"file\":\"group-slim.js\",\"hash\":\"z9brRu3VGT99EgTxFJNKWkTKhc9fp8ZzuPPsB3rVqaxA56bK6D4E\"}}","signature":{"keyId":"z2DrjgbCDg34SaBhFjNEF45AVodCUu7QwcFBksz3BDgN4BekrdN","value":"r3+zSS73CtwKRI7d8UXqh252YZjMRiHeM7ojnmQXbnsFeoHnELzNrQmPblUYNpw/fUS1s9HCAcgrC6+jUBIfBQ=="}}
18,932 changes: 18,932 additions & 0 deletions contracts/1.0.7/group.js

Large diffs are not rendered by default.

8,268 changes: 8,268 additions & 0 deletions contracts/1.0.7/identity-slim.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/1.0.7/identity.1.0.7.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"gi.contracts/identity\",\"version\":\"1.0.7\",\"contract\":{\"hash\":\"z9brRu3VTp8kMpJ4gtSUGfC9TNFrtDcXbPFJSeeSLeLiBtWsCxCB\",\"file\":\"identity.js\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"IjAFp6gIzHW2HOIXXS9b4A3EKf8t9NNa5nndHcROiDk=\\\",null]\"],\"contractSlim\":{\"file\":\"identity-slim.js\",\"hash\":\"z9brRu3VTd8EYjvvjftUTmnf51S1FWMstArreHxHJpmeasKmhKXh\"}}","signature":{"keyId":"z2DrjgbCDg34SaBhFjNEF45AVodCUu7QwcFBksz3BDgN4BekrdN","value":"O4wr9UUgfzIcxUrxxbz5GXDZpDS9BvMr/6rFx6+vLCA3rKBY3QNtaDz6CUbx0iqUJSGvF3rP83oedAhDHTkYCA=="}}
17,088 changes: 17,088 additions & 0 deletions contracts/1.0.7/identity.js

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions frontend/assets/style/_transitions.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
@import "_variables";

@mixin reduce-motion {
*:not(.force-motion),
*:not(.force-motion)::after,
*:not(.force-motion)::before {
transition: none !important;
animation: none !important;
}
}

.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
Expand Down Expand Up @@ -161,17 +170,11 @@
}

@media (prefers-reduced-motion: reduce) {
* {
transition: none !important;
animation: none !important;
}
@include reduce-motion;
}

.js-reducedMotion {
* {
transition: none !important;
animation: none !important;
}
@include reduce-motion;
}

@keyframes focused {
Expand Down
2 changes: 1 addition & 1 deletion frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ async function startApp () {
return {
'l-with-navigation': this.showNav,
'l-no-navigation': !this.showNav,
'js-reducedMotion': this.$store.state.reducedMotion,
'js-reducedMotion': this.$store.state.settings.reducedMotion,
'is-dark-theme': this.$store.getters.isDarkTheme
}
},
Expand Down
3 changes: 3 additions & 0 deletions frontend/model/settings/vuexModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const getters = {
isDarkTheme (state) {
return state.themeColor === THEME_DARK
},
isReducedMotionMode (state) {
return state.reducedMotion === true
},
theme (state) {
return state.theme
}
Expand Down
13 changes: 12 additions & 1 deletion frontend/views/components/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ span.c-twrapper(

.c-tooltip(
:style='styles'
:class='{"has-text-center": isTextCenter, "is-active": isActive, manual, "is-dark-theme": $store.getters.isDarkTheme}'
:class='{"has-text-center": isTextCenter, "is-active": isActive, manual, "is-dark-theme": $store.getters.isDarkTheme, "in-reduced-motion": isReducedMotionMode }'
v-if='isActive || isVisible'
v-append-to-body='{ manual }'
)
Expand All @@ -26,6 +26,7 @@ span.c-twrapper(
</template>

<script>
import { mapGetters } from 'vuex'
import { TABLET } from '@view-utils/breakpoints.js'
import trapFocus from '@utils/trapFocus.js'
Expand Down Expand Up @@ -79,6 +80,9 @@ export default ({
lastFocus: null
}),
computed: {
...mapGetters([
'isReducedMotionMode'
]),
rootElAttrs () {
return {
'tabindex': !this.triggerElementSelector
Expand Down Expand Up @@ -278,6 +282,13 @@ export default ({
}
}
&.in-reduced-motion {
* {
animation-duration: 0ms !important;
transition: none !important;
}
}
&:focus {
outline: none; // TODO #889
}
Expand Down
9 changes: 6 additions & 3 deletions frontend/views/containers/chatroom/ChatMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ export default ({
'isJoinedChatRoom',
'isGroupDirectMessage',
'currentChatRoomScrollPosition',
'currentChatRoomReadUntil'
'currentChatRoomReadUntil',
'isReducedMotionMode'
]),
currentUserAttr () {
return {
Expand Down Expand Up @@ -533,7 +534,7 @@ export default ({
if (!eleTarget) { return }
if (effect) {
eleTarget.scrollIntoView({ behavior: 'smooth' })
eleTarget.scrollIntoView({ behavior: this.isReducedMotionMode ? 'instant' : 'smooth' })
eleMessage.classList.add('c-focused')
setTimeout(() => {
eleMessage.classList.remove('c-focused')
Expand Down Expand Up @@ -594,7 +595,9 @@ export default ({
this.$refs.conversation.scroll({
left: 0,
top: this.$refs.conversation.scrollHeight,
behavior
behavior: this.isReducedMotionMode
? 'instant' // force 'instant' behaviour in reduced-motion mode regardless of the passed param.
: behavior
})
}
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/views/containers/chatroom/MessageBase.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template lang='pug'>
.c-message(
.c-message.force-motion(
:class='[variant, isSameSender && "same-sender", "is-type-" + type, isAlreadyPinned && "pinned"]'
@click='$emit("wrapperAction")'
v-touch:touchhold='longPressHandler'
Expand Down
23 changes: 22 additions & 1 deletion frontend/views/containers/contributions/Contribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ transition(name='replace-list')
@keydown.esc='cancel'
@keydown.enter.prevent='handleEnter'
)

.c-helper(v-if='receiverHasOnlyOneItem')
i.icon-info-circle
i18n At least one non-monetary contribution is required.

.buttons
button-submit.is-small.is-danger.is-outlined(
v-if='isEditing && !isAdding'
v-if='showRemoveBtn'
@click='handleDelete'
data-test='buttonRemoveNonMonetaryContribution'
) {{ L('Remove') }}
Expand Down Expand Up @@ -94,6 +99,7 @@ export default ({
initialValue: {
type: String
},
needsIncome: Boolean,
contributionsList: Array
},
data () {
Expand Down Expand Up @@ -121,6 +127,12 @@ export default ({
isUnfilled () {
return this.variant === 'unfilled'
},
receiverHasOnlyOneItem () {
return this.needsIncome && this.contributionsList?.length === 1
},
showRemoveBtn () {
return this.isEditing && !this.isAdding && !this.receiverHasOnlyOneItem
},
editAriaLabel () {
return L('Edit contribution settings')
},
Expand Down Expand Up @@ -237,6 +249,15 @@ export default ({
}
}
.c-helper {
display: flex;
align-items: flex-start;
column-gap: 0.25rem;
color: $text_1;
margin-top: 0.5rem;
font-size: $size_4;
}
.buttons {
padding-top: 1rem;
padding-bottom: 0.25rem;
Expand Down
1 change: 1 addition & 0 deletions frontend/views/pages/Contributions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ page(pageTestName='contributionsPage' pageTestHeaderName='contributionsTitle')
contribution.has-text-weight-bold(
v-for='(contribution, index) in ourGroupProfile.nonMonetaryContributions'
:key='`contribution-${index}`'
:needs-income='needsIncome'
variant='editable'
:contributions-list='ourGroupProfile.nonMonetaryContributions'
:initial-value='contribution'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "group-income",
"version": "1.0.6",
"contractsVersion": "1.0.6",
"version": "1.0.7",
"contractsVersion": "1.0.7",
"private": true,
"description": "Group Income is a decentralized and private (end-to-end encrypted) financial safety net for you and your friends.",
"scripts": {
Expand Down

0 comments on commit f65cae0

Please sign in to comment.