Browse Source

bug-fixes

gitcitadel
Silberengel 2 weeks ago
parent
commit
cf8c3e8c2a
  1. 6
      .env.dist
  2. 27
      assets/styles/app.css
  3. 2
      src/Command/PrewarmCommand.php
  4. 6
      src/Service/MagazineContentService.php
  5. 2
      src/Service/NostrClient.php
  6. 66
      templates/partial/author_profile_header.html.twig

6
.env.dist

@ -58,6 +58,8 @@ MYSQL_ROOT_PASSWORD=root_password
###> doctrine/doctrine-bundle ### ###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# `serverVersion` is also set in `config/packages/doctrine.yaml` to avoid DBAL 4 "MySQL earlier than 8" deprecation noise. # serverVersion is NOT in the URL; it is set in config/packages/doctrine.yaml (server_version: '8.0.36').
DATABASE_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@database:3306/${MYSQL_DATABASE}?serverVersion=${MYSQL_VERSION}&charset=${MYSQL_CHARSET}" # Putting it in the URL too causes DBAL 4 to prefer the URL value and re-emit "MySQL < 8" deprecation
# warnings when a two-part string like "8.0" is present. The YAML value is the single source of truth.
DATABASE_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@database:3306/${MYSQL_DATABASE}?charset=${MYSQL_CHARSET}"
###< doctrine/doctrine-bundle ### ###< doctrine/doctrine-bundle ###

27
assets/styles/app.css

@ -1469,12 +1469,39 @@ a.tag:focus-visible {
flex-grow: 0; flex-grow: 0;
} }
/* Payment type groups: one label per type with its addresses stacked in the right column */
.author-profile__payment-group {
display: grid;
grid-template-columns: 7.5rem minmax(0, 1fr);
column-gap: 0.5rem;
align-items: start;
margin: 0.35rem 0;
font-size: 0.9rem;
line-height: 1.35;
}
.author-profile__payment-group:first-child {
margin-top: 0;
}
.author-profile__payment-group-values {
list-style: none;
margin: 0;
padding: 0;
min-width: 0;
}
.author-profile__payment-group-value + .author-profile__payment-group-value {
margin-top: 0.3rem;
}
.author-profile__payment-type { .author-profile__payment-type {
font-size: 0.78rem; font-size: 0.78rem;
font-weight: 600; font-weight: 600;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.04em;
color: var(--color-text-mid); color: var(--color-text-mid);
padding-top: 0.15em;
} }
.author-profile__jumble { .author-profile__jumble {

2
src/Command/PrewarmCommand.php

@ -794,6 +794,8 @@ final class PrewarmCommand extends Command
$coord, $coord,
$titleOut !== '' ? ' -> '.$titleOut : '' $titleOut !== '' ? ' -> '.$titleOut : ''
)); ));
} elseif ($status === 'skipped') {
$io->writeln(sprintf(' · <info>sub-index</info> %s', $coord));
} else { } else {
$reason = (string) $entry['reason']; $reason = (string) $entry['reason'];
$io->writeln(sprintf(' - <comment>MISSING</comment> %s (%s)', $coord, $reason)); $io->writeln(sprintf(' - <comment>MISSING</comment> %s (%s)', $coord, $reason));

6
src/Service/MagazineContentService.php

@ -448,8 +448,10 @@ final class MagazineContentService
} }
$kind = (int) $parts[0]; $kind = (int) $parts[0];
if (!\in_array($kind, KindsEnum::longformKindValues(), true)) { if (!\in_array($kind, KindsEnum::longformKindValues(), true)) {
$entries[] = ['coordinate' => $coordinate, 'status' => 'missing', 'reason' => 'unsupported_kind']; // kind-30040 nested sub-index links are valid in category `a` tags (e.g. Economy → Bitcoin).
$missing++; // They are not longform articles and are not ingested here; report them separately
// so they don't inflate the "missing articles" count.
$entries[] = ['coordinate' => $coordinate, 'status' => 'skipped', 'reason' => 'unsupported_kind'];
continue; continue;
} }

2
src/Service/NostrClient.php

