Skip to content

Conversation

@jeremydw
Copy link
Member

  • This is a surgical update to the file field on the assets page; meant to update the field to use the new file field.
  • I know we'll build out a media library one day, but this is meant to be an incremental improvement.
  • Also add new options regarding the file naming.
  • Add a confirm dialog for overwrites (when choosing "preserve original filename without hash").

@jeremydw jeremydw requested a review from stevenle January 28, 2026 20:09
@jeremydw jeremydw marked this pull request as draft January 28, 2026 20:10
Copy link
Member

@stevenle stevenle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the new "preserve filename" option, does that apply to all file fields or is it only used by the asset page? If it's being added to all file fields I think I would prefer the options be hidden under a menu so it doesn't take up so much real estate (in most use cases people don't care about the filename preservation).

@@ -1,15 +1,19 @@
.FileField {
.FileField,
.FileUploader {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should include .FileUploader selectors here since it'll make it hard to find later, ideally both places would use a shared component but if this isn't feasible let's just move all the .FileUploader styles to FileUploader.css

(also for the asset page, i don't think we need the border/padding from this specific style)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah; it's just used on the asset page. there are no changes to the field within the doc editor. let me take another pass at the CSS here - the FileUploader is basically the wrapper component that's used on the asset page only. i'll change this PR from a "draft" to "ready" when it's ready for another pass.

@stevenle
Copy link
Member

stevenle commented Feb 2, 2026

lmk if this is ready for another look

@jeremydw jeremydw marked this pull request as ready for review February 6, 2026 18:18
@jeremydw
Copy link
Member Author

jeremydw commented Feb 6, 2026

alright; updated a few things so this is ready for review:

  1. separated out the standalone file uploader from the file field, so their styles and code are more decoupled
  2. updated the dropdown with file naming options to hopefully be clearer
  3. improved the experience when uploading multiple files in succession
  4. added copy URL buttons that show the GCS and Google image service URLs
image image image image

@stevenle
Copy link
Member

stevenle commented Feb 6, 2026

this more or less looks good. the code seems to indicate an error is thrown if you try to overwrite an existing file, do you care about bypassing? caching may be a concern if so.

@stevenle
Copy link
Member

stevenle commented Feb 6, 2026

nm i just tested locally and see the overwrite prompt now. i'm thinking by default for the "clean" / original filename option we set it to nocache

@jeremydw
Copy link
Member Author

jeremydw commented Feb 6, 2026

this more or less looks good. the code seems to indicate an error is thrown if you try to overwrite an existing file, do you care about bypassing? caching may be a concern if so.

here's what that looks like (this can only occur when you choose the "preserve original filename" option):

image image image

@stevenle stevenle merged commit c1054c2 into main Feb 6, 2026
1 check passed
@stevenle stevenle deleted the feat/assets-page-updates branch February 6, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants