Skip to content

Commit

Permalink
Merge feature/stats (#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
gikaragia authored Apr 16, 2024
2 parents 0e2c21f + a5c5bbe commit b5cc9aa
Show file tree
Hide file tree
Showing 52 changed files with 4,080 additions and 706 deletions.
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

0 comments on commit b5cc9aa

Please sign in to comment.