Skip to content
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

Merge feature/stats #2720

Merged
merged 56 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f4e5a67
Create stats initializer class skeleton.
pgk Jan 29, 2024
79e8137
Refactor to using existing trait.
pgk Jan 29, 2024
8b98e3b
Namespace-it
pgk Jan 29, 2024
ef45993
Add activation skeleton method.
pgk Jan 29, 2024
d95908f
Add Stats Schema (#2719)
fjorgemota Jan 30, 2024
db67abf
Adding log_stat method and example use.
pgk Jan 31, 2024
73db35f
Update includes/class-stats.php
pgk Feb 1, 2024
7670ec6
Change log_stat method signature.
pgk Feb 1, 2024
52a1dad
Schema tweaks.
pgk Feb 1, 2024
a2e65b2
Admin Stats Settings
pgk Jan 31, 2024
722f565
Update includes/admin/class-wp-job-manager-settings.php
pgk Feb 1, 2024
539088a
Update includes/admin/class-wp-job-manager-settings.php
pgk Feb 1, 2024
5330cd3
Remove paid listing setting for now.
pgk Feb 1, 2024
26fbdc6
Merge remote-tracking branch 'origin/trunk' into feature/stats
pgk Feb 2, 2024
b33e865
Add way to log unique stats from the frontend.
pgk Feb 2, 2024
c0ea2a9
Rename global eslint hint.
pgk Feb 5, 2024
a8c855c
Added sources of js funcs.
pgk Feb 5, 2024
2d6f3b8
Format js
pgk Feb 5, 2024
06f0277
Update assets/js/wpjm-stats.js
pgk Feb 5, 2024
2c44dae
Update includes/class-stats.php
pgk Feb 5, 2024
2e94e88
Update includes/class-stats.php
pgk Feb 5, 2024
d13e5a7
Use localstorage instead of cookies for uniques.
pgk Feb 5, 2024
ab7a675
Make this a bit more how it would look eventually.
pgk Feb 5, 2024
9d6f161
Update assets/js/wpjm-stats.js
pgk Feb 5, 2024
5de6914
self care.
pgk Feb 5, 2024
4fc9ede
Add wp-dom-ready.
pgk Feb 5, 2024
ce25e6c
Update syntax
yscik Feb 6, 2024
89b01f5
Add job listing stats queries and views column (#2750)
yscik Feb 8, 2024
0869217
Update job dashboard template (#2754)
yscik Feb 14, 2024
3bf968f
Refactor shortcode class (#2759)
yscik Feb 14, 2024
d74d5ec
Add search to job dashboard (#2760)
yscik Feb 14, 2024
109e94a
Update `feature/stats` branch (#2764)
yscik Feb 19, 2024
adcf36b
Add job listing apply clicked unique stat.
pgk Feb 15, 2024
611cf06
Update `feature/stats` branch with latest updates from trunk (#2772)
fjorgemota Feb 20, 2024
873d00e
Merge remote-tracking branch 'origin/trunk' into feature/stats
pgk Feb 22, 2024
afef27a
Add Job Overlay (#2762)
yscik Feb 23, 2024
8533d14
Add company column to dashboard when user has multiple companies (#2769)
yscik Feb 23, 2024
5803e83
Introduce stat for jobs impressions. (#2771)
pgk Feb 28, 2024
e4c23ac
Add stats section to job overlay (#2776)
yscik Mar 13, 2024
5062080
Optimize stats, clean up code, respect settings (#2785)
yscik Mar 13, 2024
9c7280c
Add stats batch logging, unit tests, small tweaks (#2787)
yscik Mar 20, 2024
7bde586
Merge branch 'trunk' into merge/trunk-to-stats
yscik Mar 20, 2024
658e0bd
Merge fixes
yscik Mar 20, 2024
2d9b06f
Revert "Add wp cli stubs"
yscik Mar 20, 2024
6446d4a
Fix psalm issues
yscik Mar 20, 2024
0c094e6
Uncomment
yscik Mar 20, 2024
0dffbb5
Merge `trunk` to `feature/stats` (#2794)
yscik Mar 20, 2024
efb0b7f
Fix stat display date (#2792)
mikeyarce Mar 20, 2024
85ef64e
Add usage tracking for settings data
yscik Mar 28, 2024
2d6906d
Remove deprecated mark from active function
yscik Mar 28, 2024
b20578a
Update psalm-baseline.xml
yscik Mar 28, 2024
20d4d78
Fix data types
yscik Apr 4, 2024
c53f63e
Add usage tracking for settings (#2799)
yscik Apr 5, 2024
4175f4f
Add primary action to job dashboard and overlay (#2800)
yscik Apr 15, 2024
452dc2f
Add job overlay to admin (#2804)
yscik Apr 15, 2024
a5c5bbe
Merge branch 'trunk' into feature/stats
gikaragia Apr 16, 2024
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
6 changes: 4 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ jobs:
php: [ '7.4', '8.0', '8.1' ]
include:
- php: '7.4'
wp: '6.0'
wp: '6.2'
- php: '7.4'
wp: '6.1'
wp: '6.3'
- php: '7.4'
wp: '6.4'
env:
WP_VERSION: ${{ matrix.wp }}
PHP_VERSION: ${{ matrix.php }}
Expand Down
32 changes: 3 additions & 29 deletions .psalm/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@
<code>COOKIE_DOMAIN</code>
</UndefinedConstant>
</file>
<file src="includes/admin/class-notices-conditions-checker.php">
<MissingFile>
<code><![CDATA[require_once ABSPATH . 'wp-admin/includes/plugin.php']]></code>
</MissingFile>
</file>
<file src="includes/admin/class-wp-job-manager-admin-notices.php">
<InternalClass>
<code>new Notices_Conditions_Checker()</code>
Expand All @@ -79,9 +74,6 @@
<code>WP_Job_manager</code>
<code>WP_Job_manager</code>
</InvalidClass>
<ParadoxicalCondition>
<code><![CDATA[! defined( 'ABSPATH' )]]></code>
</ParadoxicalCondition>
</file>
<file src="includes/admin/class-wp-job-manager-cpt.php">
<InvalidArgument>
Expand Down Expand Up @@ -115,6 +107,9 @@
<NullArgument>
<code>null</code>
</NullArgument>
<ParadoxicalCondition>
<code><![CDATA[! defined( 'ABSPATH' )]]></code>
</ParadoxicalCondition>
<UndefinedDocblockClass>
<code>stirng|int</code>
</UndefinedDocblockClass>
Expand Down Expand Up @@ -221,7 +216,6 @@
<file src="includes/class-wp-job-manager-post-types.php">
<InvalidArgument>
<code>$job_data</code>
<code>$pending_jobs</code>
<code><![CDATA[[
apply_filters(
'register_post_type_job_guest_user',
Expand Down Expand Up @@ -265,12 +259,6 @@
<InvalidArgument>
<code><![CDATA[array_values( get_job_listing_types( 'id=>slug' ) )]]></code>
</InvalidArgument>
<ParadoxicalCondition>
<code><![CDATA[! defined( 'ABSPATH' )]]></code>
</ParadoxicalCondition>
<RedundantPropertyInitializationCheck>
<code><![CDATA[isset( $this->job_dashboard_job_ids )]]></code>
</RedundantPropertyInitializationCheck>
<UndefinedPropertyFetch>
<code><![CDATA[$term->term_id]]></code>
</UndefinedPropertyFetch>
Expand Down Expand Up @@ -342,10 +330,6 @@
<InvalidScalarArgument>
<code><![CDATA[$this->job_id]]></code>
</InvalidScalarArgument>
<MissingFile>
<code><![CDATA[include_once ABSPATH . 'wp-admin/includes/image.php']]></code>
<code><![CDATA[include_once ABSPATH . 'wp-admin/includes/media.php']]></code>
</MissingFile>
<TypeDoesNotContainType>
<code>! is_string( $attachment_url )</code>
<code>empty( $attachment_url ) || ! is_string( $attachment_url )</code>
Expand Down Expand Up @@ -393,9 +377,6 @@
<InvalidArgument>
<code><![CDATA[$this->get_plugin_versions()]]></code>
</InvalidArgument>
<MissingFile>
<code><![CDATA[require_once ABSPATH . 'wp-admin/includes/plugin.php']]></code>
</MissingFile>
<UndefinedVariable>
<code>$item</code>
<code>$plugin_data</code>
Expand Down Expand Up @@ -452,9 +433,6 @@
<InvalidReturnType>
<code>null|WP_Error</code>
</InvalidReturnType>
<MissingFile>
<code><![CDATA[include_once ABSPATH . 'wp-admin/includes/plugin.php']]></code>
</MissingFile>
</file>
<file src="lib/usage-tracking/tests/support/class-usage-tracking-test-subclass.php">
<TypeDoesNotContainType>
Expand Down Expand Up @@ -498,10 +476,6 @@
<code>array</code>
<code>bool</code>
</InvalidReturnType>
<MissingFile>
<code><![CDATA[include_once ABSPATH . 'wp-admin/includes/file.php']]></code>
<code><![CDATA[include_once ABSPATH . 'wp-admin/includes/media.php']]></code>
</MissingFile>
<NullableReturnStatement>
<code><![CDATA[$return_datetime ? null : '']]></code>
</NullableReturnStatement>
Expand Down
1 change: 0 additions & 1 deletion .psalm/psalm-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../vendor/php-stubs/wordpress-stubs/wordpress-stubs.php';
require_once __DIR__ . '/../vendor/php-stubs/wordpress-cli-stubs/wordpress-cli-stubs.php';
6 changes: 6 additions & 0 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ a.wpjm-activate-license-link:active {
}
}

.column-stats {
a {
display: block;
}
}

/** Promote Job Modal **/
.promote-buttons-group {
.button {
Expand Down
152 changes: 152 additions & 0 deletions assets/css/job-dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@

@import 'mixins';
@import 'job-overlay';

.jm-dashboard {
container-type: inline-size;

--jm-dashboard-company-logo-size: calc(var(--jm-ui-icon-size) + 2 * var(--jm-ui-space-xs));
}

.jm-dashboard-job, .jm-dashboard-header {
display: flex;
align-items: center;
padding: var(--jm-ui-space-sm);
gap: var(--jm-ui-space-sm);
margin: var(--jm-ui-space-sm) 0;
font-size: var(--jm-ui-font-size-m);
}

.jm-dashboard-header {
color: fadeCurrentColor(85%);
margin-bottom: unset;
padding-bottom: unset;
}

.jm-dashboard__intro {
display: flex;
justify-content: space-between;
align-items: baseline;
flex-wrap: wrap;
gap: var(--jm-ui-space-sm);
}

.jm-dashboard__filters {
font-size: var(--jm-ui-button-font-size);
}

.jm-dashboard-job {
border: var(--jm-ui-border-size) solid var(--jm-ui-border-light);
}

.jm-dashboard-job-column {
flex: 1 1 calc(50% - var(--jm-ui-space-sm));
min-width: 0;
}

.jm-dashboard small {
font-size: var(--jm-ui-font-size-s);
}

.jm-dashboard .job_title {
flex: 1 1 200%;
}

.jm-dashboard-job-column.company {

flex: 0 0 var(--jm-dashboard-company-logo-size);
.jm-dashboard-header & {
visibility: hidden;
}
}

.jm-dashboard .job-status {
text-transform: uppercase;
font-weight: 500;
font-size: var(--jm-ui-font-size-s);
line-height: var(--jm-ui-icon-size-s);
color: fadeCurrentColor( 70% );
margin: var(--jm-ui-space-xxs) 0;

.jm-ui-row {
gap: var(--jm-ui-space-xxxs);
}

.jm-separator {
color: fadeCurrentColor( 20% );
}

.jm-ui-icon {
width: var(--jm-ui-icon-size-s);
height: var(--jm-ui-icon-size-s);
}

.job-status-rejected {
color: var(--jm-ui-error-color);
}
}

.jm-dashboard img.company_logo {
width: var(--jm-dashboard-company-logo-size);
height: var(--jm-dashboard-company-logo-size);
object-fit: contain;
}


.jm-dashboard-job-column.actions {
flex: 0.5 1 100%;
text-align: right;
display: flex;
justify-content: flex-end;
align-items: center;
gap: var(--jm-ui-space-m);
}

.jm-dashboard-job-column a.job-title {
font-weight: 600;
font-size: var(--jm-ui-font-size);
line-height: 1.2;
text-decoration: unset;
}

.jm-dashboard-job-column a.job-title:hover {
text-decoration: underline;
}

.jm-dashboard-action {
display: block;
text-decoration: none;
}
.jm-dashboard-action--primary {
flex-basis: fit-content;
white-space: nowrap;
}

.jm-dashboard-action:where(:not(:hover):not(:focus)) {
color: inherit;
}

.job-dashboard-action-delete {
color: var(--jm-ui-danger-color);
}

@container (width < 540px)
{
.jm-dashboard-job {
flex-wrap: wrap;
align-items: flex-start;
}

.jm-dashboard-header {
display: none;
}

.jm-dashboard-job-column.actions {
justify-content: space-between;
}

.jm-dashboard-job-column.company ~ .jm-dashboard-job-column.job_title {
flex-basis: calc( 100% - var(--jm-dashboard-company-logo-size) - var(--jm-ui-space-sm) );
order: -1;
}
}
Loading
Loading