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

[PROD-7479] Upgrade screen template #4426

Merged
merged 82 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
a3e2875
[PROD-7479] Upgrade screen template
annrra Jun 4, 2024
e06c6fc
[PROD-7479] Upgrade platform screen - template updates
annrra Jun 4, 2024
5d3171e
PROD-7479 Remove notices from the buddyboss upgrade screen
bb-yudhisthir Jun 5, 2024
40ca485
PROD-7479 phpcs
bb-yudhisthir Jun 5, 2024
f6f1eb8
PROD-7479 Code refactor
bb-yudhisthir Jun 5, 2024
0dde7dc
PROD-7479 Check if platform pro and theme active
bb-yudhisthir Jun 5, 2024
cccf211
[PROD-7479] Upgrade screen updates for mobile screens
annrra Jun 5, 2024
2fbd33b
[PROD-7479] Add upgrade page sections for different screens - hide su…
annrra Jun 5, 2024
6c41580
[PROD-7479] Add Integration Page
amincdev Jun 5, 2024
751f4d4
[PROD-7479] Show 30 integrations on load
amincdev Jun 5, 2024
c9f8136
[PROD-7479] Fix Integration listing item width
amincdev Jun 5, 2024
cb53329
[PROD-7479] Make integration listing responsive
amincdev Jun 5, 2024
8e7b659
PROD-7479 - make the menu items and pages dynamic
KartikSuthar Jun 6, 2024
57ccb4f
[PROD-7479] Move script into upgrade.js
amincdev Jun 6, 2024
265c949
[PROD-7479] Remove script from settings-page.js
amincdev Jun 6, 2024
5442327
PROD-7479 - call the js into the specific screens
KartikSuthar Jun 6, 2024
a1eba59
PROD-7479 - integrate wp performance tester
KartikSuthar Jun 6, 2024
17a74a0
PROD-7479 - load the class properly and shows the styles
KartikSuthar Jun 6, 2024
986d967
[PROD-7479] Load Integration data from buddyboss
amincdev Jun 6, 2024
206adef
[PROD-7479] Updates in UI for upgrade header layout
annrra Jun 6, 2024
6c1a66c
[PROD-7479] Updates in UI for upgrade performance tester
annrra Jun 6, 2024
13b9fad
[PROD-7479] Fix issues and make categories filter working
amincdev Jun 6, 2024
9193081
[PROD-7479] Header Contact and Upgrade Now button url links
annrra Jun 6, 2024
ba97549
[PROD-7479] Make sure to reset collectionId if it is all
amincdev Jun 6, 2024
886345d
[PROD-7479] Fix stylelint issue - translation strings - add buddyboss…
annrra Jun 6, 2024
4061105
PROD-7479 - refactor performance tester code
KartikSuthar Jun 7, 2024
20715db
[PROD-7479] Increase limit in collections and categories
amincdev Jun 7, 2024
30d2a69
[PROD-7479] Update API domain
amincdev Jun 7, 2024
2aa01ff
[PROD-7479] Show loader while loading integration data
amincdev Jun 7, 2024
431bb75
[PROD-7479] Upgrade submenu - "new" tag
annrra Jun 7, 2024
3e8cceb
[PROD-7479] Update view pricing link and disable already activated bu…
annrra Jun 7, 2024
1505c95
[PROD-7479] Load more integrations
amincdev Jun 7, 2024
688145f
PROD-7479 - tile adjustment
KartikSuthar Jun 7, 2024
e01c8b4
[PROD-7479] Make integration page responsive
amincdev Jun 7, 2024
b95ea79
PROD-7479 - updated data for display
KartikSuthar Jun 7, 2024
a09245a
PROD-7479 - fix the order by issue
KartikSuthar Jun 7, 2024
61ad3a0
PROD-7479 - updated rapyd data
KartikSuthar Jun 7, 2024
5602d34
[PROD-7479] Add Integration title
amincdev Jun 7, 2024
ba03849
[PROD-7479] Update API domain
amincdev Jun 7, 2024
c624843
PROD-7479 - code refactoring
KartikSuthar Jun 7, 2024
3da96a5
[PROD-7479] Add updated tracking links - code recfactor and overall U…
annrra Jun 7, 2024
1424cda
PROD-7479 - update order by field for category
KartikSuthar Jun 10, 2024
ceaa3d7
PROD-7479 - exclude the submit integration
KartikSuthar Jun 10, 2024
1d2c2f0
[PROD-7479] Cache Ajax requests of collections and categories
amincdev Jun 10, 2024
6d247d0
PROD-7479 - code cleanup
KartikSuthar Jun 10, 2024
0217fbb
PROD-7479 - phpcbf fixes and added since
KartikSuthar Jun 10, 2024
d610a39
PROD-7479 - added translation on static strings
KartikSuthar Jun 10, 2024
46c027e
PROD-7479 - phpcbf fixes
KartikSuthar Jun 10, 2024
a5722d6
[PROD-7479] Responsive performance screen - format stylesheets - clea…
annrra Jun 10, 2024
3e28aba
[PROD-7479] Fix integrations categories order
amincdev Jun 10, 2024
4950778
PROD-7479 - phpcbf fixes
KartikSuthar Jun 10, 2024
73d57df
[PROD-7479] Adjust performance results table spacing
annrra Jun 10, 2024
f9d15d3
[PROD-7479] fix the pagination
KartikSuthar Jun 10, 2024
5dab755
PROD-7479 - fix the issue with multiple ajax
KartikSuthar Jun 10, 2024
82d39e1
[PROD-7479] Declare new data keys before using it
amincdev Jun 10, 2024
376759b
[PROD-7479] Show searchQuery in front end input
amincdev Jun 10, 2024
e8e3a11
[PROD-7479] New browser tab for learn more integration links
annrra Jun 10, 2024
ea44753
[PROD-7479] Render filters as soon as it's ready
amincdev Jun 10, 2024
310f012
PROD-7479 - phpcbf fixes
KartikSuthar Jun 10, 2024
979c5f3
[PROD-7479] Add loading screen and clear search query event
amincdev Jun 10, 2024
022cec9
[PROD-7479] Style No results block
amincdev Jun 10, 2024
910ca2f
[PROD-7479] Code cleanup - adjust font size on performance screen
annrra Jun 10, 2024
89e4eef
[PROD-7479] Debounce the search call
amincdev Jun 10, 2024
2530650
[PROD-7479] Show loader while searching
amincdev Jun 10, 2024
f67369a
[PROD-7479] Show loading when filtering
amincdev Jun 10, 2024
55b6489
[PROD-7479] Heading alignment corrections
amincdev Jun 10, 2024
db3a2f3
[PROD-7479] Make sure to run Integration function only on integration…
amincdev Jun 10, 2024
0e3f666
[PROD-7479] Capitalize upgrade features list
annrra Jun 11, 2024
13c136e
[PROD-7479] Vertical align upgrade submenu "new" tag
annrra Jun 11, 2024
5d385f2
PROD-7479 - phpcbf fixes
KartikSuthar Jun 11, 2024
f7303f6
PROD-7479 - added missing alt tag
KartikSuthar Jun 11, 2024
6713b4a
PROD-7479 - grunt
KartikSuthar Jun 11, 2024
64f5faa
[PROD-7479] Keep same browser tab for Upgrade to Platform Pro button
annrra Jun 11, 2024
1646ecf
PROD-7479 - update the order by for collection
KartikSuthar Jun 11, 2024
8c6a49b
PROD-7479 - fixed the dependency
KartikSuthar Jun 11, 2024
a15db41
PROD-7479 - grunt
KartikSuthar Jun 11, 2024
8a113ea
[PROD-7479] Store Integration collections and categories for 7 days
amincdev Jun 11, 2024
c0938a3
[PROD-7479] Update colors for integrations search placeholder and sel…
annrra Jun 11, 2024
1203271
[PROD-7479] PROD--7479 - phpcbf fixes
KartikSuthar Jun 12, 2024
9ef5b84
[PROD-7479] Update UI for select dropdown on integrations filters
annrra Jun 12, 2024
61880e2
[PROD-7479] Revert back UI updates for for select dropdown to keep co…
annrra Jun 12, 2024
b5f2869
Merge branch 'release' into PROD-7479
KartikSuthar Jun 12, 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
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ module.exports = function (grunt) {
'!**/emojionearea-edited.js',
'!**/node_modules/**/*.js',
'!**/endpoints/**/*.js',
'!**/js/lib/Chart.js',
]
)
}
Expand Down Expand Up @@ -466,7 +467,8 @@ module.exports = function (grunt) {
'!**/emojionearea-edited.js',
'!**/vendor/**/*.js',
'!**/node_modules/**/*.js',
'!**/endpoints/**/*.js'
'!**/endpoints/**/*.js',
'!**/js/lib/Chart.js',
].concat( BP_EXCLUDED_MISC )
}
}
Expand Down
140 changes: 138 additions & 2 deletions src/bp-core/admin/bp-core-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,16 +682,21 @@ function bp_core_get_admin_tabs( $active_tab = '' ) {
'class' => 'bp-integrations',
),
'4' => array(
'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bb-upgrade' ), 'admin.php' ) ),
'name' => __( 'Upgrade', 'buddyboss' ),
'class' => 'bb-upgrade',
),
'5' => array(
'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-tools' ), 'admin.php' ) ),
'name' => __( 'Tools', 'buddyboss' ),
'class' => 'bp-tools',
),
'5' => array(
'6' => array(
'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-help' ), 'admin.php' ) ),
'name' => __( 'Help', 'buddyboss' ),
'class' => 'bp-help',
),
'6' => array(
'7' => array(
'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-credits' ), 'admin.php' ) ),
'name' => __( 'Credits', 'buddyboss' ),
'class' => 'bp-credits',
Expand Down Expand Up @@ -3739,3 +3744,134 @@ function bb_cpt_feed_enabled_disabled() {
bp_core_add_page_mappings( $bp->active_components, 'keep', false );
bp_update_option( 'bp-active-components', $bp->active_components );
}


