Skip to content

Commit

Permalink
Merge branch 'main' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed Oct 15, 2024
2 parents 44f88b4 + 94fed65 commit c696b48
Show file tree
Hide file tree
Showing 28 changed files with 374 additions and 1,390 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/laravel-pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run Laravel Pint

on: [push]

jobs:
php-code-styling:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.4

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
23 changes: 0 additions & 23 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

96 changes: 49 additions & 47 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
name: run-tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 7.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3.5.3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
# name: run-tests

# on:
# push:
# branches: [main]
# pull_request:
# branches: [main]

# jobs:
# test:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: true
# matrix:
# os: [ubuntu-latest, windows-latest]
# php: [8.3]
# laravel: [10.*, 11.*]
# stability: [prefer-lowest, prefer-stable]
# include:
# - laravel: 10.*
# testbench: 8.*
# - laravel: 11.*
# testbench: 9.*

# name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

# steps:
# - name: Checkout code
# uses: actions/checkout@v4.2.1

# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php }}
# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
# coverage: none

# - name: Setup problem matchers
# run: |
# echo "::add-matcher::${{ runner.tool_cache }}/php.json"
# echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

# - name: Install dependencies
# run: |
# composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
# composer update --${{ matrix.stability }} --prefer-dist --no-interaction

# - name: Execute tests
# run: vendor/bin/pest
4 changes: 2 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.2.1
with:
ref: main

Expand All @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
Expand Down
2 changes: 1 addition & 1 deletion .phpactor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "/Users/rafay/.local/share/nvim/mason/packages/phpactor/phpactor.schema.json",
"language_server_phpstan.enabled": false
}
}
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,45 @@

All notable changes to `filament-google-analytics` will be documented in this file.

## 2.0.2 - 2024-10-15

### What's Changed

* Updates

- Fixed `PageViews` result data for `today|yesterday`
- Fixed `MostVisitedPages` and `TopReferrers` overflow issue
- Replaced `gmp` extension usage with custom function

* explicit float to int conversion by @kylekanderson in https://github.com/bezhanSalleh/filament-google-analytics/pull/44

* chore: turkish translation by @mrfade in https://github.com/bezhanSalleh/filament-google-analytics/pull/47

* Update doc removing replacing ActiveUsersFourteenDayWidget by ActiveUsersTwentyEightDayWidget by @django23 in https://github.com/bezhanSalleh/filament-google-analytics/pull/50

* Add French Translations for Dashboard Widgets by @diego-at in https://github.com/bezhanSalleh/filament-google-analytics/pull/60

* Spanish transaltion by @marzioperez in https://github.com/bezhanSalleh/filament-google-analytics/pull/61

* Chore/french translation by @Thomas-DL in https://github.com/bezhanSalleh/filament-google-analytics/pull/69

* Added Spanish Translations by @edeoliv in https://github.com/bezhanSalleh/filament-google-analytics/pull/70

* Bump dependabot/fetch-metadata from 1.6.0 to 2.2.0 by @dependabot in https://github.com/bezhanSalleh/filament-google-analytics/pull/73


### New Contributors

* @kylekanderson made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/44
* @mrfade made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/47
* @django23 made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/50
* @diego-at made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/60
* @marzioperez made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/61
* @Thomas-DL made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/69
* @edeoliv made their first contribution in https://github.com/bezhanSalleh/filament-google-analytics/pull/70

**Full Changelog**: https://github.com/bezhanSalleh/filament-google-analytics/compare/2.0.0...2.0.2

## 2.0.1 - 2023-08-01

