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

Use only one site-health-info panel to list BP Settings & Constants #245

Closed
wants to merge 2 commits into from

Conversation

imath
Copy link
Member

@imath imath commented Mar 2, 2024

Use only one site-health-info panel to list BP Settings & Constants

site-health-info-bp

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9101


This Pull Request is for code review only. Please keep all other discussion in the BuddyPress Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the WordPress Core Handbook for more details.

@@ -1140,6 +1146,20 @@ function bp_core_admin_debug_information_add_help_tab() {
if ( document.readyState === "complete" ) {
bpHelpSidebarLinks = document.querySelector( \'.bp-help-sidebar-links\' ).closest( \'p\')
bpHelpSidebarLinks.style.display = \'none\';

document.querySelectorAll( \'#health-check-accordion-block-buddypress tr > td\' ).forEach( function( td, i ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice hack! I initially looked for a way to do this without using js and could not find it.

src/bp-core/admin/bp-core-admin-tools.php Show resolved Hide resolved
'value' => defined( 'BP_SEARCH_SLUG' ) ? BP_SEARCH_SLUG : __( 'Undefined', 'buddypress' ),
'debug' => defined( 'BP_SEARCH_SLUG' ) ? BP_SEARCH_SLUG : 'undefined',
),
$bp_settings,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this change, but I noticed some values are really weird when copying the values.

CleanShot 2024-03-02 at 10 04 15@2x

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember very well, but I might have added these exclamation marks because of the way these options are formulated / handled inside BuddyPress. Without the exclamation mark for example: bp-disable-avatar-uploads: Yes would mean avatar uploads are disabled but I don't think it's the case. I'll look at i more closely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we save the "Yes" string in the database? If not, we should add the actual value for the copied version.

These fields are just used to separate Settings and Constants into the BuddyPress site-heath-info panel.
@emaralive
Copy link

OK, I took a look and if one were to do a copy and paste into a text file the results for 2 panels makes more sense and aesthetically more pleasing (clear distinction as to the identification of BP constants). See the below between Single Panel vs Double Panel:

Single Panel

### buddypress ###

version: 14.0.0-alpha
active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
url_parser: BP Rewrites API
global_community_visibility: anyone
template_pack: BuddyPress Nouveau 14.0.0-alpha
! hide-loggedout-adminbar: Yes
! bp-disable-account-deletion: Yes
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: Yes
bp-enable-membership-requests: No
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: Yes
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-blogforum-comments: Yes
_bp_enable_heartbeat_refresh: Yes
BP_VERSION: 14.0.0-alpha
BP_DB_VERSION: 13422
BP_REQUIRED_PHP_VERSION: 5.6.0
BP_PLUGIN_DIR: /path/to/buddypress/plugin/directory/
BP_PLUGIN_URL: site.url/wp-content/plugins/buddypress/
BP_IGNORE_DEPRECATED: undefined
BP_LOAD_DEPRECATED: undefined
BP_ROOT_BLOG: 1
BP_ENABLE_MULTIBLOG: undefined
BP_ENABLE_ROOT_PROFILES: undefined
BP_DEFAULT_COMPONENT: undefined
BP_XPROFILE_BASE_GROUP_NAME: mystery
BP_XPROFILE_FULLNAME_FIELD_NAME: Display Name
BP_MESSAGES_AUTOCOMPLETE_ALL: Disabled
BP_DISABLE_AUTO_GROUP_JOIN: undefined
BP_GROUPS_DEFAULT_EXTENSION: undefined
BP_SIGNUPS_SKIP_USER_CREATION: undefined
BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH: undefined
BP_EMBED_DISABLE_PRIVATE_MESSAGES: undefined
BP_EMBED_DISABLE_ACTIVITY_REPLIES: undefined
BP_ENABLE_USERNAME_COMPATIBILITY_MODE: undefined
BP_AVATAR_DEFAULT_THUMB: undefined
BP_AVATAR_DEFAULT: undefined
BP_AVATAR_URL: site.url/wp-content/uploads
BP_AVATAR_UPLOAD_PATH: /path/to/wp-content/uploads
BP_SHOW_AVATARS: 1
BP_AVATAR_ORIGINAL_MAX_FILESIZE: 5120000
BP_AVATAR_ORIGINAL_MAX_WIDTH: 450
BP_AVATAR_FULL_HEIGHT: 150
BP_AVATAR_FULL_WIDTH: 150
BP_AVATAR_THUMB_HEIGHT: 50
BP_AVATAR_THUMB_WIDTH: 50
BP_USE_WP_ADMIN_BAR: undefined
BP_FRIENDS_DB_VERSION: undefined
BP_FORUMS_PARENT_FORUM_ID: 1
BP_MEMBERS_SLUG: undefined
BP_GROUPS_SLUG: undefined
BP_MESSAGES_SLUG: undefined
BP_NOTIFICATIONS_SLUG: undefined
BP_BLOGS_SLUG: undefined
BP_FRIENDS_SLUG: undefined
BP_ACTIVITY_SLUG: undefined
BP_SETTINGS_SLUG: undefined
BP_XPROFILE_SLUG: undefined
BP_FORUMS_SLUG: forums
BP_SEARCH_SLUG: search

Double Panel

### buddypress ###

version: 14.0.0-alpha
active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
url_parser: BP Rewrites API
global_community_visibility: anyone
template_pack: BuddyPress Nouveau 14.0.0-alpha
! hide-loggedout-adminbar: Yes
! bp-disable-account-deletion: Yes
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: Yes
bp-enable-membership-requests: No
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: Yes
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-blogforum-comments: Yes
_bp_enable_heartbeat_refresh: Yes

### buddypress-constants ###

BP_VERSION: 14.0.0-alpha
BP_DB_VERSION: 13422
BP_REQUIRED_PHP_VERSION: 5.6.0
BP_PLUGIN_DIR: /path/to/buddypress/plugin/directory/
BP_PLUGIN_URL: site.url/wp-content/plugins/buddypress/
BP_IGNORE_DEPRECATED: undefined
BP_LOAD_DEPRECATED: undefined
BP_ROOT_BLOG: 1
BP_ENABLE_MULTIBLOG: undefined
BP_ENABLE_ROOT_PROFILES: undefined
BP_DEFAULT_COMPONENT: undefined
BP_XPROFILE_BASE_GROUP_NAME: mystery
BP_XPROFILE_FULLNAME_FIELD_NAME: Display Name
BP_MESSAGES_AUTOCOMPLETE_ALL: Disabled
BP_DISABLE_AUTO_GROUP_JOIN: undefined
BP_GROUPS_DEFAULT_EXTENSION: undefined
BP_SIGNUPS_SKIP_USER_CREATION: undefined
BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH: undefined
BP_EMBED_DISABLE_PRIVATE_MESSAGES: undefined
BP_EMBED_DISABLE_ACTIVITY_REPLIES: undefined
BP_ENABLE_USERNAME_COMPATIBILITY_MODE: undefined
BP_AVATAR_DEFAULT_THUMB: undefined
BP_AVATAR_DEFAULT: undefined
BP_AVATAR_URL: site.url/wp-content/uploads
BP_AVATAR_UPLOAD_PATH: /path/to/wp-content/uploads
BP_SHOW_AVATARS: 1
BP_AVATAR_ORIGINAL_MAX_FILESIZE: 5120000
BP_AVATAR_ORIGINAL_MAX_WIDTH: 450
BP_AVATAR_FULL_HEIGHT: 150
BP_AVATAR_FULL_WIDTH: 150
BP_AVATAR_THUMB_HEIGHT: 50
BP_AVATAR_THUMB_WIDTH: 50
BP_USE_WP_ADMIN_BAR: undefined
BP_FRIENDS_DB_VERSION: undefined
BP_FORUMS_PARENT_FORUM_ID: 1
BP_MEMBERS_SLUG: undefined
BP_GROUPS_SLUG: undefined
BP_MESSAGES_SLUG: undefined
BP_NOTIFICATIONS_SLUG: undefined
BP_BLOGS_SLUG: undefined
BP_FRIENDS_SLUG: undefined
BP_ACTIVITY_SLUG: undefined
BP_SETTINGS_SLUG: undefined
BP_XPROFILE_SLUG: undefined
BP_FORUMS_SLUG: forums
BP_SEARCH_SLUG: search

@imath
Copy link
Member Author

imath commented Mar 10, 2024

Thanks for your feedback @emaralive. Let's leave it the way it is then 👍. We'll see with user feedbacks if I was worrying for nothing 😉.

@imath imath closed this Mar 10, 2024
@imath imath deleted the patch/9101 branch March 10, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants