feat: support custom share URL base for embedded configurator - #174
Conversation
Pulls in codeslash-dev/SLASHED@b6f1f20: the header's button cluster now fits/scrolls on narrow viewports instead of pushing the light/dark toggle off-screen, and the Share button builds a proper config-code link instead of copying the raw page URL. In the plugin specifically, share links now point at the public standalone configurator (configurator_url, already localized as window.slashedApp.pluginSettings) instead of the logged-in wp-admin URL, since overrides here persist via REST rather than the URL hash. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTPpAk2ynC74tuUAsVpYNf
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoSupport configurable share URL base for embedded configurator
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
5 rules 1.
|
Pulls in codeslash-dev/SLASHED@d96eba6: getShareBaseUrl() now validates the host-provided configurator_url (must parse as an absolute http(s) URL) before returning it, so a malformed value can't make "Copy link" silently fail and a non-http(s) scheme can't be copied as a share link. Falls back to the current page URL otherwise. Addresses review feedback on #174. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTPpAk2ynC74tuUAsVpYNf
Summary
Adds support for a configurable share URL base when the configurator is embedded in a host application (e.g., WordPress plugin). This allows embedded instances to generate share links pointing to a public standalone configurator URL instead of the logged-in admin page.
Key changes:
getShareBaseUrl()function to retrieve the configurator URL from plugin settingsoverridesobject toStudioHeaderand use it to build proper share URLs viabuildShareUrl(overrides, getShareBaseUrl())ExportPanelto use the same share URL buildershrink-0utilitiesThe share URL generation now respects the embedded host's public configurator URL when available, falling back to the current page URL in standalone mode.
Type
Checklist
feat:,fix:,docs:, …)npm testpassesnpm run lintpasses (stylelint +php -l)npm run verifypasses (version metadata in sync)dist/,data/inventory.json,data/classes-hints.jsoncome fromupdate-framework/build:data)CHANGELOG.mdupdated under## [Unreleased](for user-facing changes)editor-app/admin-appsource changedNotes
Changes are isolated to plugin-specific files (
admin-app/src/App.svelte,admin-app/src/lib/persistence.ts,admin-app/src/components/panels/ExportPanel.svelte,admin-app/src/components/shell/StudioHeader.svelte,admin-app/src/vite-env.d.ts) and do not affect vendored framework code. The responsive header improvements ensure the UI remains usable on smaller screens when embedded.https://claude.ai/code/session_01QTPpAk2ynC74tuUAsVpYNf