Commit Graph
47 Commits
Author SHA1 Message Date
Keith Solomon 426d60b692 Fix avatar and social icons with bulletproof rendering
Release / Build & publish plugin zip (push) Successful in 7s
Root cause of social icons rendering as alt text: wp_kses() stripped
the 'data:' prefix from data: URIs in img.src, leaving a relative URL
that 404s. Switched to real .svg files under assets/icons/ referenced
via plugins_url() — kses passes img tags with relative URLs cleanly,
and the icons load as standard images.

Root cause of avatar still being cropped: layout-side issues with
inline-styled <img> in a flex layout. Switched to a <span> with
inline background-image, background-size: cover, background-position:
center — no <img> element, no object-fit reliance, no way to crop wrong.

Also removed the outer <a> wrapper around the .project-owner div
(block-level element inside inline <a> is invalid HTML and was likely
contributing to layout weirdness). The owner name is now an explicit
<a> inside its own span.

Reverted kses to the default wp_kses_post() since we're back to
standard HTML elements only — no SVG, no data URIs, no inline styles
that need a custom allowed list.
2026-08-12 17:04:15 -05:00
Keith Solomon 60db82e459 Render social-share icons as <img> SVG data URIs
Release / Build & publish plugin zip (push) Successful in 7s
Inline <svg> elements render with their default width/height in browsers
even when 'style' and width/height attributes are set (a known quirk
in mixed HTML5/SVG content with some CSS specificity scenarios). Switched
to <img src='data:image/svg+xml,...'> instead. This is universally well-
supported, sizes via standard <img> CSS rules (no namespace/parser edge
cases), and the inline 'width=20 height=20 style=width:20px;height:20px'
on <img> reliably applies.

Added 'img' and 'style' to the kses allowed list so wp_kses() preserves
the data: URI src and the inline styles.
2026-08-12 12:08:24 -05:00
Keith Solomon c10866bffd Inline icon SVG dimensions + style + cache-bust plugin version
Release / Build & publish plugin zip (push) Successful in 7s
- Add inline width/height attributes AND style='width:20px;height:20px;
  display:block' to each social-share SVG. Inline styles have higher
  specificity than any CSS rule, so the icons should now size correctly
  regardless of theme CSS or specificity quirks.
- Bump PROJECTS_PORTFOLIO_VERSION to 1.1.9 (and plugin header) so
  WordPress invalidates the cached stylesheet URL.
2026-08-12 11:40:06 -05:00
Keith Solomon c127a1d065 Fix icon and avatar rendering: remove SVG viewport rects + inline avatar styles
Release / Build & publish plugin zip (push) Successful in 6s
- Removed the <rect x='0' y='0' width='24' height='24' fill='none'> viewport
  markers from each social-share SVG. With 'fill=none' the rect was
  still visible if any inherited stroke wasn't suppressed (which turned
  out to be unreliable across themes/CSS specificity).
- Removed redundant width='24' height='24' attributes from each SVG so
  the CSS .project-social-sharing svg { width:20px; height:20px } can
  size them unambiguously.
- Inlined avatar <img> styles (width:50px; height:50px; border-radius:50%;
  object-fit:cover; flex-shrink:0; display:block) so the avatar is
  guaranteed to render as a 50x50 circle regardless of theme CSS.
- Switched .project-owner-avatar to inline-flex so the span shrinks to
  the image's natural size within the flex parent.
2026-08-12 10:44:35 -05:00
Keith Solomon cd5405fe62 Allow SVG through kses in social-share buttons
Release / Build & publish plugin zip (push) Successful in 7s
wp_kses_post() strips <svg> tags by default (the 'post' context doesn't
allow them), so the icons were being silently removed from the rendered
HTML. Extend the allowed list to include svg/path/rect/circle/line with
the attributes the Tabler-style icons actually use.
2026-08-12 09:05:58 -05:00
Keith Solomon 98fd2fba5a Fix View Repo outline, social-share icon stroke, and owner avatar sizing
Release / Build & publish plugin zip (push) Successful in 7s
- .project-github-button renamed to .project-repo-button (added 1px border
  for proper outline style; the old class is gone so the button was rendering
  as unstyled <a>).
- Suppress inherited stroke on the Tabler SVG <rect> viewport marker — without
  this it draws a square outline inside the round social-share button.
