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. 28
      templates/partial/author_profile_header.html.twig

6
.env.dist

@ -58,6 +58,8 @@ MYSQL_ROOT_PASSWORD=root_password @@ -58,6 +58,8 @@ MYSQL_ROOT_PASSWORD=root_password
###> doctrine/doctrine-bundle ###
# 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.
DATABASE_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@database:3306/${MYSQL_DATABASE}?serverVersion=${MYSQL_VERSION}&charset=${MYSQL_CHARSET}"
# serverVersion is NOT in the URL; it is set in config/packages/doctrine.yaml (server_version: '8.0.36').
# 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 ###

27
assets/styles/app.css

@ -1469,12 +1469,39 @@ a.tag:focus-visible { @@ -1469,12 +1469,39 @@ a.tag:focus-visible {
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 {
font-size: 0.78rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--color-text-mid);
padding-top: 0.15em;
}
.author-profile__jumble {

2
src/Command/PrewarmCommand.php

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

6
src/Service/MagazineContentService.php

@ -448,8 +448,10 @@ final class MagazineContentService @@ -448,8 +448,10 @@ final class MagazineContentService
}
$kind = (int) $parts[0];
if (!\in_array($kind, KindsEnum::longformKindValues(), true)) {
$entries[] = ['coordinate' => $coordinate, 'status' => 'missing', 'reason' => 'unsupported_kind'];
$missing++;
// kind-30040 nested sub-index links are valid in category `a` tags (e.g. Economy → Bitcoin).
// 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;
}

2
src/Service/NostrClient.php

@ -1774,7 +1774,7 @@ class NostrClient @@ -1774,7 +1774,7 @@ class NostrClient
'sample_up_to_25' => $rawSample,
]);
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,
'authors_filter' => $g['pubkey'],
]);

28
templates/partial/author_profile_header.html.twig

@ -1,4 +1,4 @@ @@ -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 %}
{% if author.picture is defined and author.picture %}
{% set author_pic = author.picture %}
@ -18,14 +18,16 @@ @@ -18,14 +18,16 @@
<div class="author-profile__header-meta">
{% 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">
<span class="author-profile__section-type">Website</span>
<ul class="author-profile__value-stack">
{% for row in profile_websites %}
<li class="author-profile__identity-row author-profile__meta-line">
<span class="author-profile__identity-type">Website</span>
<li class="author-profile__value-stack-line">
<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>
{% endfor %}
</ul>
</div>
{% endif %}
{% 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">
@ -45,12 +47,21 @@ @@ -45,12 +47,21 @@
</div>
{% endif %}
{% 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">
<span class="author-profile__section-type">Payment</span>
<ul class="author-profile__payments-nested">
{% for row in profile_payment_links %}
<li class="author-profile__payment author-profile__meta-line">
<span class="author-profile__payment-type"{% if row.display_type_label|default('')|trim == '' %} aria-hidden="true"{% endif %}>{{ row.display_type_label|default('')|e }}</span>
{% for type_key, rows in payment_groups %}
<li class="author-profile__payment-group">
<span class="author-profile__payment-type"{% if type_key == '' %} aria-hidden="true"{% endif %}>{{ type_key|e }}</span>
<ul class="author-profile__payment-group-values">
{% for row in rows %}
<li class="author-profile__payment-group-value">
<div
class="author-profile__payment-value"
data-controller="copy-text"
@ -68,6 +79,9 @@ @@ -68,6 +79,9 @@
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>

Loading…
Cancel
Save