fix(integrations): redesign integrations list table - #3184
Closed
faisalahammad wants to merge 1 commit into
Closed
Conversation
Replace the 'Integration ID' column with a 'Description' column that shows a short blurb and a 'Learn More' link, and add a new 'Configured' column to indicate when an integration's required credentials are present. Adds $learn_more_url, $configured_help, and is_configured() to the LLMS_Abstract_Integration class so add-ons and core integrations can declare configuration state. Core bbPress and BuddyPress integrations split their existing inline learn-more link out into $learn_more_url and override is_configured() to return true (no API keys required). Fixes gocodebox#3150
Contributor
|
@faisalahammad Thanks but for this feature request issue, "Installed" is basically already "Configured" for addons, so we don't need or want a new "is_configured" method that would need to be overridden. I'll close this for now as this issue will potentially need some coordination between the add-ons. We also have an internal task to decide the wording for each add-on. As a general note we can't hard-code version numbers, it needs to be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
Integration IDcolumn in the LifterLMS settings Integrations table with aDescriptioncolumn (short blurb +Learn Morelink) and adds a newConfiguredcolumn that indicates when an integration's required credentials are present.Fixes #3150
Changes
includes/abstracts/llms.abstract.integration.phpAdded three new public extension points so add-ons can declare their own configuration state and docs link without changing signatures.
Why: add-ons need a way to tell the table whether keys have been provided, and where to send users for setup docs. Defaults preserve backward compatibility for any existing integration extending the abstract.
includes/integrations/class.llms.integration.bbpress.phpandclass.llms.integration.buddypress.phpSplit the existing inline
Learn MoreHTML out of$descriptioninto$learn_more_url, and added anis_configured()override returningtrue(no API keys required).Why: the previous
$descriptionwas a single HTML blob with the docs link baked in. Splitting it lets the table render the blurb and the link independently and keeps the description clean for the per-integration settings page title.includes/admin/settings/class.llms.settings.integrations.phpReplaced the
Integration ID<th>/<td>with aDescriptioncell and added a newConfiguredcolumn betweenInstalledandEnabled.Before:
After:
The
Configuredcolumn follows the sametip--bottom-right/screen-reader-text/fa fa-check-circlepattern asInstalledandEnabled. Whenis_configured()returns false, the cell shows a dash and uses$configured_helpas the tooltip text (orNot configuredif no help was set).Testing
Test 1: bbPress row
Result: bbPress row shows the short blurb, a
Learn Morelink openinghttps://lifterlms.com/docs/lifterlms-and-bbpress/in a new tab, and checks in bothInstalledandConfiguredcolumns.Test 2: BuddyPress row
Result: BuddyPress row shows its blurb,
Learn Morelink, and bothInstalledandConfiguredchecks.Test 3: Inactive integration
Result: rows render with the
Integration IDcolumn gone,Descriptionpopulated, and theInstalled/Configuredcolumns showing dashes with tooltips.Test 4: Coding standards
vendor/bin/phpcsandvendor/bin/phpcs --error-severity=1 --warning-severity=6both clean on the four modified files.php -lclean on all four.