- Move owner avatar inline styles into CSS with object-fit: cover, explicit
  width/height, and border-radius: 50%; add flex shrink/grow rules for the
  owner row's three spans so the avatar isn't squashed by the flex layout.
2026-08-12 08:49:56 -05:00
Keith Solomon 5c843dc76f Wire social-share hook + make Follow button provider-aware
Release / Build & publish plugin zip (push) Successful in 7s
The social-share buttons function was hooked to
projects_after_download_button, but the template never fired that action —
the buttons never rendered. Added a do_action() call after the View Repo
button.

The Follow button hardcoded a GitHub URL and used the GitHub-specific
github-button class (which only acts on github.com). Replaced with a
plain styled link pointing at the owner's actual URL (works for any
provider). Removed the assets/js/buttons.js enqueue since nothing uses
the github-button class anymore.

Renamed the project-github-button CSS class on the View Repo link to
project-repo-button since it's provider-neutral now.
2026-08-11 20:18:06 -05:00
Keith Solomon 37832b72da Fix download redirect: use wp_redirect() for external URLs
Release / Build & publish plugin zip (push) Successful in 8s
wp_safe_redirect() rejects external hosts not in WP's allowed list and
silently falls back to admin_url() — which is why /download/{id}/ was
redirecting to /wp-admin/ on a clean install. Switch to wp_redirect()
since the URL is explicitly user-configured.
2026-08-11 19:09:04 -05:00
Keith Solomon aab39f66af Fix Gitea release fetch: /releases/latest returns a single object, not an array
Release / Build & publish plugin zip (push) Successful in 7s
2026-08-11 16:52:27 -05:00
Keith Solomon 365a3898b9 Track PUC's bundled vendor/ in git (formerly ignored)
Release / Build & publish plugin zip (push) Successful in 7s
2026-08-11 16:10:19 -05:00
Keith Solomon 2bbd2dc7c8 Update bundled plugin-update-checker to v5.7 and remove broken setBranch() call
The bundled PUC was missing the setBranch() method on the main UpdateChecker
class (it's only on Vcs\PluginUpdateChecker via the VcsCheckerMethods trait).
When called with a non-VCS URL like the Gitea update URL, this caused a fatal
error at plugin activation.

Updating to PUC v5.7 (May 2026) which is the latest upstream release. The
setBranch() call is removed because PUC doesn't recognize Gitea as a VCS host;
the plugin falls back to PUC's plain JSON metadata mode, which is fine for a
plugin hosted on a self-managed repo.
2026-08-11 16:08:20 -05:00
Keith Solomon 93af230406 Make asset upload resilient (warn on duplicate, don't fail)
Release / Build & publish plugin zip (push) Successful in 6s
2026-08-11 13:48:03 -05:00
Keith Solomon c98e46437e Make release creation idempotent (lookup existing release by tag first)
Release / Build & publish plugin zip (push) Successful in 6s
2026-08-11 13:46:16 -05:00
Keith Solomon 3bae89a203 Extract release JSON building into helper script (avoid YAML/bash heredoc trap)
Release / Build & publish plugin zip (push) Failing after 7s
2026-08-11 13:41:38 -05:00
Keith Solomon 123c0dbb7b Fix bash heredoc-inside-command-substitution by writing to temp file
Release / Build & publish plugin zip (push) Failing after 6s
2026-08-11 13:27:24 -05:00
Keith Solomon 57e1f63bcf Use heredoc for embedded Python (fix IndentationError)
Release / Build & publish plugin zip (push) Failing after 7s
2026-08-11 13:24:44 -05:00
Keith Solomon bea4875b05 Branch release step on host (github.com vs Gitea)
Release / Build & publish plugin zip (push) Failing after 6s
2026-08-11 13:18:49 -05:00
Keith Solomon 343f647770 Call Gitea REST API directly for releases (Gitea Actions compat)
Release / Build & publish plugin zip (push) Successful in 6s
2026-08-11 13:15:31 -05:00
Keith Solomon 7184d998e6 Use gh CLI for release creation (GHES compatibility)
Release / Build & publish plugin zip (push) Failing after 7s
2026-08-11 13:08:40 -05:00
Keith Solomon 189bde2008 Use upload-artifact@v3 for GHES compatibility
Release / Build & publish plugin zip (push) Failing after 35s
2026-08-11 13:05:35 -05:00
Keith Solomon a090527037 Use Python zipfile in build step (zip CLI not on runner)
Release / Build & publish plugin zip (push) Failing after 7s
2026-08-11 13:00:49 -05:00
Keith Solomon 1595327a80 Point old 'How to Zip' section to automated workflow
Release / Build & publish plugin zip (push) Failing after 37s
2026-08-11 07:00:44 -05:00
Keith Solomon b4b6158f2d Fix double-v in artifact name 2026-08-11 07:00:28 -05:00
Keith Solomon 0e56de3c56 Bump version to 1.1.1 for first automated release 2026-08-11 06:52:25 -05:00
Keith Solomon f9b8611519 Document automated release process in README 2026-08-11 06:50:23 -05:00
Keith Solomon 84e5119c41 Add GitHub Actions release workflow 2026-08-11 06:48:35 -05:00
Keith Solomon 67a28e0037 Add release workflow implementation plan
4-task plan: workflow file, README section, version bump to 1.1.1,
final verification. No PHP behavior changes; PHPUnit suite unaffected.
2026-08-11 06:45:10 -05:00
Keith Solomon fb6c9d4d61 Add design spec: GitHub Actions release-zip workflow
Single workflow file at .github/workflows/release.yml that triggers
on v* tag pushes, assembles projects-portfolio-v<version>.zip from
an allowlist of runtime files, uploads as a workflow artifact, and
attaches to a matching GitHub release.
2026-08-11 06:43:47 -05:00
Keith Solomon 0480abe292 fix: clear legacy _projects_portfolio_github_url on provider switch / empty repo URL 2026-08-09 23:49:06 -05:00
Keith Solomon 981c29ab39 Regenerate translation template for Gitea strings 2026-08-09 23:35:45 -05:00
Keith Solomon 5913c8799f Document Gitea support in README 2026-08-09 23:30:53 -05:00
Keith Solomon d250f6b89f Wire provider includes and bump version to 1.1.0 2026-08-09 23:28:47 -05:00
Keith Solomon 62a049b2c2 Route download redirect through provider interface 2026-08-09 23:26:02 -05:00
Keith Solomon e25431a25d Route REST API responses through provider interface 2026-08-09 23:23:57 -05:00
Keith Solomon 9803b497ab Route single-projects template through provider interface 2026-08-09 23:21:06 -05:00
Keith Solomon d8ce719433 Add provider dropdown and per-project Gitea base URL to metabox 2026-08-09 23:17:51 -05:00
Keith Solomon e60a9eafb3 Surface Gitea settings via projects_portfolio_settings() and test 2026-08-09 23:12:37 -05:00
Keith Solomon 925ef184b9 Add Gitea base URL + token fields to settings page 2026-08-09 23:09:50 -05:00
Keith Solomon 40793cd4bb Add provider-aware helpers; mark legacy wrappers deprecated 2026-08-09 23:06:24 -05:00
Keith Solomon e3b27e8974 Add provider factory with meta + option wiring 2026-08-09 23:02:20 -05:00
Keith Solomon 62a20ed514 Add Gitea provider adapter with normalization and tests 2026-08-09 22:56:16 -05:00
Keith Solomon 4a9f43c850 Scaffold provider interface and test bootstrap 2026-08-09 22:35:23 -05:00
Keith Solomon 730893c1f0 Add Gitea support implementation plan
15-task plan with TDD-style steps, WP PHPUnit tests, and a
provider-interface architecture. Tasks cover scaffolding, both
adapters, factory, settings, metabox, template, REST, download
redirect, version bump, README, translations, and final smoke
testing.
2026-08-09 22:29:13 -05:00
Keith Solomon e924b4833a Add design spec: Gitea support for Projects Portfolio
Adds a provider interface with GitHub and Gitea adapters so each
project can link to either provider. Preserves existing GitHub
behavior bit-for-bit, adds lazy migration from legacy meta, and
ships WP PHPUnit tests.
2026-08-09 22:23:27 -05:00
Keith Solomon 915ca4cb5d feature: Rename project and update README; add main plugin file 2026-08-09 21:11:40 -05:00
Keith Solomon 383e2cff65 🔵 other: Fix project URLs 2026-08-09 20:30:50 -05:00
Keith Solomon 360fe48089 feature: Initial commit 2026-08-09 20:27:58 -05:00