Skip to content

Commit

Permalink
Merge branch 'main' into release-2.53.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gewfy authored May 17, 2024
2 parents 0ad8690 + b98eedf commit c1fa3bb
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const style = ({hasError = false}) => ({
...textStyles.Body16,
backgroundColor: COLORS.PURE_WHITE,
borderRadius: 16,
color: hasError ? COLORS.ERROR : undefined,
color: hasError ? COLORS.ERROR : textStyles.Body16.color,
});

const TextInput = styled.TextInput<TextInputProps>(style);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ type CellComponentProps = {
onCellPress: () => void;
onChangeText: (text: string) => void;
hasError?: boolean;
autoFocus?: boolean;
};

const CellComponent = React.forwardRef<TextInput, CellComponentProps>(
({value, onCellPress, onKeyPress, onChangeText, hasError}, ref) => (
(
{value, onCellPress, onKeyPress, onChangeText, hasError, autoFocus},
ref,
) => (
<TouchableOpacity onPress={onCellPress}>
<Cell
autoCorrect={false}
Expand All @@ -50,6 +54,7 @@ const CellComponent = React.forwardRef<TextInput, CellComponentProps>(
onKeyPress={onKeyPress}
selectTextOnFocus
hasError={hasError}
autoFocus={autoFocus}
/>
</TouchableOpacity>
),
Expand Down Expand Up @@ -113,6 +118,7 @@ const VerificationCode: React.FC<VerificationCodeProps> = ({
id = setTimeout(() => {
setCode([]);
setShowError(false);
setFocusCells(true);
cells[0].current?.focus();
}, 300);
}
Expand Down Expand Up @@ -167,6 +173,7 @@ const VerificationCode: React.FC<VerificationCodeProps> = ({
onChangeText={updateCode(index)}
onKeyPress={onKeyPress(index)}
hasError={showError}
autoFocus={currentCell === index && prefillCode.length !== 6}
/>
))}
</Row>
Expand Down
6 changes: 5 additions & 1 deletion client/src/lib/navigation/ModalStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ const ModalStack = () => {
const cardModalScreenOptions: BottomSheetNavigationOptions = useMemo(
() => ({
...modalScreenOptions,
snapPoints: [200],
/*
A smaller snapPoint number would cause an issue where keyboard animation closes the modal
https://github.com/gorhom/react-native-bottom-sheet/issues/1602
*/
snapPoints: [300],
detached: true,
bottomInset: 10,
style: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ import styled from 'styled-components/native';
import {JoinSessionError} from '../../../../../shared/src/errors/Session';
import {COLORS} from '../../../../../shared/src/constants/colors';
import Gutters from '../../../lib/components/Gutters/Gutters';
import {
Spacer16,
Spacer24,
Spacer8,
} from '../../../lib/components/Spacers/Spacer';
import {Spacer16, Spacer32} from '../../../lib/components/Spacers/Spacer';
import {Body16} from '../../../lib/components/Typography/Body/Body';
import VerificationCode from '../../../lib/components/VerificationCode/VerificationCode';
import {ModalStackProps} from '../../../lib/navigation/constants/routes';
Expand All @@ -24,6 +20,11 @@ import useLogSessionMetricEvents from '../../../lib/sessions/hooks/useLogSession

const ErrorText = styled(Body16)({color: COLORS.ERROR, textAlign: 'center'});

const Container = styled(Gutters)({
flex: 1,
justifyContent: 'center',
});

const AddSessionModal = () => {
const {t} = useTranslation('Modal.JoinSession');
const {params: {inviteCode} = {}} =
Expand Down Expand Up @@ -69,8 +70,7 @@ const AddSessionModal = () => {

return (
<CardModal>
<Spacer24 />
<Gutters>
<Container>
{errorString ? (
<ErrorText>{errorString}</ErrorText>
) : (
Expand All @@ -83,8 +83,8 @@ const AddSessionModal = () => {
onCodeType={onCodeType}
onCodeCompleted={onCodeCompleted}
/>
<Spacer8 />
</Gutters>
<Spacer32 />
</Container>
</CardModal>
);
};
Expand Down
16 changes: 10 additions & 6 deletions content/src/collections/5c71e48d-f2a2-498c-9860-3b617f792416.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"en": {
"hidden": true,
"locked": false,
"locked": true,
"name": "Part I - Discover yourself",
"published": true,
"card": {
Expand All @@ -15,6 +15,7 @@
"566aeb1b-1649-4f5a-96a2-0c80be27efc0",
"cfc00217-f65b-4a4d-8b82-8ccc8f852dd6"
],
"link": "https://aware.29k.org/Part1-DiscoverYourself",
"id": "5c71e48d-f2a2-498c-9860-3b617f792416",
"exercises": [
"095f9642-73b6-4c9a-ae9a-ea7dea7363f5",
Expand All @@ -27,7 +28,7 @@
"pt": {
"published": false,
"hidden": false,
"locked": false,
"locked": true,
"id": "5c71e48d-f2a2-498c-9860-3b617f792416",
"tags": [
"8da0534a-5da9-430a-bdf3-242ace6460fb",
Expand All @@ -41,11 +42,12 @@
"5b0dea9f-c665-41ce-a779-601d0cfa433d",
"c1c4da35-87af-4e10-a8d9-e6c58571f724"
],
"card": {}
"card": {},
"link": "https://aware.29k.org/Part1-DiscoverYourself"
},
"sv": {
"hidden": true,
"locked": false,
"locked": true,
"name": "Del 1 - Utforska dig själv",
"published": true,
"card": {
Expand All @@ -59,6 +61,7 @@
"566aeb1b-1649-4f5a-96a2-0c80be27efc0",
"cfc00217-f65b-4a4d-8b82-8ccc8f852dd6"
],
"link": "https://aware.29k.org/Part1-DiscoverYourself",
"id": "5c71e48d-f2a2-498c-9860-3b617f792416",
"exercises": [
"095f9642-73b6-4c9a-ae9a-ea7dea7363f5",
Expand All @@ -71,7 +74,7 @@
"ja": {
"published": false,
"hidden": false,
"locked": false,
"locked": true,
"id": "5c71e48d-f2a2-498c-9860-3b617f792416",
"tags": [
"8da0534a-5da9-430a-bdf3-242ace6460fb",
Expand All @@ -85,6 +88,7 @@
"5b0dea9f-c665-41ce-a779-601d0cfa433d",
"c1c4da35-87af-4e10-a8d9-e6c58571f724"
],
"card": {}
"card": {},
"link": "https://aware.29k.org/Part1-DiscoverYourself"
}
}
120 changes: 100 additions & 20 deletions content/src/exercises/1e96f73b-8193-4aa6-a52c-31355eac3c08.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,76 +176,155 @@
"type": "host",
"hostNotes": [
{
"text": "Welcome. I am X and today we will work for around 30 minutes on xx\n\nWe’ll be doing xx ex. meditation followed by time for reflection and sharing with each other."
"text": "Bem-vindos. Sou X e hoje vamos dedicar cerca de 30 minutos à aceitação e disposição para enfrentar desafios. \n\nFaremos uma breve introdução, ouviremos uma meditação e, depois, haverá tempo para reflexão e partilha."
},
{
"text": "Let’s start with a mini check-in. How are you feeling right now? Please answer in two-three words. X, would you like to start?\n\n> Let everyone in the session, including yourself, check in one by one.\n\nThank you all for checking in. Let’s get started."
"text": "Vamos começar com um mini check-in. O que vos trouxe aqui hoje? Por favor, respondam em duas ou três palavras. X, queres começar?\n\n> Deixa que cada um faça o seu check-in individualmente. Faz também o teu.\n\nObrigada/o a todos por participarem. Vamos começar."
}
]
],
"video": {
"source": "https://res.cloudinary.com/cupcake-29k/video/upload/q_auto/v1678967008/Video/The_way_out_is_through_intro_rnvvyx.mp4",
"preview": "https://res.cloudinary.com/cupcake-29k/image/upload/q_auto,t_global/v1678967010/Images/The_way_out_is_through_thumb_fxakco.png"
}
},
{
"type": "content"
"type": "content",
"hostNotes": [
{
"text": "Encontrar obstáculos é uma parte natural da nossa vida. Nas coisas que desejamos – como relações amorosas felizes, um trabalho interessante ou sermos pais – o risco de sofrermos está sempre presente, embora raramente o reconheçamos e muitas vezes tentemos evitá-lo."
},
{
"text": "No próximo exercício, vamos praticar como enfrentar estas emoções desafiadoras ou difíceis. Tal como elas são. Como forma de gastar menos energia a tentar fugir do desconforto e gastar mais energia no que é importante para nós a longo prazo."
}
],
"content": {
"video": {
"audio": "https://res.cloudinary.com/cupcake-29k/video/upload/v1715249408/FJN/Meditations/Pedro_-_The_way_out_is_through_b7j3pt_fzkdcc.mp3"
},
"lottie": {
"source": "https://res.cloudinary.com/cupcake-29k/raw/upload/v1676977421/Lottie/audio_meditation_default_black_default_omemwt.json",
"durationTimer": true,
"audio": "https://res.cloudinary.com/cupcake-29k/video/upload/v1678801763/Audio/meditation_The_way_out_is_through_ao5qq6.mp3",
"subtitles": "https://res.cloudinary.com/cupcake-29k/raw/upload/q_auto,t_global/v1689602010/SRT%20(captions)%20files/The_way_out_is_through_s7rnfi.srt"
}
}
},
{
"type": "reflection",
"hostNotes": [
{
"text": "Now we’ll take 1 minute to reflect on our own.\n\nxxMain question\n\nxxFurther explanations of main question if needed"
"text": "Agora vamos refletir sozinhos durante 1 minuto. \n\nO que mudarias na tua vida se enfrentasses as dificuldades em vez de as evitares?"
},
{
"text": "You can take notes on a piece of paper or just mental notes in your head. And there is no right or wrong here, our answers are our own. 1 minute starting now.\n\n> Press play to start the timer.\n\nThat’s 1 minute and it’s time to move on."
"text": "Podes tomar notas num papel ou simplesmente fazer notas mentais. Não há respostas certas ou erradas, as respostas são nossas. 1 minuto a começar agora.\n\n> Pressiona play para iniciar o cronómetro.\n\nPassou 1 minuto e é hora de seguir em frente."
}
]
],
"content": {
"heading": "O que seria diferente se enfrentasses as dificuldades?",
"lottie": {
"source": "https://res.cloudinary.com/cupcake-29k/raw/upload/v1676642915/Lottie/default_1min_black_rosi2l.json",
"durationTimer": true,
"duration": 60
}
}
},
{
"type": "sharing",
"hostNotes": [
{
"text": "Now we are getting into the sharing part. We have three rules for sharing:\n\n1. **What is said in here, stays in here.**\n2. **All you need to do is listen.** There is no fixing, helping or advice-giving needed. We are just showing up and exploring what ourselves and others are going through."
"text": "Agora vamos à parte da partilha. Temos três regras para a partilha: \n\n1. **O que é dito aqui, fica aqui.**\n2. **Basta ouvir.** Não é necessário ajudar ou dar conselhos. Estamos apenas a partilhar e a explorar o que nós e os outros estamos a passar e sentir."
},
{
"text": "3. **Everything on the inside is okay.** Anger, love, hatred, sadness. Whatever shows up. No wrongs, no rights. It is what it is.\n\nThere will be a timer set for 2 minutes as an indicator. If you don’t want to share you can always say ‘pass’."
"text": "3. **Tudo o que sentires por dentro está bem.** Raiva, amor, ódio, tristeza. O que aparecer. Não há erros, nem acertos. É o que é.\n\nTeremos um cronómetro de 2 minutos como indicador. Se não quiseres partilhar, podes sempre dizer \"passo\"."
},
{
"text": "Who would like to start?\n\n> Let everyone (or as many as you got time for) share one by one. Press play to start the timer. Re-start for each new sharing.\n\nThank you so much everyone."
"text": "Quem gostaria de começar? \n\n> Deixa que cada um partilhe individualmente. Pressiona play para iniciar o cronómetro. Reinicia para cada nova partilha. \n\nMuito obrigada/o a todos."
}
]
],
"content": {
"heading": "O que seria diferente se enfrentasses as dificuldades?",
"lottie": {
"source": "https://res.cloudinary.com/cupcake-29k/raw/upload/v1676639253/Lottie/default_2min_black_o6egey.json",
"durationTimer": true,
"duration": 120
}
},
"id": "sharing1"
},
{
"type": "host",
"hostNotes": [
{
"text": "Well done. if you’re up for it, you can continue what we started here today with a mission to bring this into your everyday life.\n\nxx mission description"
"text": "Muito bem.\n\nAcabamos de praticar enfrentar as dificuldades em vez de as evitar. Esta técnica pode ajudar-nos a viver mais de acordo com os nossos valores e a ter vidas com mais significado."
},
{
"text": "Before we leave this space let’s do a mini check-out. \n\nHow are you feeling right now? Has anything shifted? Please answer in two-three words."
"text": "Antes de deixarmos este espaço, façamos um mini check-out.\n\nO que podes levar daqui para o resto do teu dia? Por favor, responde em duas ou três palavras."
},
{
"text": "Who would like to start?\n\n> Let everyone in the session check out one by one.\n\nThank you all for checking out and for joining this session today.\n\n> Finish session to send everyone off to the exit experience."
"text": "Quem gostaria de começar?\n\n> Deixa que cada um faça o seu check-out individualmente. \n\nObrigada/o a todos por participarem e por se juntarem a esta sessão hoje.\n\n> Termina a sessão para que todos possam seguir para a experiência de saída."
}
]
],
"video": {
"source": "https://res.cloudinary.com/cupcake-29k/video/upload/q_auto/v1678967008/Video/The_way_out_is_through_outro_waudnc.mp4",
"preview": "https://res.cloudinary.com/cupcake-29k/image/upload/q_auto,t_global/v1678967010/Images/The_way_out_is_through_thumb_fxakco.png"
}
},
{
"type": "instruction",
"content": {
"heading": "Parabéns",
"text": "Acabamos de praticar enfrentar as dificuldades em vez de as evitar. Esta técnica pode ajudar-nos a viver mais de acordo com os nossos valores e a ter vidas com mais significado.",
"image": {
"source": "https://res.cloudinary.com/cupcake-29k/image/upload/q_auto,t_global/v1687406076/Images/card_image_way_out_is_through_qjpv4m.png"
}
}
}
],
"theme": {
"textColor": "#2AE2D7"
"textColor": "#2E2E2E"
},
"hidden": false,
"published": false,
"name": "Ultrapassar os desafios",
"live": true,
"published": true,
"card": {
"image": {
"source": "https://res.cloudinary.com/cupcake-29k/image/upload/t_card_image/v1687406076/Images/card_image_way_out_is_through_qjpv4m.png"
}
},
"coCreators": [],
"duration": 30,
"outroPortal": {
"video": {
"source": "",
"audio": ""
}
},
"introPortal": {
"hostNotes": [
{
"text": "> Start the session when you're ready to go"
"text": "> Começa a sessão quando estiveres pronta/o"
}
]
],
"videoLoop": {
"source": "https://res.cloudinary.com/cupcake-29k/video/upload/q_auto/v1687856251/Video/way_out_is_through_portal1_rpqnfr.mp4",
"audio": "https://res.cloudinary.com/cupcake-29k/video/upload/v1687418774/Audio/way_out_is_through_portal_audio_doduhc.mp3",
"p5JsScript": {
"lang": "javascript"
}
},
"videoEnd": {
"source": "https://res.cloudinary.com/cupcake-29k/video/upload/q_auto/v1687856193/Video/way_out_is_through_portal_end_erxgxh.mp4"
}
},
"tags": [
"34100e43-2eb8-4d35-8eb0-9fa9f78e4935",
"cfc00217-f65b-4a4d-8b82-8ccc8f852dd6"
],
"link": "https://aware.29k.org/the-way-out-is-through",
"id": "1e96f73b-8193-4aa6-a52c-31355eac3c08",
"async": false
"async": true,
"description": "Neste exercício de meditação, vamos aprender a lidar com as dificuldades em vez de tentar evitá-las. Permitir-nos sentir o espectro completo de emoções pode ajudar-nos a ter vidas com mais significado e sentido de realização."
},
"sv": {
"slides": [
Expand Down Expand Up @@ -467,6 +546,7 @@
},
"hidden": false,
"published": false,
"card": {},
"duration": 30,
"introPortal": {
"hostNotes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"hidden": true,
"locked": false,
"name": "The inner friend",
"name": "New one with a nice title to come",
"live": true,
"published": true,
"duration": 30,
Expand Down
Loading

0 comments on commit c1fa3bb

Please sign in to comment.