**What's new in 2.0.1?**
Expand Down
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ php artisan vendor:publish --tag=filament-google-analytics-config
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\VisitorsWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\ActiveUsersOneDayWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\ActiveUsersSevenDayWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\ActiveUsersFourteenDayWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\ActiveUsersTwentyEightDayWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\SessionsWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\SessionsDurationWidget::class,
\BezhanSalleh\FilamentGoogleAnalytics\Widgets\SessionsByCountryWidget::class,
Expand Down Expand Up @@ -110,7 +110,6 @@ class MyCustomDashboardPage extends Page
Widgets\VisitorsWidget::class,
Widgets\ActiveUsersOneDayWidget::class,
Widgets\ActiveUsersSevenDayWidget::class,
Widgets\ActiveUsersFourteenDayWidget::class,
Widgets\ActiveUsersTwentyEightDayWidget::class,
Widgets\SessionsWidget::class,
Widgets\SessionsDurationWidget::class,
Expand All @@ -122,23 +121,12 @@ class MyCustomDashboardPage extends Page
}
}
```
> [!NOTE]
> In order to enable the widgets for the default filament dashboard, you need to set the `filament_dashboard` option to `true` in the config file `filament-google-analytics.php` for each widget you want to enable.
# Features
#### View the Visitors and Pageview Metrics
<img width="756" alt="Screen Shot 2022-02-26 at 12 35 41 PM" src="https://user-images.githubusercontent.com/10007504/155835519-d1fbb973-110d-4341-af50-8f5abea5f2f4.png">

#### View the Active Users Metrics
<img width="773" alt="Screen Shot 2022-02-26 at 12 48 57 PM" src="https://user-images.githubusercontent.com/10007504/155835949-beb4de3f-4d93-4f92-88fa-dd1678b907c8.png">


#### View the Sessions and Avg. Session Duration Metrics
<img width="756" alt="Screen Shot 2022-02-26 at 12 37 42 PM" src="https://user-images.githubusercontent.com/10007504/155835567-d88b644e-8f73-4c9d-b513-2abf2e704a16.png">

#### View the Devices and Country Metrics by Session (WIP)
<img width="850" alt="Screen Shot 2022-02-26 at 12 44 00 PM" src="https://user-images.githubusercontent.com/10007504/155835896-e20c4f8b-1cb1-4c5c-bb41-344025fbbf7a.png">

#### View the lists of Most Visited Pages and Referrers
<img width="902" alt="Screen Shot 2022-02-26 at 12 44 34 PM" src="https://user-images.githubusercontent.com/10007504/155835898-debb3935-81d4-4963-9b02-9734230be387.png">
# Demo
Widgets rendered in a dedicated dashboard (or any other page you create)
![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-google-analytics/master/bin/v2-art.png?raw=true "Simple Demo")

# Changelog

Expand Down
13 changes: 6 additions & 7 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ const defaultOptions = {
build.onStart(() => {
console.log(
`Build started at ${new Date(
Date.now()
Date.now(),
).toLocaleTimeString()}: ${
build.initialOptions.outfile
}`
}`,
);
});

build.onEnd((result) => {
if (result.errors.length > 0) {
console.log(
`Build failed at ${new Date(
Date.now()
Date.now(),
).toLocaleTimeString()}: ${
build.initialOptions.outfile
}`,
result.errors
result.errors,
);
} else {
console.log(
`Build finished at ${new Date(
Date.now()
Date.now(),
).toLocaleTimeString()}: ${
build.initialOptions.outfile
}`
}`,
);
}
});
Expand All @@ -69,4 +69,3 @@ compile({
entryPoints: ["./resources/js/fgaChart.js"],
outfile: "./resources/dist/fgaChart.js",
});

Binary file added bin/v2-art.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@
"php": "^8.1",
"filament/widgets": "^3.0",
"spatie/laravel-analytics": "^5.0",
"spatie/laravel-package-tools": "^1.9.2"
"spatie/laravel-package-tools": "^1.9"
},
"require-dev": {
"laravel/pint": "^1.2",
"nunomaduro/collision": "^7.0",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.10",
"pestphp/pest-plugin-laravel": "^1.1",
"phpstan/extension-installer": "^1.3",
"phpunit/phpunit": "^10.1"
"phpunit/phpunit": "^10.1",
"spatie/ray": "^1.40"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -69,6 +68,6 @@
}
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c696b48

Please sign in to comment.