Feature suggestions and discussion [READ THE FIRST POST]

.
Lightning Dust - For supporting the site
Amethyst Star - For supporting the site
Best Artist - Providing quality, Derpibooru-exclusive artwork
Cutest Little Devil - Celebrated the 14th anniversary of MLP:FIM!
Ruby - For users who have donated to the site
Emerald - For users who have donated to the site
Rainbow Rocks 10th Anniversary: Adagio Dazzle - Celebrated the 10th anniversary of EQG Rainbow Rocks!
Artist -
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Magnificent Metadata Maniac - #1 Assistant

How about a change like
--- a/lib/philomena/versions.ex
+++ b/lib/philomena/versions.ex
@@ -48,7 +48,16 @@ defmodule Philomena.Versions do
   end
 
   defp difference(previous, nil), do: [eq: previous]
-  defp difference(previous, next), do: String.myers_difference(previous, next)
+  defp difference(previous, next) do
+    List.myers_difference(String.split(previous), String.split(next))
+    |> Enum.map(fn {key, value} ->
+      adjust_whitespace({key, Enum.reduce(value, "", fn new, old ->
+        old <> " " <> new
+      end)})
+    end)
+  end
+  defp adjust_whitespace({:eq, str}), do: {:eq, " " <> str <> " "}
+  defp adjust_whitespace({op, str}), do: {op, String.trim(str)}
 
   @doc """
   Creates a version.
to turn gibberish like
into something readable
It’s certainly possible to pretty up the code a bit, but the comment history looks way nicer that way.
Posted Report
byte[]
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Non-Fungible Trixie -
Verified Pegasus - Show us your gorgeous wings!
Preenhub - We all know what you were up to this evening~
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Philomena Contributor
@.
I would suggest going even further and hiding lines that have not changed, but yeah, this is a good change
Posted Report
Background Pony #2A5F
@.
+1 for word-wise diffs.
@byte[]
Unchanged lines provide context. Diffs without context are harder to understand. Git diffs default to 3 lines of context for a reason. Hiding only unchanged lines that fall outside of context would make more sense, but is it worth the added logic?
Posted Report
byte[]
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Non-Fungible Trixie -
Verified Pegasus - Show us your gorgeous wings!
Preenhub - We all know what you were up to this evening~
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Philomena Contributor
@.
I think the solution that is needed is more like List.myers_difference/3 on lists of lines, and then use the callback parameter to handle the word differences within lines.
Posted Report
.
Lightning Dust - For supporting the site
Amethyst Star - For supporting the site
Best Artist - Providing quality, Derpibooru-exclusive artwork
Cutest Little Devil - Celebrated the 14th anniversary of MLP:FIM!
Ruby - For users who have donated to the site
Emerald - For users who have donated to the site
Rainbow Rocks 10th Anniversary: Adagio Dazzle - Celebrated the 10th anniversary of EQG Rainbow Rocks!
Artist -
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Magnificent Metadata Maniac - #1 Assistant

@byte[]
Or how about this:
--- a/lib/philomena/versions.ex
+++ b/lib/philomena/versions.ex
@@ -48,7 +48,14 @@ defmodule Philomena.Versions do
   end
 
   defp difference(previous, nil), do: [eq: previous]
-  defp difference(previous, next), do: String.myers_difference(previous, next)
+  defp difference(previous, next) do
+    List.myers_difference(split_with_whitespace(previous), split_with_whitespace(next))
+    |> Enum.map(
+      fn {key, value} ->
+        {key, List.foldl(value, "", fn x, acc -> acc <> x end)}
+      end)
+  end
+  defp split_with_whitespace(str), do: String.split(str, ~r{\s+}, include_captures: true)
 
   @doc """
   Creates a version.
This properly preserves newlines and such. I don’t think it matters when lines without changes are also included. Most posts don’t contain several pages worth of text and having context is indeed a good thing.
Posted Report
Background Pony #965A
@Background Pony #2A5F
Imo, git includes 3 lines of context because of traditional 80~140 symbols line limit, while natural plain texts may have lines of any size (aka paragraphs). So context from the changed paragraph alone usually should be enough.
Posted Report
Background Pony #0F89
@., @byte[], @Background Pony #2A5F
While we’re talking about this, the edit history page ought to also let you see the state of the post (or at least its code) at each state, without the diffs inserted, for easier readability - I have this inelegantly implemented in a userstyle that hides added text and unstyles removed text when I hover the block…
Posted Report
Luna
Luna - For Patreon supporters
Woona - Derpi Supporter
PonyCon Holland -
Pixel Perfection - I still call her Lightning Bolt
Flower Trio - Helped others get their OC into the 2023 Derpibooru Collab.
Roseluck - Had their OC in the 2023 Derpibooru Collab.
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Lunar Supporter - Helped forge New Lunar Republic's freedom in the face of the Solar Empire's oppressive tyrannical regime (April Fools 2023).
Princess of Love - Extra special version for those who participated in the Canterlot Wedding 10th anniversary event by contributing art.
Tree of Harmony - Drew someone's OC for the 2022 Community Collab

