Skip to content

V3: The Things I've Always Wanted

Latest
Compare
Choose a tag to compare
@ellman12 ellman12 released this 02 Feb 22:28
· 3 commits to main since this release

This is the biggest update to PSS since V2 all the way back in July 2022. This took over 7 months of my life.

First off, PSS and PSS-Init have been renamed to MemoryMosaic and Initialization. I never liked the name Photos Storage Server because of the first and last words: Photos implies this thing can only store photos—much like Google Photos—and Server implies it has to be run on a server, which isn't true; you can run it on your local machine. I like the name MemoryMosaic because this thing's primary pages resemble a mosaic of your memories.

I did a lot of things in this update to hopefully make MemoryMosaic reliably work many decades into the future, if not forever (as long as .NET, Blazor, and PostgreSQL are still alive and well). This is also hopefully the last big update to this project, as the V3 branch has over 1,000 commits on it, somehow. I think I have a problem.

New Features

Big New Features

  • Create inheritance structure with classes like Component.
  • Create ElementVisibility class, replacing Functions.VisToggle().
    • Create ToggleableComponent.razor. Many components inherit from this to make toggling of them much easier and simpler.
      • They can (but are not required to) also toggle if the page can scroll or not, fixing the issue in pre-V3 where you could scroll while a modal was active.
    • Create ModalBackground component, making it consistent and easy to add a semi-transparent background over any modal-like component or element.
  • Create reusable components for things like buttons, text inputs, etc.
  • Added a NuGet package for working with SCSS.
    • Replaced all .css files with .scss, and improved their syntax/structure.
    • Reduced a lot of repetition and duplication by moving things to Shared.scss and Mixins.scss.
    • Made things like colors and spacing more consistent with ✨mixins✨.
  • Add Date Added page
  • Collections page:
    • Collections page now displays the amount of items in each collection.
    • Collections can now display the DT range of their items.
    • Collections can be sorted by these two ↑.
    • Collections can have descriptions.
  • Create build.sh, which builds the projects and bundles all the necessary files like the .css files.

Small New Features

  • Added a setting controlling the logging level.
  • Created Functions.GetPluralized()
    • If you give it an amount of something like a List<int> "Items", it makes it easy to control if it should output as "No Items," "1 Item," or "30 Items."
  • Create Functions.ServerIP. This is retrieved from launchSettings.json and set on startup.

Improvements

Huge Improvements

  • Completely rewrote LibraryContentViewer.
    • This was two months of my life well spent.
    • It is now way leaner, and works significantly better. The library should theoretically be able to scale into the millions with little to no performance problems.
      • Sorting and grouping items works way, way better and is less disgusting.
      • Null Date Taken items are handled way better.
      • Now shows the size of selected items.
    • You can now group/view items in different modes: year, month, day, or none.
    • The thumbnails now expand to fit the whole screen.
    • Clicking the header of a group of thumbnails now selects the entire group.
    • Pages like Collections and Trash now have less nonsense going on inside. Lots of their logic has been moved to LCV.
    • Alt-clicking a thumbnail always makes it full screen, even if items are selected.
    • Ctrl G hotkey works better.
    • Add new hotkeys like Ctrl Shift A (loads every item on the current page, then selects all).
    • Hovering an LCV Thumbnail for ≥ 150 ms now preloads it.
  • Created FullscreenViewer, a significant improvement over the original item viewer in LCV.
    • Also contains the new VideoPlayer component, a cross-browser video player built from scratch with primarily JS.
    • Its info display is much better, and also displays the file size of items.
  • Completely rewrote Import.
    • This was also two months of my life well spent.
    • Just like LCV, it is much leaner but also works significantly faster and better.
    • Errors should almost never happen, instead of being common like in pre-V3.
    • Add more keyboard shortcuts.
    • Items can now display the short path of where they'll end up.
    • You can now control how the items are sorted.
    • Date Added is now displayed in errors/warnings.
    • The displays for DT (and DA) are now much easier on the eyes.
      • They also visually show if you've picked metadata or filename for an Import Item.
    • Import now also contains FullscreenViewer, allowing you to view both Import Items and Library Items in full screen, thanks to the magic of polymorphism.
    • Import now loads in more gracefully.
      • Thumbnails are initialized last, meaning items are displayed in the list before their thumbnails are ready.
      • While this technically doesn't make Import load in faster, this at least gives you something to look at instead of a blank loading screen, and allows you to start looking through the list of items.
    • Items now display file sizes of items.
    • Fix very annoying bug from pre-V3 Import where it would often miss a few items when loading in.

Big Improvements

  • Renamed project.
  • Enabled nullable flag in project.
  • CollectionCreator got some UI and backend improvements.
  • CollectionSelector:
    • Reduced duplication
    • Removed all static class members
    • Now saves and restores collection groups in a less cursed way.
    • Save/restore buttons now display the collection name(s) on hover.
  • MemoryMosaic now supports having a second instance of it for debugging and testing purposes.
    • This is controlled via the #DEBUG flag and the Program.Debug field. The latter is used in .razor files because conditional compilation in them is weird.
    • Default settings now change depending on if in debug or release mode.
  • Rewrote Initialization to work better and be easier to use.
    • Can create normal and debug instances of MM.
  • Replace internals of Memories page with updated LCV.
  • ShortcutsReference is now better than ever and more consistently used.
  • Collections page now uses a grid layout. Collections resize themselves very nicely.
  • Rename Connection to Database, and update global usings.

Small Improvements

  • Restructured where the .sln and .csproj files are.
  • Organized using statements across the project. Added more global usings in Program.
  • Organize a lot of other stuff.
  • Updated icon for the project.
  • Rename Index.razor to Home.razor.
  • Improve default settings.
  • Change ProgressPopUp's default width and height to 200px.
  • Rename media database table → library.
  • Renamed MediaRow and ImportFileLibraryItem and ImportItem, and they inherit from new Media class.
  • Reduced my usage of null! when possible.
  • PostgreSQL:
    • Fix collections.cover not having ON UPDATE CASCADE.
    • collections.name is now a primary key in addition to id. Mark both as UNIQUE.
    • Rename uuidid.
    • Rename collection_entries.iditem_id.
    • Reorder columns in library, collections, and collection_entries.
  • Create NpgsqlDataReaderExtensions class.
  • Rearrange items in the NavMenu.
  • Change /collection-view URL to just /collection.
  • Add a Console.ReadLine() to end of Initialization.
  • Tweak settings in launchSettings.json.

Tiny Improvements

  • Remove unnecessary IConfiguration stuff from Startup.
  • Remove unnecessary calls to ExecuteNonQuery in methods that call ExecuteReader.
  • Fix inconsistencies with tags, as well as @code and @functions blocks across the project.
  • Move enums from /Backend/Enums to /Enums/.
  • Change some == false into using !
  • Rename GetCollectionsTable()GetCollections().

Bug Fixes

Big Bug Fixes

  • Fix Untracked Files page crashing if no untracked items found.
  • Fix compression of thumbnails for PNGs never having actually worked, thanks to using incorrect ffmpeg arguments.

Small Bug Fixes

  • Hopefully fix pesky JavaScript error complaining about a random task being cancelled.