From b79f4282f487036205e214c490fbe740a9d2defa Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Fri, 19 Jun 2026 15:02:19 -0300 Subject: [PATCH 01/17] refactor: rebrand user-visible strings from Liquid Web to Nexcess (SMTNC-1494) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update all user-facing text, page slugs, and menu labels to Nexcess branding. PHP - Feature_Manager_Page: change PAGE_SLUG to 'nexcess-software-manager' and permanently register 'lw-software-manager' as a hidden alias so bookmarks and Leader mid-session transitions remain functional after the rebrand. Add $page_hook_legacy so assets are enqueued on both slugs (fixes blank page when visiting the legacy URL). - Feature_Manager_Page: update page title to "Nexcess Software Manager" and Settings menu label to "Nexcess Products". - Display_Legacy_License_Page_Notice: update notice body text to "Nexcess's software offerings" / "Nexcess Software Manager". - global-functions.php: update docblock for lw_harbor_display_legacy_license_page_notice(). React - FilterBar: update logo alt text and heading. - WelcomeShell: update brand subtitle. - LicenseSection: update portal link label to "Manage license in Nexcess". - harbor-data-context, use-resolvable-select-with-error: update fallback error messages. - store/actions, store/resolvers: update all error strings to "Nexcess Software Manager failed to…". Docs - Add CONTRIBUTING.md: prerequisites, scripts reference, and a step-by-step local-testing workflow for validating Harbor changes against a partner plugin via Composer path repository without publishing a release. - Link CONTRIBUTING.md from README.md. --- CONTRIBUTING.md | 325 ++++++++++++++++++ README.md | 5 + .../js/components/molecules/FilterBar.tsx | 3 +- .../components/organisms/LicenseSection.tsx | 3 +- .../js/components/templates/WelcomeShell.tsx | 3 +- resources/js/context/harbor-data-context.tsx | 3 +- .../use-resolvable-select-with-error.ts | 4 +- resources/js/store/actions.ts | 27 +- resources/js/store/resolvers.ts | 15 +- .../Display_Legacy_License_Page_Notice.php | 11 +- src/Harbor/Admin/Feature_Manager_Page.php | 53 ++- src/Harbor/global-functions.php | 3 +- 12 files changed, 419 insertions(+), 36 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..7ab10b14 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,325 @@ +# Contributing to Harbor + +## Quick Start + +```bash +# JavaScript dependencies +bun install + +# PHP dependencies — --no-dev is sufficient for building assets and partner plugin testing. +# For running PHP tests or static analysis, see the PHP section below. +composer install --no-dev + +# Build React assets (required before testing in a partner plugin) +npm run build +``` + +All available scripts are listed in the [Scripts reference](#scripts-reference) below. + +--- + +## Prerequisites + +| Tool | Minimum version | Notes | +|---|---|---| +| [Bun](https://bun.sh) | **1.3.x** | Versions before 1.3.x may not install platform-specific native binary packages (e.g. `lightningcss-linux-x64-gnu`) correctly — `npm run build` will fail with a `Cannot find module` error. Confirmed working on 1.3.14. Run `bun --version` and update if needed: `curl -fsSL https://bun.sh/install \| bash` | +| Node.js | 14+ | Managed by `nvm` or included with Bun. `wp-scripts` requires Node 14+ for optional chaining syntax | +| Composer | 2.x | For PHP dependency management | +| PHP | 7.4+ | Required for Composer scripts and static analysis | + +--- + +## Installing Dependencies + +### JavaScript + +```bash +bun install +``` + +> **Bun version requirement:** Some Bun versions before 1.3.x silently skip optional packages +> that declare `os`/`cpu`/`libc` fields (e.g. `lightningcss-linux-x64-gnu`). The build will +> then fail when `postcss-loader` tries to load `lightningcss`. Confirmed working on 1.3.14. +> Update Bun before running `bun install`: `curl -fsSL https://bun.sh/install | bash`. + +### PHP + +Use `--no-dev` when your goal is **building assets or testing Harbor changes in a partner +plugin**. The dev dependency tree includes tools only needed for running the PHP test suite +itself (Codeception, PHPStan, phpcs) — none of which are required for the local partner +plugin workflow. + +```bash +# Building assets or testing via a partner plugin — use this +composer install --no-dev +``` + +Use the full install when you need to **run PHP tests or static analysis** locally: + +```bash +# PHP tests (Codeception/slic) or static analysis — use this +composer install +``` + +> **Known issue with full `composer install`:** The `lucatume/tdd-helpers` repository (a +> transitive dev dependency of `lucatume/wp-browser`) no longer exists on GitHub, causing +> the install to fail. PHP tests are typically run via [`slic`](https://github.com/stellarwp/slic), +> which manages its own container environment and is not affected by this issue. See +> [docs/guides/testing.md](docs/guides/testing.md) for the recommended test workflow. + +--- + +## Scripts Reference + +### JavaScript (`npm run