Luna Best Pony~
@.
I’m working on a bit of a different version of this that does not display the whole post, and works on the basis of lines, not words (although I’ll highlight difference in words between lines too, this is just a prototype).
Bee movie script example:
new
old
Background Pony #2A5F
@Luna
Not sure if line-wise diffs are optimal for this. Lines of regular text are longer than lines of code. Typically, a paragraph will be one line.
Posted Report
Luna
Luna - For Patreon supporters
Woona - Derpi Supporter
PonyCon Holland -
Pixel Perfection - I still call her Lightning Bolt
Flower Trio - Helped others get their OC into the 2023 Derpibooru Collab.
Roseluck - Had their OC in the 2023 Derpibooru Collab.
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Lunar Supporter - Helped forge New Lunar Republic's freedom in the face of the Solar Empire's oppressive tyrannical regime (April Fools 2023).
Princess of Love - Extra special version for those who participated in the Canterlot Wedding 10th anniversary event by contributing art.
Tree of Harmony - Drew someone's OC for the 2022 Community Collab

Luna Best Pony~
@Background Pony #2A5F
They will also highlight differences in precise words. This diff is meant to be such that in extremely large posts or pages, where only 1 word changes, it’s possible to display just the snippet that changed with some context around it.
Posted Report
Ciaran
ラ・ゼッタ - For supporting the site
Cutest Little Devil - Celebrated the 14th anniversary of MLP:FIM!
Rainbow Rocks 10th Anniversary: Sonata Dusk - Celebrated the 10th anniversary of EQG Rainbow Rocks!
Celestial Glory - Helped others get their OC into the 2024 Derpibooru Collab.
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Pixel Perfection - I still call her Lightning Bolt
Silly Pony - Celebrated the 13th anniversary of MLP:FIM, and 40 years of MLP!
Shimmering Smile - Celebrated the 10th anniversary of Equestria Girls!
Lunar Guardian - Earned a place among the ranks of the most loyal New Lunar Republic soldiers (April Fools 2023).
Crystal Roseluck - Had their OC in the 2023 Derpibooru Collab.

Senior Moderator
君場森生きる
Feature Request: Ability to preview the contents of a gallery as images in a post or description
Problem (use case): Philomena displays images in sort order. Some artists and uploaders (henceforth: creators) upload sequential art. For example: ongoing comics. Artists often wish to provide an easy index to the story, or to provide links to the individual pages in the correct order. One workaround is to manually link pages in descriptions. This works well, but is inelegant and prone to failure if individual pages are replaced with new versions.
The most proper solution is most likely a way to ‘thread’ uploads. However, this may take a while to implement.
Instead, could Galleries be leveraged to achieve a similar result?
Proposed Fix:
  1. Permit previews of galleries to be shown in posts as ‘small’ thumbnails with links to the image.
  2. To prevent scaling issues of very large galleries, show only a preview of a few images along with the gallery title as a link. Allow the creator to indicate which images should be shown in the preview. Example choices:
    • First (oldest) N images.
    • Latest (newest) N images.
    • Previous and Next images with the currently displayed image in the middle.
Proposed syntax:
  1. ![GalleryIndex: gallery_name](gallery_id, display: display_type, count: n)
    • GalleryIndex = Indicates this is a gallery index.
    • gallery_name (string) = Name to display in link
    • gallery_id (string) = unique identifier of a gallery on the site.
    • display: = The type of display for gallery.
    • display_type (enum) = first | last | centered
    first = Displays first (oldest) N images in the gallery
    last = Displays last (newest) N images in the gallery
    centered = Displays 3 images in a table with the image_id of the current image ‘in the center’.
    • count: (integer, optional) = Number of images to display. Not used when display_type is centered.
Use Case: If an upload is a part of a set - for example a page in a comic - this would allow artists/uploaders to upload a single boilerplate in the description that will show the correct sequence of the pages. The artist/uploader would then be able to add new images to the links for the series by adding new uploads to the gallery, and arranging them appropriately within the gallery.
Example of ‘First’ with 3 images:
Syntax: ![GalleryIndex: WIP of Ciaran's Rainbow Rocks 10th Image](25784, display: first, count:3)
Result:
Example of ‘Last’ with 5 images:
Syntax: ![GalleryIndex: WIP of Ciaran's Rainbow Rocks 10th Image](25784, display: last, count:5)
Result:
Example of ‘Centered’, using 3453704 as the ‘center’, or image_ID the description is on:
Syntax: ![GalleryIndex: WIP of Ciaran's Rainbow Rocks 10th Image](25784, display: center)
Result:
<- next you are here previous ->
With this, assuming they used the ‘centered’ format, creators could add each new upload to the gallery used in the links, add the gallery link to their descriptions, and then each image would have ‘next’ and ‘previous’ links and previews.
When they add new images, the links in the description would automagically update, and if they want to they can simply rearrange the sequence using the ‘rearrange’ feature of the gallery.
Although development would absolutely be required, I think this might help with some of the problems I’ve seen creators have threading their comics or other forms of sequential art together.
mdashlw
Artistic Detective -
Fine Arts - Two hundred uploads with a score of over a hundred (Safe/Suggestive)
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Pixel Perfection - I still call her Lightning Bolt
Cool Crow - "Caw!" An awesome tagger
Magnificent Metadata Maniac - #1 Assistant
Notoriously Divine Tagger - Consistently uploads images above and beyond the minimum tag requirements. And/or additionally, bringing over the original description from the source if the image has one. Does NOT apply to the uploader adding several to a dozen tags after originally uploading with minimum to bare tagging.
Lunar Supporter - Helped forge New Lunar Republic's freedom in the face of the Solar Empire's oppressive tyrannical regime (April Fools 2023).

Assistant
Site Developer
I’m not sure how feasible it is to implement but filter:123 would be a very useful search term. E.g. filter:1 would only show images that pass filter 1, -filter:1 would only show images hidden by filter 1.
Interested in advertising on Derpibooru? Click here for information!
Techy Cutie Pony Collection!

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ ~sub~

Detailed syntax guide