react-native-in-app-debugger 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.jsx +24 -23
  2. package/package.json +1 -1
package/index.jsx CHANGED
@@ -55,14 +55,18 @@ export default ({
55
55
 
56
56
  const errors = apis.filter((a) => a.response?.error).length;
57
57
  const numPendingApiCalls = apis.filter((a) => !a.response).length;
58
- let badgeHeight = 20;
59
- if (variables?.GIT_BRANCH) badgeHeight += 7;
60
- if (variables?.BUILD_DATE_TIME) badgeHeight += 7;
61
- const hasEnvOrVersion = !!env || !!version;
62
- if (hasEnvOrVersion) badgeHeight += 7;
63
- if (DeviceInfo) badgeHeight += 7;
64
- if (badgeHeight === 20) badgeHeight += 7;
65
- labels.forEach(() => (badgeHeight += 7));
58
+ let badgeHeight = 13;
59
+
60
+ const displayLabels = [
61
+ (!!env || !!version) && (env || "") + (env ? " " : "") + version,
62
+ modelOs,
63
+ ~~dimension.width + " x " + ~~dimension.height,
64
+ variables?.GIT_BRANCH,
65
+ variables?.BUILD_DATE_TIME,
66
+ ...labels,
67
+ ].filter(Boolean);
68
+
69
+ displayLabels.forEach(() => (badgeHeight += 7));
66
70
 
67
71
  const {
68
72
  translateX,
@@ -107,26 +111,17 @@ export default ({
107
111
  </View>
108
112
  )}
109
113
  </View>
110
- {(!!env || !!version) && (
111
- <Label>{(env || "") + (env ? " " : "") + version}</Label>
112
- )}
113
- {!!modelOs && <Label>{modelOs}</Label>}
114
- <Label>{~~dimension.width + " x " + ~~dimension.height}</Label>
115
- {variables?.GIT_BRANCH && <Label>{variables.GIT_BRANCH}</Label>}
116
- {variables?.BUILD_DATE_TIME && (
117
- <Label>{variables.BUILD_DATE_TIME}</Label>
118
- )}
119
- {labels.map((l) => (
114
+ {displayLabels.map((l) => (
120
115
  <Label key={l}>{l}</Label>
121
116
  ))}
122
117
  </TouchableOpacity>
123
118
  ) : (
124
119
  <SafeAreaView style={{ flex: 1 }}>
125
- {!!version && (
126
- <View style={{ backgroundColor: "black" }}>
127
- <Label>{version}</Label>
128
- </View>
129
- )}
120
+ <View style={styles.labelContainer}>
121
+ {displayLabels.map((l) => (
122
+ <Label key={l}>{l}</Label>
123
+ ))}
124
+ </View>
130
125
  <View style={{ flexDirection: "row", padding: 5 }}>
131
126
  <View style={{ flex: 1, flexDirection: "row" }}>
132
127
  {!!variables &&
@@ -201,4 +196,10 @@ const styles = StyleSheet.create({
201
196
  fontSize: 16,
202
197
  paddingHorizontal: 10,
203
198
  },
199
+ labelContainer: {
200
+ backgroundColor: "black",
201
+ flexDirection: "row",
202
+ columnGap: 7,
203
+ flexWrap: "wrap",
204
+ },
204
205
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.",
5
5
  "main": "index.jsx",
6
6
  "scripts": {