Skip to content

Commit 8665675

Browse files
authored
Merge branch 'master' into v9
2 parents 5e3ec4d + 3e1d38c commit 8665675

File tree

13 files changed

+148
-83
lines changed

13 files changed

+148
-83
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Block Merge Label Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, labeled, unlabeled]
6+
7+
jobs:
8+
check-do-not-merge-label:
9+
runs-on: ubuntu-latest
10+
name: Check Do Not Merge Label
11+
12+
steps:
13+
- name: Check for Do Not Merge label
14+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
15+
with:
16+
script: |
17+
const prNumber = context.payload.pull_request.number;
18+
console.log(`Checking labels for PR #${prNumber}...`);
19+
20+
// Get all labels on the PR
21+
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: prNumber,
25+
});
26+
27+
// Check if "Do Not Merge!" label exists
28+
const doNotMergeLabel = labels.find(label => label.name === 'Do Not Merge!');
29+
30+
if (doNotMergeLabel) {
31+
console.log('❌ Found "Do Not Merge!" label - blocking merge');
32+
core.setFailed('PR has "Do Not Merge!" label - cannot merge');
33+
} else {
34+
console.log('✅ No "Do Not Merge!" label found - PR can be merged');
35+
}
36+

.github/workflows/deployDocs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2121
with:
2222
node-version-file: '.nvmrc'
2323
cache: 'yarn'
2424

2525
- name: Install dependencies
26-
run: yarn install
26+
run: NPQ_PKG_MGR=yarn npx npq install --immutable
2727

2828
- name: Build documentation
2929
run: yarn docs:build
@@ -38,7 +38,7 @@ jobs:
3838
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3939
git config --global user.name "github-actions[bot]"
4040
cd docuilib
41-
yarn install
41+
NPQ_PKG_MGR=yarn npx npq install --immutable
4242
yarn deploy
4343
4444
- name: Deploy disclaimer