@ -1774,7 +1774,7 @@ class NostrClient
'sample_up_to_25' => $rawSample, 'sample_up_to_25' => $rawSample,
]); ]);
if ($rawCount === 0) { if ($rawCount === 0) {
$this->logger->warning('[longform_ingest] ingestLongform: no EVENT rows returned for this filter (check relay index / author filter / #d list)', [ $this->logger->notice('[longform_ingest] ingestLongform: no EVENT rows returned for this filter — trying fallback queries', [
'group_key' => $gkey, 'group_key' => $gkey,
'authors_filter' => $g['pubkey'], 'authors_filter' => $g['pubkey'],
]); ]);

66
templates/partial/author_profile_header.html.twig

@ -1,4 +1,4 @@
{# Shared author “header” + about (no article list). Expects: author, npub, profile_*; show_nip05: true on full /p/ profile only #} {# Shared author "header" + about (no article list). Expects: author, npub, profile_*; show_nip05: true on full /p/ profile only #}
{% set author_pic = null %} {% set author_pic = null %}
{% if author.picture is defined and author.picture %} {% if author.picture is defined and author.picture %}
{% set author_pic = author.picture %} {% set author_pic = author.picture %}
@ -18,14 +18,16 @@
<div class="author-profile__header-meta"> <div class="author-profile__header-meta">
{% if profile_websites is not empty %} {% if profile_websites is not empty %}
<ul class="author-profile__identity" aria-label="Websites"> <div class="author-profile__section author-profile__section--label-value" aria-label="Websites">
{% for row in profile_websites %} <span class="author-profile__section-type">Website</span>
<li class="author-profile__identity-row author-profile__meta-line"> <ul class="author-profile__value-stack">
<span class="author-profile__identity-type">Website</span> {% for row in profile_websites %}
<a class="author-profile__identity-link author-profile__meta-value" href="{{ row.href|e('html_attr') }}" target="_blank" rel="nofollow noopener noreferrer">{{ row.label|e }}</a> <li class="author-profile__value-stack-line">
</li> <a class="author-profile__identity-link author-profile__meta-value" href="{{ row.href|e('html_attr') }}" target="_blank" rel="nofollow noopener noreferrer">{{ row.label|e }}</a>
{% endfor %} </li>
</ul> {% endfor %}
</ul>
</div>
{% endif %} {% endif %}
{% if show_nip05|default(false) and profile_nip05 is not empty %} {% if show_nip05|default(false) and profile_nip05 is not empty %}
<div class="author-profile__section author-profile__section--label-value" aria-label="NIP-05"> <div class="author-profile__section author-profile__section--label-value" aria-label="NIP-05">
@ -45,26 +47,38 @@
</div> </div>
{% endif %} {% endif %}
{% if profile_payment_links is not empty %} {% if profile_payment_links is not empty %}
{# Group payment rows by display_type_label so each type (Lightning, Monero, …) appears once. #}
{% set payment_groups = {} %}
{% for row in profile_payment_links %}
{% set k = row.display_type_label|default('')|trim %}
{% set payment_groups = payment_groups|merge({(k): (payment_groups[k] is defined ? payment_groups[k] : [])|merge([row])}) %}
{% endfor %}
<div class="author-profile__section author-profile__section--label-value" aria-label="Payment"> <div class="author-profile__section author-profile__section--label-value" aria-label="Payment">
<span class="author-profile__section-type">Payment</span> <span class="author-profile__section-type">Payment</span>
<ul class="author-profile__payments-nested"> <ul class="author-profile__payments-nested">
{% for row in profile_payment_links %} {% for type_key, rows in payment_groups %}
<li class="author-profile__payment author-profile__meta-line"> <li class="author-profile__payment-group">
<span class="author-profile__payment-type"{% if row.display_type_label|default('')|trim == '' %} aria-hidden="true"{% endif %}>{{ row.display_type_label|default('')|e }}</span> <span class="author-profile__payment-type"{% if type_key == '' %} aria-hidden="true"{% endif %}>{{ type_key|e }}</span>
<div <ul class="author-profile__payment-group-values">
class="author-profile__payment-value" {% for row in rows %}
data-controller="copy-text" <li class="author-profile__payment-group-value">
data-copy-text-text-value="{{ row.href|e('html_attr') }}" <div
> class="author-profile__payment-value"
<span class="author-profile__payment-addr author-profile__meta-value" title="{{ row.href|e('html_attr') }}">{{ row.label|e }}</span> data-controller="copy-text"
<button data-copy-text-text-value="{{ row.href|e('html_attr') }}"
type="button" >
class="author-profile__copy-btn btn btn-secondary btn-sm" <span class="author-profile__payment-addr author-profile__meta-value" title="{{ row.href|e('html_attr') }}">{{ row.label|e }}</span>
data-copy-text-target="button" <button
data-action="click->copy-text#copy" type="button"
title="Copy full payment address / URI for your wallet" class="author-profile__copy-btn btn btn-secondary btn-sm"
>Copy</button> data-copy-text-target="button"
</div> data-action="click->copy-text#copy"
title="Copy full payment address / URI for your wallet"
>Copy</button>
</div>
</li>
{% endfor %}
</ul>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

Loading…
Cancel
Save