Commit graph

7,304 commits

Author SHA1 Message Date
Oneric
a9d33a4904 user_card: improve banner styling
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
No longer will long bios end up zooming in
on just a tiny fraction of the banner.
Instead always fit it to the width and let the height adapt as needed.

This however means we can no longer rely on the image filling the
entire height, therefore gradient and masking logic for smooth
transitions had to be reworked as well.
2026-05-15 00:00:00 +00:00
2fb78f8727 Merge pull request 'rich_content: add padding on codeblock' (#515) from Yonle/akkoma-fe:codeblockimprv-1 into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #515
2026-05-06 15:08:13 +00:00
07e72ff915 rich_content: add padding to codeblocks
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_metadata/woodpecker Pipeline is pending approval
ci/woodpecker/pull_request_closed/woodpecker Pipeline is pending approval
Else code text is adjoined to the vertical codebock border.

Also use explcitit "scroll" for odd browsers completely hiding the
scrollbar otherwise. One could argue "auto" still being more correct
since this matches what is evidently the desired and preferd styling
by those browser vendors. But on the other hand user confusion from
this questionable styling decision seems more problematic and already
occurred.
2026-05-06 00:00:00 +00:00
4a33df4874 update changelog
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
v3.19.0
2026-05-04 20:09:40 +01:00
Oneric
3474a4e2b9 status: fix line wrapping for MFM
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Commit 65201e3000 added the mfm class
(back) to MFM posts to adjust emoji sizing and commit
ebe4158885 changed codeblocks to respect
the original line breaks allowing to scroll the code container.

However, we still carry CSS to display legacy MFM representations
and one of the legacy rules matched on just the mfm class changing
display to inline-block.
This caused code blocks to not become scrollable, but simply overflow
while at the same time pushing the logical line length for all other
text in the statuses so it may overflow too. This overflow then got
truncated making the post unreadable.

Fix this by renaming the MFM post indicator class
to avoid any overlap. This may potentially leave legacy MFM broken,
but further research needed to figure out why it chooses inline-block
display in the first place.

Mostly-resolves: #511
2026-05-04 00:00:00 +00:00
Oneric
f85d394fd9 Fix MathML annotation rendering
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
By default DOMPurify removes enclosing semantics and annotation
elements but retains their children by reparenting them.
This led to supposed to normally invisible source annotations
being rendered next to the proper math expression.

Fixes oversight in: d0135f4a71
Fixes: #509
2026-04-30 00:00:00 +00:00
89130d2dc7 Merge pull request 'User suggest (mention autocomplete) fix' (#507) from Oneric/akkoma-fe:fix-user-suggest into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #507
2026-04-26 15:36:19 +00:00
Oneric
86ac627422 emoji_input/suggestor: don't trim leading @ from account search query
All checks were successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
There is no issue with passing it. On the contrary, it lets the
backend know we are looking for matching nicknames specifically.
2026-04-24 00:00:00 +00:00
Oneric
556caba534 emoji_input/suggestor: don’t skip searching for remote accounts
There is no issue on current backends and
this simply doesn’t make any sense.
It lead to sometimes remote accounts _never_ showing up in the suggestor
if they were not in the first page of results for just the local
username part of their handle unless the account was already loaded
into cache by some other means beforehand.
2026-04-24 00:00:00 +00:00
Oneric
a2155a3c10 emoji_input/suggestor: only suggest already known users
We don’t want to kick of a barrage of remote request on the backend
attempting to lookup half incomplete nicks. Nor do we, in the client,
want the additional latency of waiting for the backend to finish those
futile network requests.

Eventhough the suggestor used to call the API with an explicit
resolve=true, no actual WebFinger lookups should’ve ever been
made due to the suggestor (otherwise) nonsensically stopping
backend queries if there was a remote domain fragment.

(Yes, "emoji_input" also handles user suggestions)
2026-04-24 00:00:00 +00:00
Oneric
6bff83f112 settings/profile_tab: fix avatar upload
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes oversight in 4d578720e8.

Avatar upload logic is wrapped in an explicit Promise object and
thus cannot access the tab’s this object. Instead it uses an
indirection via a captured local variable "that" for all existing uses,
but this was overlooked for the added bits.

All other uploads do not use a cropper and are not affected

Fixes: #505
2026-04-18 00:00:00 +00:00
1edd7cb379 Merge pull request 'Small visual tweaks' (#504) from Oneric/akkoma-fe:visualtweaks into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #504
2026-04-14 21:40:18 +00:00
5ba3be783b Merge pull request 'Improve style for quoted text in RichContent' (#412) from ilja/akkoma-fe:improve_visual_style_for_quoted_text into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #412
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-04-14 21:05:22 +00:00
15b52da145 Merge pull request 'fix spacing after mentions' (#503) from Oneric/akkoma-fe:richparser_mentionpadding into develop
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: #503
2026-04-14 21:04:58 +00:00
2c252bb6bf Merge pull request 'Replace awful and buggy in-house HTML parser' (#501) from Oneric/akkoma-fe:htmlparse into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #501
2026-04-14 20:02:30 +00:00
Oneric
ebe4158885 rich_content: improve codeblock styling
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
Using `--input` for codeblock backgrounds is not ideal, but the best we
can do with currently existing variables. Using colours not nominally
intended for text background risks borking on custom themes.
Among actual background colors we have
 - the regular post background `--bg` which never provides distinction
 - the background of _selected_ posts `--selectedPost` which
   only offers a visual distinction for not selected posts
 - Background of profile `--profileBg` which is only used in absence of
   a profiel banner image — but Mastodon API requires us to _always_
   have a banner image (so this color is not actually used and thus has
   a higher chance of breakage)
 - the background of input fields `--input`

The latter is well tested and almost certainly well legible
with a decent chance of creating a visual distinction.

Future patches to create a distinct new colour variable for codeblocks
and the plumbing in the theme editor welcome.
2026-04-14 00:00:00 +00:00
Oneric
c7d7fd5fdd rich_content: overhaul spacing around mentions
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
The old code was inconsistent about when the mention line state and
remembered spacing were reset as well as failing to add necessary
whitespace if a mention line was immediately succeeded by a plain text node.
The latter was kludgily fixd for a particular special case with the
last-child exception to whitespace trimming. (However this could en up
to retaining superfluous undesireable space in other cases)

This led to sometimes space being added "back" several times
notably leading to one extra, empty line in blockquote elements
succeeding mentions with whitespace. This stalled the otherwise
unrelated #412

Now we always reset the mention chain and remembered spacing together
and also add back spacing in front of plain text nodes if appropriate
obsoleting the last-child exception.
2026-04-14 00:00:00 +00:00
Oneric
65201e3000 status: always match key’s emoji size for MFM
Previously it was only adjusted for effects involving scaling,
creating odd inconsistencies betwen e.g. an unstyled emoji and
a slow "tada" animation as well as reduced compatibility.

To ensure scaling still works for posts with FEP-c16b-like HTML
without the source type being actually indiated as (vanilla) MFM,
the 2em rule specific to scaling tags is retained too.
2026-04-14 00:00:00 +00:00
Oneric
16de7133da user_profile/fields: allow linebreaks at whitespace
Long'ish values and keys are not too uncommon and this lead
to them becoming unreadable, the full text only accessible as a tooltip.
Overly long single words are still ellipsised to prevent overflow.
2026-04-14 00:00:00 +00:00
Oneric
aa567c446b config: default conversationDisplay to tree mode 2026-04-14 00:00:00 +00:00
Oneric
f3907fe0be unittest/rich_content: fix MFM injection tests
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
Just like the old NIH HTML parser this test wrongfully assumed
">" couldn't appear unescaped in tag attributes and thus was
broken for many months now after a browser upgrade in our CI runners
caused this to be quoted automatically anyway.

Instead test against actual injection attempts
of additional styling rules and new attributes.
2026-04-13 00:00:00 +00:00
Oneric
d0135f4a71 Sanitize HTML again client side
The backend is already supposed to sanitize everything for us
and it is rather restrictive even. But it’s simple enough,
so lets make sure of it and lessen the real-world impact
should there ever be backend sanitizer bugs (if at all,
then most likely in fast_html or its HTML parser dependency)

DOMPurify can only return a body element or a DOcumentFragment
not a full document as DOMParser does. However we only ever
grabbed the body object anyway so let’s just return that directly.
2026-04-13 00:00:00 +00:00
Oneric
87ef8eeaf1 Replace awful and buggy inhouse HTML parser
The inhouse parser wrongly assumed tag attributes could not contain
literal '>' characters, has issues like the recently fixed
#480 and probably many
more problems. In any event the regex and characterwise parser mess was
hard to read and reason about.

Browsers already have optimised HTML parsers built in so use it.
Also rework the nested function into a parser class for even better
readability.
Other than using a proper HTML AST and rearranging everything into
a class this for the most part closely follows the previous logic.
More substantial logic changes were made to emoji processing and
green/cyantext styling.
The former now processes text in chunks to the next colon rather
than character by character. The latter is possibly a bit more
leient in what it styles now and no longer will break styling
tags enclosing a <br />.
2026-04-13 00:00:00 +00:00
Oneric
b193fd5adf rich_content: drop unused writtenTags
Just like lastTags, it was added in aec867b300
but never actually used anywhere
2026-04-10 00:00:00 +00:00
Oneric
1a124db024 rich_contnet: drop second, reverse direction parser pass
The reverse pass basically only dealt with hastags and existed
to make detection of the "last" set of consecutive hashtags easier.
But since lastTags was never used and thus dropped in the preceding
commit, the whole pass is obsolete too.
We can simply parse hastags during the forward pass.
2026-04-10 00:00:00 +00:00
Oneric
0b2ff901ca rich_content: remove unused lastTags
The porperty was added in aec867b300
and accomodated for in f883d2f75cd3c404115bd2c98b6d3c8d7ff10ef6’s
refactor, but was actually never used anywhere.
2026-04-10 00:00:00 +00:00
Oneric
65a51a2596 Replace bugged custom HTML stripper
HTML tags can in fact contain '>' characters in quoted attribute values.
Besides that the regex replace failed to normalise whitespace
or to strip invisible elements. And lodash’s 'unescape' function
only replaces a limited set of quoted HTML entities, not all.
2026-04-10 00:00:00 +00:00
Oneric
ddcbaa7256 status_content: drop obsolete condition
The computed localCollapseSubjectDefault was removed from status_content
about five years ago in 50aa379038. Ever
since this clause was effectively dead code but spamming Vue warnings.

It used to automatically reveal NSFW attachments already hidden behind
a collapsed content warning. However, this means it was impossible to
reveal just the text of a content warned post and we already have a
separate settings for always revealing NSFW media if desired, although
this admittedly will also reveal cw-less media directly.

Given there seemingly were zero complaints about the effective new
behaviour, let’s just drop the dead code conditional.
2026-04-10 00:00:00 +00:00
Oneric
c57e59f8e8 poll: show vote anonymity hint if known
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Ref: AkkomaGang/akkoma#1104
2026-04-04 00:00:00 +00:00
061a9ad325 Merge pull request 'Profile media alt texts' (#499) from Oneric/akkoma-fe:profile-media-alt-text into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #499
2026-04-04 12:15:05 +00:00
Oneric
4d578720e8 settings/profile: allow setting media alt texts
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
Ideally alt text and image would be handled together, but this is not
straightforward to do with the current profile tab and API interaction
setup.

To somewhat alleviate this, always submit the current matching alt text
too when uploading a new image. This allows an alt text edit before
confirming the upload to immediately take effect without the user
needing to remember to go back to the upper section to hit "save" there.
2026-04-04 00:00:00 +00:00
Oneric
c98962f4b3 user*: expose profile media alt texts
Only avatar alt text is integrated into the UI in an assistive way.
Header and backgrounds are set as CSS backgrounds and I don’t know
of a good way to add alt or aria-label attributes to that. Nor whether
it even makes sense to bake this into the default view since their just
decorative background elements.
The full al text can still be accessed through the new profile media gallery.

Despite many places setting distinct :title and :alt atttributes
for StillImage, it actually only had a :alt attribute used for both.
This is however not what we want here,
so add (back?) :title as a distinct property.

Related backend change: AkkomaGang/akkoma#1034
2026-04-04 00:00:00 +00:00
Oneric
2292381b0a ci: move to ARM runner
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Our ARM runner is both faster and less used than the x86 runner.
Nothing here is specific to x86 though, so let’s make use of the ARM one
2026-03-28 00:00:00 +00:00
Oneric
0f695386fe list: expose exclusive parameter
Allows excluding list members from home timeline.
Matches Mastodon and implemented in Akkoma via
AkkomaGang/akkoma#1062
2026-03-28 00:00:00 +00:00
Oneric
7fb67ee723 service/file_type: fallback to generic Masto type
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
E.g. bridgy doesn’t federate the full MIME type and
it’s attachment URLs also have no extension. Thus
the full MIME type is always just a generic binary,
but since it still federates a more specific AP type
the generic Mastodon type still contains some information
we can use here to display it properly.

While at it, drop unused fileMatchesSomeType function.
Its last users disappeared in e654fead23.

Ref.: https://github.com/snarfed/bridgy-fed/issues/2198

Co-authored-by: Yonle <yonle@proton.me>
2026-03-27 00:00:00 +00:00
Oneric
e80ebc3fac changelog: add missing entries
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-03-21 00:00:00 +00:00
e6c0d35d29 Merge pull request 'notification: fix code usage on mobile' (#492) from Yonle/akkoma-fe:mobilenotif-fix1 into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #492
2026-03-16 13:41:01 +00:00
8f5cf700f8
module(users): remove unnecessary check on getNotificationPermission
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline is pending approval
2026-03-16 15:11:46 +07:00
Oneric
efe15c98c6 lists: ensure all properties exist after creation
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This used to cause null errors e.g. when initialising the accounts for a
newly created list, which also prevented a post-creation redirect to the
new list’s page from occuring.

Co-authored-by: Yonle <yonle@proton.me>

Fixes: #367
Fixes: #368
2026-03-15 00:00:00 +00:00
Oneric
a734eda0d9 Bump version for release
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-03-14 00:00:00 +00:00
51caf0430f
notification: fix code usage on mobile
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending approval
on mobile (especially PWA), window.Notification is illegal to use. so if possible, consider using serviceWorker instead.
2026-03-10 12:47:18 +07:00
48905a4431 Merge pull request 'a fix for nsfw warnings display on webkit' (#488) from mkljczk/akkoma-fe:webkit-fix into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #488
2026-03-06 16:30:12 +00:00
c465cb0a35 components/attachment: fix display of nsfw overlays on webkit
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline is pending approval
2026-03-06 00:00:00 +00:00
Oneric
affbc240d1 changelog: add everything since 3.17 (2025.12) 2026-03-02 00:00:00 +00:00
a123b41a2f Merge pull request 'Fix HTML attribute parsing for escaped quotes' (#480) from mkljczk/akkoma-fe:get-attrs-fix into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #480
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-02-19 12:31:59 +00:00
4ab3424508 Fix HTML attribute parsing for escaped quotes
Some checks failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline is pending approval
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline is pending approval
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-16 13:36:15 +01:00
b04e4810f8 Fix HTML attribute parsing, discard attributes not strating with a letter
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-16 13:30:52 +01:00
fc8debd2c4 Merge pull request 'components/quote_button: show for local and own private posts' (#478) from Oneric/akkoma-fe:more-quoting into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #478
2026-02-07 22:40:22 +00:00
Oneric
8227c84aa2 components/quote_button: show for local and own private posts
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
Aligning to AkkomaGang/akkoma#1059
2026-02-07 00:00:00 +00:00
Oneric
42595fcb2c cosmetic: fix linter complaints
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Mostly just reordering, whitespace changes
and removing superfluous "this".

eslint really wants us to add :key to the UserAvatar list in DM
conversation cards. With :key Vue will reorder elements instead
of patching their contents on list changes, allowing input state
of elements to be preserved. This doesn’t really seem relevant
here since USerAvatars do not have a state, but also not harmful.

One lint complaint about using double quotes at the outer level
was purposefully ignored as it results in needing to quote
double quotes within the string making it rather unreadable.
2026-01-26 00:00:00 +00:00