.github/workflows/label-waiting-for-response.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- name: Check if commenter is maintainer
2323
id: check-maintainer
24-
uses: actions/github-script@v7
24+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
2525
with:
2626
script: |
2727
const response = await github.rest.repos.getCollaboratorPermissionLevel({
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Add waiting-for-response label
3737
if: steps.check-maintainer.outputs.result == 'true'
38-
uses: actions/github-script@v7
38+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
3939
with:
4040
script: |
4141
await github.rest.issues.addLabels({
@@ -53,7 +53,7 @@ jobs:
5353
5454
steps:
5555
- name: Process all open issues
56-
uses: actions/github-script@v7
56+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
5757
with:
5858
script: |
5959
async function isMaintianer(username) {

.github/workflows/pr-description-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Validate PR Description
14-
uses: actions/github-script@v7
14+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
1515
with:
1616
script: |
1717
const prBody = context.payload.pull_request.body || '';

demo/src/screens/componentScreens/FloatingButtonScreen.tsx

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React, {Component} from 'react';
22
import {View, StyleSheet, Alert, ScrollView} from 'react-native';
3-
import {Colors, Text, FloatingButton, FloatingButtonLayouts} from 'react-native-ui-lib';
3+
import {Colors, Text, FloatingButton, FloatingButtonLayouts, Keyboard} from 'react-native-ui-lib';
44
import {renderBooleanOption} from '../ExampleScreenPresenter';
55

66
interface State {
77
showButton: boolean;
88
showPrimary: boolean;
99
showSecondary: boolean;
1010
showVertical: boolean;
11+
withTrackingView: boolean;
1112
}
1213

1314
export default class FloatingButtonScreen extends Component<{}, State> {
@@ -16,7 +17,8 @@ export default class FloatingButtonScreen extends Component<{}, State> {
1617
showPrimary: true,
1718
showSecondary: true,
1819
showVertical: true,
19-
fullWidth: false
20+
fullWidth: false,
21+
withTrackingView: false
2022
};
2123

2224
notNow = () => {
@@ -30,7 +32,8 @@ export default class FloatingButtonScreen extends Component<{}, State> {
3032
};
3133

3234
render() {
33-
const {showSecondary, showVertical} = this.state;
35+
const {showSecondary, showVertical, withTrackingView} = this.state;
36+
const Container = withTrackingView ? Keyboard.KeyboardTrackingView : React.Fragment;
3437
return (
3538
<View style={styles.container}>
3639
<Text text60 center $textDefault marginB-s4>
@@ -41,6 +44,7 @@ export default class FloatingButtonScreen extends Component<{}, State> {
4144
{renderBooleanOption.call(this, 'Show Primary Button', 'showPrimary')}
4245
{renderBooleanOption.call(this, 'Show Secondary Button', 'showSecondary')}
4346
{renderBooleanOption.call(this, 'Button Layout Vertical', 'showVertical')}
47+
{renderBooleanOption.call(this, 'With tracking view', 'withTrackingView')}
4448

4549
<ScrollView showsVerticalScrollIndicator={false}>
4650
<View paddingT-20>
@@ -67,30 +71,32 @@ export default class FloatingButtonScreen extends Component<{}, State> {
6771
</View>
6872
</ScrollView>
6973

70-
<FloatingButton
71-
visible={this.state.showButton}
72-
fullWidth={this.state.fullWidth}
73-
button={
74-
this.state.showPrimary
75-
? {
76-
label: 'Approve',
77-
onPress: this.close
78-
}
79-
: undefined
80-
}
81-
secondaryButton={
82-
showSecondary
83-
? {
84-
label: 'Not now',
85-
onPress: this.notNow
86-
}
87-
: undefined
88-
}
89-
buttonLayout={showVertical ? FloatingButtonLayouts.VERTICAL : FloatingButtonLayouts.HORIZONTAL}
90-
// bottomMargin={80}
91-
// hideBackgroundOverlay
92-
// withoutAnimation
93-
/>
74+
<Container>
75+
<FloatingButton
76+
visible={this.state.showButton}
77+
fullWidth={this.state.fullWidth}
78+
button={
79+
this.state.showPrimary
80+
? {
81+
label: 'Approve',
82+
onPress: this.close
83+
}
84+
: undefined
85+
}
86+
secondaryButton={
87+
showSecondary
88+
? {
89+
label: 'Not now',
90+
onPress: this.notNow
91+
}
92+
: undefined
93+
}
94+
buttonLayout={showVertical ? FloatingButtonLayouts.VERTICAL : FloatingButtonLayouts.HORIZONTAL}
95+
// bottomMargin={80}
96+
// hideBackgroundOverlay
97+
// withoutAnimation
98+
/>
99+
</Container>
94100
</View>
95101
);
96102
}

demo/src/screens/componentScreens/ProgressBarScreen.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import React, {Component} from 'react';
22
import {StyleSheet, ScrollView} from 'react-native';
33
import {View, Text, ProgressBar, Colors, Spacings} from 'react-native-ui-lib';//eslint-disable-line
44

5-
65
export default class ProgressBarScreen extends Component {
7-
86
state = {
97
progresses: [0, 0, 0, 0]
108
};
@@ -53,15 +51,15 @@ export default class ProgressBarScreen extends Component {
5351
</Text>
5452
<ProgressBar
5553
progress={progresses[0]}
56-
style={styles.progressBar}
54+
containerStyle={styles.progressBar}
5755
/>
5856

5957
<Text $textDefault text70 style={styles.text}>
6058
FullWidth
6159
</Text>
6260
<ProgressBar
6361
progress={progresses[1]}
64-
style={styles.fullWidthProgressBar}
62+
containerStyle={styles.fullWidthProgressBar}
6563
fullWidth
6664
/>
6765

@@ -70,7 +68,7 @@ export default class ProgressBarScreen extends Component {
7068
</Text>
7169
<ProgressBar
7270
progress={progresses[2]}
73-
style={[styles.progressBar, styles.styledProgressBar]}
71+
containerStyle={[styles.progressBar, styles.styledProgressBar]}
7472
progressColor={Colors.purple70}
7573
/>
7674

@@ -79,9 +77,18 @@ export default class ProgressBarScreen extends Component {
7977
</Text>
8078
<ProgressBar
8179
progress={progresses[0]}
82-
style={styles.progressBar}
80+
containerStyle={styles.progressBar}
8381
customElement={this.customElement}
8482
/>
83+
84+
<Text $textDefault text70 style={styles.text}>
85+
Custom Style - No Border Radius, 50% progress
86+
</Text>
87+
<ProgressBar
88+
progress={50}
89+
containerStyle={[styles.progressBar, styles.styledProgressBar, {borderRadius: 0}]}
90+
progressStyle={{borderRadius: 0, backgroundColor: Colors.purple70}}
91+
/>
8592
</View>
8693
</ScrollView>
8794
);

packages/react-native-ui-lib/src/components/floatingButton/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ class FloatingButton extends PureComponent<FloatingButtonProps> {
254254

255255
const styles = StyleSheet.create({
256256
container: {
257-
...StyleSheet.absoluteFillObject,
257+
// ...StyleSheet.absoluteFillObject, // TODO: this is breaking scenarios where the FloatingButton is inside a KeyboardTrackingView
258258
top: undefined,
259-
zIndex: Constants.isAndroid ? 99 : undefined
259+
zIndex: 99
260260
},
261261
image: {
262262
...StyleSheet.absoluteFillObject,

packages/react-native-ui-lib/src/components/gridListItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ class GridListItem extends Component<GridListItemProps> {
208208
return (
209209
<Container
210210
style={[styles.container, {alignItems}, {width}, containerStyle]}
211+
accessible={renderCustomItem ? true : undefined}
211212
{...otherContainerProps}
212213
onPress={onPress && this.onItemPress}
213-
accessible={renderCustomItem ? true : undefined}
214214
{...Modifiers.extractAccessibilityProps(this.props)}
215215
>
216216
{imageProps && <Image {...imageProps} style={[itemSize, imageProps?.style]} customOverlayContent={children}/>}

packages/react-native-ui-lib/src/components/progressBar/index.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,17 @@ interface Props {
2727
fullWidth?: boolean;
2828
/**
2929
* Override container style
30+
* @deprecated Use containerStyle instead
3031
*/
3132
style?: StyleProp<ViewStyle>;
33+
/**
34+
* Override container style
35+
*/
36+
containerStyle?: StyleProp<ViewStyle>;
37+
/**
38+
* Override progress style
39+
*/
40+
progressStyle?: StyleProp<ViewStyle>;
3241
/**
3342
* Progress color
3443
*/
@@ -136,23 +145,25 @@ class ProgressBar extends PureComponent<Props, State> {
136145
}
137146

138147
render() {
139-
const {style, testID} = this.props;
148+
const {style, containerStyle, testID, progressStyle} = this.props;
140149
const {containerWidth = 0} = this.state;
141150
const outputRange = Constants.isRTL ? [containerWidth, 0] : [0, containerWidth];
142151
const newProgress = this.progressAnimation.interpolate({
143152
inputRange: [0, 100],
144153
outputRange
145154
});
146155

156+
const animatedStyle = {transform: [{translateX: newProgress}]};
157+
147158
return (
148159
<View
149160
onLayout={this.getContainerWidth}
150-
style={[styles.container, this.getContainerStyle(), style]}
161+
style={[styles.container, this.getContainerStyle(), style, containerStyle]}
151162
{...this.getAccessibilityProps()}
152163
testID={testID}
153164
>
154165
{!!containerWidth && (
155-
<Animated.View style={[styles.progress, this.getProgressStyle(), {transform: [{translateX: newProgress}]}]}>
166+
<Animated.View style={[styles.progress, this.getProgressStyle(), progressStyle, animatedStyle]}>
156167
{this.renderCustomElement()}
157168
</Animated.View>
158169
)}

packages/react-native-ui-lib/src/components/progressBar/progressBar.api.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@
1616
"description": "FullWidth Ui preset"
1717
},
1818
{
19-
"name": "style",
19+
"name": "containerStyle",
2020
"type": "ViewStyle",
2121
"description": "Override container style"
2222
},
23+
{
24+
"name": "progressStyle",
25+
"type": "ViewStyle",
26+
"description": "Override progress style"
27+
},
2328
{
2429
"name": "progressColor",
2530
"type": "string",

0 commit comments

Comments
 (0)