Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
SocialGouv
1000jours
les1000jours
Commits
ec37497e
Unverified
Commit
ec37497e
authored
Jul 29, 2021
by
benguedj
Committed by
GitHub
Jul 29, 2021
Browse files
fix:
🐛
Corrige les problèmes d'affichage sur tablette (#566)
parent
5e767e30
Changes
7
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
12 deletions
+17
-12
front/constants/platform.constants.ts
front/constants/platform.constants.ts
+8
-1
front/constants/spacings.ts
front/constants/spacings.ts
+0
-2
front/screens/epdsSurvey/epdsLightResult.component.tsx
front/screens/epdsSurvey/epdsLightResult.component.tsx
+1
-0
front/screens/epdsSurvey/epdsResultInformation/epdsResultContactParagraph.component.tsx
...esultInformation/epdsResultContactParagraph.component.tsx
+1
-4
front/screens/epdsSurvey/epdsResultInformation/epdsResultInformation.component.tsx
...epdsResultInformation/epdsResultInformation.component.tsx
+7
-1
front/screens/epdsSurvey/epdsResultInformation/epdsResultSimpleParagraph.component.tsx
...ResultInformation/epdsResultSimpleParagraph.component.tsx
+0
-2
front/screens/epdsSurvey/epdsResultInformation/epdsResultUrlParagraph.component.tsx
...pdsResultInformation/epdsResultUrlParagraph.component.tsx
+0
-2
No files found.
front/constants/platform.constants.ts
View file @
ec37497e
...
...
@@ -3,9 +3,16 @@ import { Dimensions, Platform } from "react-native";
export
const
{
width
:
SCREEN_WIDTH
,
height
:
SCREEN_HEIGHT
}
=
Dimensions
.
get
(
"
window
"
);
const
MAX_TABLET_RATIO
=
1.6
;
const
IS_TABLET
=
SCREEN_HEIGHT
/
SCREEN_WIDTH
<
MAX_TABLET_RATIO
;
// Based on iPhone 6's scale : 375 x 667
const
IPHONE6_WIDTH_SCALE
=
375
;
export
const
SCREEN_SCALE
=
SCREEN_WIDTH
/
IPHONE6_WIDTH_SCALE
;
// Based on iPad : 768 x 1024
const
IPAD_AIR_WIDTH_SCALE
=
768
;
export
const
SCREEN_SCALE
=
SCREEN_WIDTH
/
(
IS_TABLET
?
IPAD_AIR_WIDTH_SCALE
:
IPHONE6_WIDTH_SCALE
);
export
const
PLATFORM_IS_IOS
=
Platform
.
OS
===
"
ios
"
;
export
const
PLATFORM_IS_ANDROID
=
Platform
.
OS
===
"
android
"
;
export
const
MAJOR_VERSION_IOS
=
parseInt
(
Platform
.
Version
.
toString
(),
10
);
front/constants/spacings.ts
View file @
ec37497e
import
{
scaleNormalize
}
from
"
../utils/scaleNormalize.util
"
;
import
{
SCREEN_WIDTH
}
from
"
./platform.constants
"
;
/* eslint-disable sort-keys-fix/sort-keys-fix */
export
const
Margins
=
{
...
...
@@ -13,7 +12,6 @@ export const Margins = {
evenMoreLargest
:
scaleNormalize
(
50
),
step
:
scaleNormalize
(
60
),
snackbarMargin
:
scaleNormalize
(
80
),
epdsResultLeftMargin
:
SCREEN_WIDTH
/
8
,
};
export
const
Paddings
=
{
...
...
front/screens/epdsSurvey/epdsLightResult.component.tsx
View file @
ec37497e
...
...
@@ -196,6 +196,7 @@ const styles = StyleSheet.create({
},
validateButton
:
{
alignItems
:
"
center
"
,
paddingTop
:
Paddings
.
light
,
},
});
...
...
front/screens/epdsSurvey/epdsResultInformation/epdsResultContactParagraph.component.tsx
View file @
ec37497e
...
...
@@ -30,7 +30,7 @@ const EpdsResultContactParagraph: React.FC<EpdsResultContactParagraphProps> = ({
const
titleStyle
=
[
styles
.
contactName
,
{
fontSize
:
Sizes
.
sm
}];
return
(
<
View
style
=
{
[
styles
.
itemBorder
,
styles
.
marginLeft
]
}
>
<
View
style
=
{
styles
.
itemBorder
}
>
{
paragraphTitle
&&
paragraphTitle
.
length
>
0
&&
(
<
SecondaryText
style
=
{
titleStyle
}
>
{
paragraphTitle
}
</
SecondaryText
>
)
}
...
...
@@ -98,9 +98,6 @@ const styles = StyleSheet.create({
borderBottomWidth
:
1
,
paddingRight
:
Paddings
.
smaller
,
},
marginLeft
:
{
marginLeft
:
-
Margins
.
epdsResultLeftMargin
,
},
paddingVertical
:
{
paddingVertical
:
Paddings
.
default
,
},
...
...
front/screens/epdsSurvey/epdsResultInformation/epdsResultInformation.component.tsx
View file @
ec37497e
...
...
@@ -41,7 +41,9 @@ const EpdsResultInformation: React.FC<EpdsResultInformationProps> = ({
const
renderParagraphs
=
(
paragraphs
:
EpdsResultInformationType
[])
=>
{
return
paragraphs
.
map
(
(
paragraph
:
EpdsResultInformationType
,
index
:
number
)
=>
(
<
View
key
=
{
index
}
>
{
renderParagraph
(
paragraph
)
}
</
View
>
<
View
key
=
{
index
}
style
=
{
styles
.
accordionItem
}
>
{
renderParagraph
(
paragraph
)
}
</
View
>
)
);
};
...
...
@@ -113,6 +115,10 @@ const styles = StyleSheet.create({
accordion
:
{
backgroundColor
:
Colors
.
cardWhite
,
},
accordionItem
:
{
paddingLeft
:
Paddings
.
light
,
paddingRight
:
Paddings
.
smaller
,
},
card
:
{
borderColor
:
Colors
.
cardGrey
,
borderStartWidth
:
Margins
.
smaller
,
...
...
front/screens/epdsSurvey/epdsResultInformation/epdsResultSimpleParagraph.component.tsx
View file @
ec37497e
...
...
@@ -71,8 +71,6 @@ const styles = StyleSheet.create({
itemBorder
:
{
borderBottomColor
:
Colors
.
disabled
,
borderBottomWidth
:
1
,
marginLeft
:
-
Margins
.
epdsResultLeftMargin
,
marginRight
:
Margins
.
smaller
,
paddingVertical
:
Paddings
.
smaller
,
},
paragraphDescription
:
{
...
...
front/screens/epdsSurvey/epdsResultInformation/epdsResultUrlParagraph.component.tsx
View file @
ec37497e
...
...
@@ -42,8 +42,6 @@ const styles = StyleSheet.create({
itemBorder
:
{
borderBottomColor
:
Colors
.
disabled
,
borderBottomWidth
:
1
,
marginLeft
:
-
Margins
.
epdsResultLeftMargin
,
marginRight
:
Margins
.
smaller
,
marginVertical
:
Margins
.
smaller
,
},
paragraphTitle
:
{
...
...
Social Groovy Bot
🤖
@SocialGroovyBot
mentioned in commit
2614e260
·
Jul 29, 2021
mentioned in commit
2614e260
mentioned in commit 2614e26077bd6b828458b16cc760db580bf05390
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment