Giter Club home page Giter Club logo

tacocat-gallery-sveltekit's Introduction

tacocat-gallery-sveltekit

Front end of the Tacocat photo gallery website using the Sveltekit application framework.

Installation

Clone this project, cd into its directory, install dependencies with npm install or pnpm install or yarn.

Run Development Version

Start development server: npm run dev

Production

  1. Create the production assets: npm run build

  2. You can preview the build with npm run preview, though personally I haven't used this.

  3. Deploy the build to staging with npm run deploy-staging and see results at https://staging-pix.tacocat.com/

  4. Deploy the build to production with npm run deploy-prod and see results at https://pix.tacocat.com/

tacocat-gallery-sveltekit's People

Contributors

deanmoses avatar

Watchers

 avatar  avatar

tacocat-gallery-sveltekit's Issues

Hide less-used admin buttons

Most of the admin functionality is infrequently used. Hide it behind a combo button / button dropdown or something.

Image

Better image delete status

The problem: on an image detail page, after clicking the image delete button, the user is sent to parent album, and there they briefly see the image to be deleted, which stays there until it's actually deleted and the album refreshes.

Options

What I could do

  • Go to the parent album and show the image being deleted as 'Delete Processing'
  • Continue what I'm doing

What I can't do

  • I can't stay on the image page once it's deleted
  • I don't think there's a way to transactionally delete the image and navigate to the parent album

Test images up to 5MB

Test that the system can handle images of up to 5MB. I'm splitting out images bigger than that because there ARE issues, and I'm deferring those.

All Tacocat's existing images top out at 3 or 4 MB because Zenphoto crashes trying to process images that are any larger. So we downsize the originals BEFORE uploading them to Zenphoto. I want to stop doing that and store bigger original images in AWS.

Garbage collect thumbnail URLs

On the thumbnail of uploading images, I show the actual image. This uses URL.createObjectURL().

I need to garbage collect those URLs. Figure out how to call URL.revokeObjectURL().

Better album create status

The button to create a new album (day or year) feels unresponsive because it does the create then takes you to the newly created album.

Options

  • Show a 'Creating Album' toast that I then remove
  • Have some sort of generic 'working' status like that blue line from Gmail
  • Behave like uploading an image: show a "creating album..." status at the top of the parent album, and maybe an in-progress thumbnail.

Promote feature_aws to main

Merge the feature_aws branch into main.

Don't merge until I ship

  1. Deploy app to prod on feature_aws
  2. Test the prod on feature_aws
  3. Create the fist album of 2024
  4. Have people test
  5. Point pix.tacocat.com to the AWS bucket
  6. Maybe send out the mupdate email, to make it even more official
  7. On Github.com create the 2024v1 release on the last commit of feature_aws
  8. Merge feature_aws into main
  9. Delete branch

Don't create a branch for the old non-AWS version

  • I had been considering first creating a branch for the non-AWS version. Don't; I can always create a branch of a past commit if necessary.

Less obtrusive Gmail-style toasts

I like Gmail's very plain, small toasts for things like loading. The toast styling I'm using feel a bit overpowered.

This should simply be a matter of changing the styling of the existing toast system.

Bug: crop page doesn't start with existing crop, but instead shows default crop

I tried fixing it quickly and failed. Needs more time. Here's the deal. The crop component needs to be given the following pieces of information:

  • Zoom. That's easy: the thumbnail crop width / original image width
  • Crop. This is an x&y for where to position the image behind the crop area. It's specified in pixels but I'm not sure of what. I think it's pixels of the derived image that I'm displaying in the crop UI?

App doesn't work offline

The app doesn't load from cache when there's no network connection. That's what the Progressive Web App / service worker stuff is supposed to support.

What I'd need to do is serve index.html from cache but only if the network fails to retrieve it.

Bug: edit pages appear to be drag/droppable

The day album edit and the image edit pages appear to allow drag/dropping images, but it's a lie: they error.

Also, edit pages shouldn't allow dropping because it could blow away edits. Edit pages shouldn't allow dropping.

Authentication: support on localhost

I want to authenticate my web app when testing localhost. I want to be able to actually do admin functions, edit albums, upload images.

Options

  • Domain in hosts file
    • Set a domain in my hosts file, like dev-pix.tacocat.com
    • Configure Vite (my local development app server) to know about it
    • Create corresponding infrastructure on the back end
  • I might be able to do it with a localhost proxy
    • I'd have to pass a fake Origin header with a tacocat.com domain or subdomain to get around CORS
    • Eh, that still won't work: the browser will know I'm on localhost and not pass the tacocat.com cookies

Day album drop zone don't work so good

The day album drop zone is hard to locate. It works best at the bottom right corner where there's usually empty space. Should be able to drop an image anywhere in the white.

Better status when uploading lots of images

We need better status when updating lots of images at once.

When you upload multiple images at once, it doesn't start refreshing the album until they're all uploaded. That's fine, but if there's 30 images it takes a while. Thumbnails do change from 'Upload Not Started' → 'Uploading' → 'Processing', but you're not looking at individual thumbnails.

We need an overall process indicator. Maybe it shows something like "23 not started, 12 uploading, 5 processing".

Prevent layout shift when image loads

When navigating to an image detail page, when the image loads in it expands the page / makes the page taller. It's an annoying distraction.

However, it isn't a regression: the Zenphoto version of the app also does this.

To avoid this content flashing / layout shift, show a blank spot where image will be placed at the appropriate dimension.
The UI displays the image at whatever width the screen is, so I just need to figure out the image's height/width ratio, get the current element's width, and set the height correctly.

Test iPhone app

Test that the Progressive Web App (PWA) is working on the iPhone:

  • Can I still install it to the iPhone home screen
  • Does that installed app get the new version when I update the SPA

Fix service worker error message in Firefox

In Firefox (but not Chrome), my localhost browser console keeps showing a service worker error:

Uncaught (in promise) TypeError: ServiceWorker script at http://localhost:5173/service-worker.js for scope http://localhost:5173/ threw an exception during script evaluation.

I don't think it's an actual issue, but instead is related to the fact that Svelte bundles the service worker for production but not development. See https://kit.svelte.dev/docs/service-workers#during-development

Better upload/"working" indicator (blue line)

It's sometimes not clear when work is being done, like when an album is uploading images or deleting an image.

I like the way some of my favorite tools indicate loading by painting a pulsing blue line across the top of the page. Unobtrusive yet clear. Such as:

  • gmail
  • github projects
  • figma
  • aws toolkit

Not sure how I'd calculate progress of the blue line.

  • uploads: as a % of the images that were added to be uploaded?
  • deleting: simply have a timer for, say, 5 seconds?

Search thumbnails are broken

Thumbnails are broken in search results.

  • Image thumbs are broken: no versionId = 'undefined'
  • Album thumbs are also broken: no versionId or crop

Album delete button is not reactive

The delete button is hidden when the album contains children. But when I delete the children, the delete button doesn't show up; I have to refresh the page.

This happens on both year albums and day albums.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.