Skip to content

Backmerge Main -> Patch #2904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: patch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/discussion-to-slack.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1 @@
name: Discussion to Slack Notification

on:
discussion:
types: [created]

jobs:
notify-slack:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Get discussion details
id: discussion-details
run: |
echo "title=${{ github.event.discussion.title }}" >> $GITHUB_OUTPUT
echo "body=${{ github.event.discussion.body }}" >> $GITHUB_OUTPUT
echo "url=${{ github.event.discussion.html_url }}" >> $GITHUB_OUTPUT
echo "author=${{ github.event.discussion.user.login }}" >> $GITHUB_OUTPUT
echo "category=${{ github.event.discussion.category.name }}" >> $GITHUB_OUTPUT

- name: Post to Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: |
:speech_balloon: New Discussion Created :speech_balloon:
*Title:* ${{ steps.discussion-details.outputs.title }}
*Author:* ${{ steps.discussion-details.outputs.author }}
*Category:* ${{ steps.discussion-details.outputs.category }}
*Link:* ${{ steps.discussion-details.outputs.url }}

*Discussion Body:*
```
${{ steps.discussion-details.outputs.body }}
```
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
71 changes: 71 additions & 0 deletions .github/workflows/expo-latest-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Expo Latest Nightly

on:
push:
branches: [ feat/v3 ]
pull_request:
branches: [ feat/v3 ]
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
check-expo-version:
runs-on: macos-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
latest_version: ${{ steps.check.outputs.latest_version }}
steps:
- id: check
run: |
LATEST=$(npm view expo version)
CURRENT=$(cat .expo-version 2>/dev/null || echo "")
if [ "$LATEST" != "$CURRENT" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST" >> $GITHUB_OUTPUT
echo $LATEST > .expo-version
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
test-expo-latest:
needs: check-expo-version
if: ${{ needs.check-expo-version.outputs.should_run == 'true' || github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: macos-latest
name: Expo latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Create Expo project
run: |
npx create-expo-app@latest test-app
cd test-app
- name: Install dependencies
working-directory: test-app
run: |
npm install react-native-web react-dom @expo/metro-runtime
- name: Install gluestack-ui
working-directory: test-app
run: |
npx gluestack-ui-nightly init --template-only --projectType expo
npx gluestack-ui-nightly add --all
npx tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css
- name: Start Expo web app
working-directory: test-app
run: |
npm run web & sleep 30
notify:
needs: test-expo-latest
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
runs-on: macos-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: 'Expo Latest Test: ${{ job.status }}'
fields: repo,commit,action,eventName
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
98 changes: 98 additions & 0 deletions .github/workflows/next-latest-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Next.js Latest Nightly

on:
push:
branches: [feat/v3]
pull_request:
branches: [feat/v3]
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
check-next-version:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
latest_version: ${{ steps.check.outputs.latest_version }}
steps:
- id: check
run: |
LATEST=$(npm view next version)
CURRENT=$(cat .next-version 2>/dev/null || echo "")
echo "Latest version: $LATEST"
echo "Current version: $CURRENT"
if [ "$LATEST" != "$CURRENT" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST" >> $GITHUB_OUTPUT
echo $LATEST > .next-version
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi

test-next-latest:
needs: check-next-version
if: ${{ needs.check-next-version.outputs.should_run == 'true' || github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
name: Next.js latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Print Environment Info
run: |
node -v
npm -v
cat .next-version || echo ".next-version file not found"

- name: Set Git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Create Next.js project from create-command
run: |
npx create-gluestack-nightly@latest test-app --starter-kit-next
cd test-app

- name: Build Next.js app
working-directory: test-app
env:
NEXT_TELEMETRY_DISABLED: 1
run: |
npm run build

- name: Start Next.js app
working-directory: test-app
run: |
npm run start &
sleep 20

- name: Fetch and Log Server Response
run: |
curl -s http://localhost:3000 || echo "Failed to reach the server"
curl -s http://localhost:3000 > server_response.html
cat server_response.html

- name: Check if text is rendered
run: |
RESPONSE=$(curl -s http://localhost:3000)
echo "$RESPONSE" | grep -q "Get started by editing" && echo "text found" || (echo "text not found" && exit 1)

notify:
needs: test-next-latest
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: 'Next.js Latest Test: ${{ job.status }}'
fields: repo,commit,action,eventName
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1 change: 1 addition & 0 deletions .github/workflows/vercel-deployments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,6 @@ type IGridItemProps = ViewProps &

const GridItem = forwardRef<React.ComponentRef<typeof View>, IGridItemProps>(
function GridItem({ className, _extra, ...props }, ref) {
const [flexBasisValue, setFlexBasisValue] = useState<
number | string | null
>('auto');

const {
calculatedWidth,
numColumns,
Expand All @@ -269,7 +265,7 @@ const GridItem = forwardRef<React.ComponentRef<typeof View>, IGridItemProps>(
generateResponsiveColSpans({ gridItemClassName: gridItemClass })
) ?? 1) as number;

useEffect(() => {
const flexBasisValue = useMemo(() => {
if (
!flexDirection?.includes('column') &&
calculatedWidth &&
Expand All @@ -291,25 +287,26 @@ const GridItem = forwardRef<React.ComponentRef<typeof View>, IGridItemProps>(
? 2
: rowColsCount - 1);

const flexBasisVal =
return (
Math.min(
(((calculatedWidth - gutterOffset) * responsiveColSpan) /
numColumns /
calculatedWidth) *
100,
100
) + '%';

setFlexBasisValue(flexBasisVal);
100,
100,
) + '%'
);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
return 'auto';
}, [
calculatedWidth,
responsiveColSpan,
numColumns,
columnGap,
gap,
flexDirection,
itemsPerRow,
props?.index,
]);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/nativewind/utils/tva/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TVA } from '../types';
import type { TVConfig } from 'tailwind-variants/dist/config';
import type { TVConfig } from 'tailwind-variants/dist/config.d.ts';
import { deepMergeObjects } from '../utils/deepMerge';
// @ts-ignore
import { tv } from 'tailwind-variants';
Expand Down
Loading