/**
* Register the BuddyBoss Upgrade submenu page.
*
* @since BuddyBoss [BBVERSION]
*
* @param string $active_tab Current tab name.
*
* return array
*/
function bb_core_get_upgrade_settings_admin_tabs( $active_tab = '' ) {

// Tabs for the BuddyBoss > Tools.
$tabs = array(
'0' => array(
'href' => bp_get_admin_url(
add_query_arg(
array(
'page' => 'bb-upgrade',
'tab' => 'bb-upgrade',
),
'admin.php'
)
),
'name' => __( 'BuddyBoss Platform', 'buddyboss' ),
'slug' => 'bb-upgrade',
),
'1' => array(
'href' => bp_get_admin_url(
add_query_arg(
array(
'page' => 'bb-upgrade',
'tab' => 'bb-integrations',
),
'admin.php'
)
),
'name' => __( 'Integrations', 'buddyboss' ),
'slug' => 'bb-integrations',
),
);

/**
* Filters the tab data used in our wp-admin screens.
*
* @since BuddyBoss [BBVERSION]
*
* @param array $tabs Tab data.
*/
return apply_filters( 'bb_core_get_upgrade_admin_tabs', $tabs );
}

/**
* Output the performance tabs in the admin area.
*
* @since BuddyBoss [BBVERSION]
*
* @return void
*/
function bb_core_upgrade_admin_tabs() {

$tabs_html = '';
$idle_class = '';
$active_class = 'current';

// phpcs:ignore
$active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : 'bb-upgrade';

/**
* Filters the admin tabs to be displayed.
*
* @since BuddyPress [BBVERSION]
*
* @param array $value Array of tabs to output to the admin area.
*/
$tabs = apply_filters( 'bb_core_upgrade_admin_tabs', bb_core_get_upgrade_settings_admin_tabs( $active_tab ) );

$count = count( array_values( $tabs ) );
$i = 1;

// Loop through tabs and build navigation.
foreach ( array_values( $tabs ) as $tab_data ) {

$is_current = strtolower( trim( $tab_data['slug'] ) ) === strtolower( trim( $active_tab ) );

if ( 'bb-upgrade' === $tab_data['slug'] && 'bb-performance-tester' === $active_tab ) {
$is_current = true;
}

$tab_class = $is_current ? $active_class : $idle_class;
if ( $i === $count ) {
$tabs_html .= '<li><a href="' . esc_url( $tab_data['href'] ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab_data['name'] ) . '</a></li>';
} else {
$tabs_html .= '<li><a href="' . esc_url( $tab_data['href'] ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab_data['name'] ) . '</a></li>';
}

++$i;
}

echo wp_kses_post( $tabs_html );

/**
* Fires after the output of tabs for the admin area.
*
* @since BuddyPress [BBVERSION]
*/
do_action( 'bb_upgrade_settings_admin_tabs' );
}

/**
* Web performance tester class.
*
* @since BuddyBoss [BBVERSION]
*
* return object
*/
function bb_web_performance_tester() {
if ( ! class_exists( 'BB_Performance_Tester' ) ) {
require_once buddypress()->plugin_dir . 'bp-core/admin/classes/class-bb-performance-tester.php';
}
static $bb_wpt = null;

if ( null !== $bb_wpt ) {
return $bb_wpt;
}

$bb_wpt = new BB_Performance_Tester();

return $bb_wpt;
}
Loading